dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: [Resolved] ANNC - attempting to solve "preloader starts at 80%"

  1. #1
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    Hi,

    this is one of the problems that have bugged flash users all the time - you have an attachable sound or attachable MCs, and when you view the movie, the preloader shows up only when the movie is almost completely loaded...
    This is due to the fact that such objects get exported to the very first frame, rather than to a frame you choose.
    MX now allows at least a choice, but still you cannot specify when these symbols get exported
    I have set up an alpha version of a program to help in this situation.
    To use it, you have to prepare your movie:
    a) make sure that all jumps in the main part are relative (nextframe() etc.) or use framelabels - no gotoandplay(5) or gotoandplay("scene x", 3)
    b) make sure that there are no symbols shared between the preloader and the main movie - in particular if you embed a font to show percentages, this font should not be used in the main movie
    c) split the movie in two parts; make sure that you remove unused _exported_ library symbols.
    d) add a blank frame at the end of the preloader
    e) publish two separate swf files (MX: compressed swc files not yet supported), test them independently (the reloader will be too short to view, but the main movie should still work) and upload to http://www.fontimages.org.uk/cgi-bin/swfmerge.cgi
    This code is based on F5 swf file format and probably does not cover some tags I never came across, let alone any tags or modifications new to MX. If it does work for your files, please say so - if it does not work, feel free to mail me swf files for checking. I can NOT handle any fla files, nor can I check resulting files that require F6 player or access to a server

    Musicman

  2. #2
    Senior Member
    Join Date
    Sep 2002
    Posts
    265
    Originally posted by Musicman
    Hi,

    this is one of the problems that have bugged flash users all the time - you have an attachable sound or attachable MCs, and when you view the movie, the preloader shows up only when the movie is almost completely loaded...
    This is due to the fact that such objects get exported to the very first frame, rather than to a frame you choose.
    MX now allows at least a choice, but still you cannot specify when these symbols get exported
    I have set up an alpha version of a program to help in this situation.
    To use it, you have to prepare your movie:
    a) make sure that all jumps in the main part are relative (nextframe() etc.) or use framelabels - no gotoandplay(5) or gotoandplay("scene x", 3)
    b) make sure that there are no symbols shared between the preloader and the main movie - in particular if you embed a font to show percentages, this font should not be used in the main movie
    c) split the movie in two parts; make sure that you remove unused _exported_ library symbols.
    d) add a blank frame at the end of the preloader
    e) publish two separate swf files (MX: compressed swc files not yet supported), test them independently (the reloader will be too short to view, but the main movie should still work) and upload to http://www.fontimages.org.uk/cgi-bin/swfmerge.cgi
    This code is based on F5 swf file format and probably does not cover some tags I never came across, let alone any tags or modifications new to MX. If it does work for your files, please say so - if it does not work, feel free to mail me swf files for checking. I can NOT handle any fla files, nor can I check resulting files that require F6 player or access to a server

    Musicman

    which getBytesLoaded() would this preloader check?

  3. #3
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    Hi,

    the whole procedure makes one swf the same size as the original one, but with content reordered.
    Where the original movie started with sounds, fonts etc, followed by the preloader code, the new one will have the preloader first, followed by sounds etc.
    Both bytestotal and bytesloaded refer to this complete movie

    Musicman

  4. #4
    Senior Member
    Join Date
    Sep 2002
    Posts
    265
    ok, well, I tried it out but the sounds didn't function.

    this was the same effect as if I had loaded main.swf into a movieclip of preloader.swf...

    thanks, though. gave me hope for a minute.

  5. #5
    Junior Member
    Join Date
    Jul 2000
    Posts
    27
    For anyone interested I've devised a little workaround, worth a look

    http://www.flashkit.com/board/showth...hreadid=382350

  6. #6
    Member
    Join Date
    Jan 2003
    Location
    berlin
    Posts
    88
    this dont work with embed-fonts
    there is bug in mx and that is: as soon as u say Export for Actionscript u r automaticly saying Export in First frame
    even if u DO NOT check it.
    and without Export for Actionscript u can't say someting like this
    my_fmt.font="s1";//where si is linkage of my font in lib.

    all i wont is to prevent "Export in First frame" be turned on but to have the "Export for Actionscript" so i can us the linkage id of the embeded-font like:
    my_fmt.font="s1";


    anybody knows the solution?

  7. #7
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    ok. I was not able to use the linkage font in _level1. Only in _level0.
    But, without linkage (a standard dynamic field with embed checked) you can.
    Don't know if you see what I'm getting at... Preloaders with embeded font will not start at 0 unless you preload them first. An embeded font is around 20K. Plus the preload layout. Let's say the preloader itself alone could be around 40 Kbs, won't take too long to preload. So:
    _level0 preloads _level1(main preloader with embeded font. sitting on an empty first keyframe)
    _level1 goes to frame2 and starts to preload _level2 (mainmovie)
    You could even have a command coming from _level0, once the main is preloaded, to load back in _level0. As the movie is preloaded and cached, this could happen almost instantaneously.

    gparis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center