kottore / away3d

Automatically exported from code.google.com/p/away3d
0 stars 0 forks source link

Kmz class is broken #60

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Reference the Kmz class (IE: trace (Kmz))

What is the expected output? What do you see instead?

There is a runtime error which is thrown: "Illegal override of Kmz in  
away3d.loaders.Kmz"

What version of the product are you using? On what operating system?

This was using Away3D 3.4 or by using the latest version from SVN. Away3D 
3.3.3 did not throw this error.

Please provide any additional information below.

Original issue reported on code.google.com by joshuagr...@gmail.com on 11 Sep 2009 at 5:51

GoogleCodeExporter commented 8 years ago

Original comment by rob.bate...@gmail.com on 15 Sep 2009 at 11:25

GoogleCodeExporter commented 8 years ago
Hi All
I found a way to fix this issue 
simply rename the variable data with an other name like entryData in the 
function prepareData(data:*) in 
KMZ.as (line 33)

My version (working) :

/** @private */
arcane override function prepareData(data:*):void
{
    kmz = Cast.bytearray(data);

    kmzFile = new ZipFile(kmz);
    for(var i:int = 0; i < kmzFile.entries.length; ++i) {
        var entry:ZipEntry = kmzFile.entries[i];
        var entryData:ByteArray = kmzFile.getInput(entry);
                // the test on models folder is commented cause I use dae zipped and renamed to .kmz
        if(entry.name.indexOf(".dae")>-1 /*&& entry.name.indexOf("models/")>-1*/) {
            collada = new XML(entryData.toString());
            //TODO: swap this to parseGeometry()
            _container = Collada.parse(collada, ini);
            if (container is Loader3D) {
                (container as Loader3D).parser.container.materialLibrary.loadRequired = false;
                (container as Loader3D).addOnSuccess(onParseGeometry);
            } else {
                parseImages();
            }
        }
    }
}

Dasde (http://dasde.fr / http://neoia.fr)

Original comment by david.do...@gmail.com on 3 Dec 2009 at 6:31

GoogleCodeExporter commented 8 years ago
Thanks for that, unfortunately that breaks the path to any textures belonging 
to that 
KMZ file...

Original comment by brucewei...@googlemail.com on 6 Dec 2009 at 11:49

GoogleCodeExporter commented 8 years ago
Is there an ETA for this to be fixed? I am wondering if it is worth moving some 
(no longer working) KMZ models to an alternative format.

Original comment by brucewei...@googlemail.com on 29 Jun 2010 at 11:19