  | |  | RE: Export frame for classes problem (MX2004 pro, AS2.0) | RE: Export frame for classes problem (MX2004 pro, AS2.0) 2004-03-10 - By MyName
Back Thank you very much, Nivesh. I got this problem on my current project which has got more than 40 classes so far. I'll leave the setting as at the 1st frame for now, and see if I can figure it out some time later. Convert to Compiled Clip is probably not frequently used as you suggested. Thanks.
Douglas Chen
-- -- Original Message -- -- From: "Nivesh Rajbhandari" <nrajbhandari@(protected)> To: <flashcoders@(protected)> Sent: Wednesday, March 10, 2004 9:44 AM Subject: [Flashcoders] RE: Export frame for classes problem (MX2004 pro, AS2.0)
> Hi, > > I was able to reproduce the behavior you describe ... if the ClipSub symbol > is marked to export in first frame. > > I don't think you can mark the symbol to export in first frame if the class > it depends on is not exported until the 5th frame. > > When unchecking the export in first frame for the ClipSub symbol, the > instanceof returned true and the class's method fired. > > Note that in order to get your attachMovie to work now, you must make the > ClipSub symbol available the old-fashioned way by placing an instance of it > off stage at the frame you want to create it. > > The Convert to Compiled Clip still doesn't work with the set-up you > described (doesn't matter if the symbol is marked to export in first frame > or not). But is that a common use case? > > Thanks, > Nivesh > > -- ---- ---- ---- ---- ---- -- > > Date: Tue, 9 Mar 2004 16:32:31 -0800 > To: <flashcoders@(protected)> > From: "MyName" <tg777@(protected)> > Subject: Export frame for classes problem (MX2004 pro, AS2.0) > Message-ID: <008e01c40637$2c9affe0$28c406cf@(protected)> > > Quoted from the ActionScript Reference Guide - How classes are compiled and > exported: > By default, classes used by a SWF file are packaged and exported on the > SWF's first frame. You can also specify the frame where your classes are > packaged and exported. This is useful, for example, if a SWF file uses many > classes that require a long time to download. If the classes are exported on > the first frame, the user would have to wait until all the class code has > downloaded before that frame would appear. By specifying a later frame in > the Timeline, you could display a short loading animation in the first few > frames of the Timeline while the class code in the later frame downloads. > > When I set File>Publish Settings>Flash tab>ActionScript 2.0 Settings>Export > frame for classes to a frame instead of the first one, the clip instantiated > from a symbol that links to a movie clip subclass loses it's subclass type. > Here is a quick test: > > I put 10 frames in the main TimeLine, and a movie clip symbol in the > Library. The symbol has name ClipSub and is linked to ClipSubClass: > > class ClipSubClass extends MovieClip { > function doSomething():Void { > trace("clip subclass method"); > }; > }; > > In frame 7, I put the following code: > > var clipSub:ClipSubClass = _root.attachMovie("ClipSub", "myClipSub", > _root.getNextHighestDepth()); trace( (clipSub instanceof ClipSubClass) ); > clipSub.doSomething(); > > When I set Export frame for classes to 1, everything works as expected. But > when Export frame for classes is set to one of the other frames, i.e. > 5(keyframe or not, seems no difference), clipSub is not an instance of > ClipSubClass anymore. If try to convert the ClipSub symbol to compiled clip, > I got message in the Output panel. It says "WARNING: The Export Frame for > Classes specified in the Publish or Export settings, frame 5, does not > exist. No bytecode for ActionScript 2.0 classes or interfaces was exported." > > Does anyone know how it comes, and what I did wrong? > > Thanks in advance, > > Douglas Chen > > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > Supported by Fig Leaf Software > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > Be sure to check the archives and the wiki: > http://chattyfig.figleaf.com/ > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106541 > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > To unsubscribe send a blank e-mail to: > Normal Mode: flashcoders-unsubscribe@(protected) > Digest Mode: flashcoders-digest-unsubscrive@(protected) >
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106585 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |