actionscript - Can the Flash CS4 [embed] tag be made to export assets to frame 2 rather than frame 1? -


we're working on flash cs4 project main .fla file has ballooned in size , 'publish' taking forever. suspect large amount of size (and @ least of compile time) due quantity of audio symbols in library.

i love remove unnecessary bloat .fla file. i've experimented removing audio symbol library , using [embed] metadata tag instead, so:

[embed(source="audio/music/endoflevelditty.mp3")] public var endoflevelditty:class 

the resulting published file works perfectly, there problem. our game uses preloader on first frame of timeline, other classes need exported in frame 2 (as set in publish settings > actionscript 3.0 settings). size report begins this:

 frame #    frame bytes    total bytes    scene -------    -----------    -----------    ----------------       1         284515         284515    scene 1       2        5485305        5769820     (as 3.0 classes export frame) 

however, if use [embed] tag on small sound, size report now:

 frame #    frame bytes    total bytes    scene -------    -----------    -----------    ----------------       1         363320         363320    scene 1       2        5407240        5770560     (as 3.0 classes export frame) 

as can see, embedded sound has been exported frame 1 rather frame 2. if embed sounds in manner, size of frame 1 grow huge, , users looking @ white screen ages before preloader frame loaded.

so question this: can use [embed] tag have embedded asset export in frame 2 instead of frame 1?

project constraints:

  • our team composition means can't change pure flex @ stage.
  • the compiled .swf needs 'all in one', can't split preloader separate file, , can't access external resources.

edit: i'd settle having audio in embedded library swc, there seems no way make embed in frame 2 either; ends in frame 1.

why not put asset in frame want : create new class assets:

public class assets extends sprite {  [embed(source="audio/music/endoflevelditty.mp3")]  public var endoflevelditty:class;   public function assets() {   super();  } }  

then in flash ide create new symbol , make extends assets class, , put symbol frame want


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -