View Full Version : Why Export Classes in Frame 2?

05-29-2008, 05:46 PM
Apparently similar things have come up before. I just read Flash Gordon's thread where he offered $150 dollars for a similar problem.

But I'm still trying to understand, please. Say I have unchecked 'Export in first frame' for every item in my library except for a preloader. I then placed every single item from my library in the second frame of my movie, and the preloader in the first frame.

The preloader waits until stage.loaderInfo.bytesLoaded==stage.loaderInfo.byt esTotal and then uses .addChild(new Foo()) to add the library items. (That are all in the second frame, remember.)

This will apparently create an instance of the class. But apparently the graphics included in the library movieClips will not be included when that class is instantiated. If I put trace statements in the constructor for Foo, they trace, so it's being created. But the graphics that I drew inside the Foo library movieclip are missing.

However, if I gotoAndStop to the second frame, where Foo is placed on the stage, and then use new Foo() this instance of Foo will include the graphics that were added in Flash.

This makes it seem to me that the definition of the Foo class has changed between the first frame and the second frame. Why would they make Flash operate in this way? Shouldn't a Foo be a Foo be a Foo, no matter what frame I'm in?

(I've switched my preloader so it just goes to the second frame, so this isn't an immediate problem, but I want to understand what's going on here.)