A Flash Developer Resource Site

Page 2 of 4 FirstFirst 1234 LastLast
Results 21 to 40 of 62

Thread: [Resolved] [Resolved] preloader is a bit buggy in MX.

  1. #21
    Junior Member
    Join Date
    Dec 2000
    Posts
    14

    fix

    Okay

    well I finally figured out the answer to my problem. MX loaded their components into first frame of my movie (via Library) and took up tons of bytes. So I deleted the components from Library and it greatly reduced my frame size, which then fixed my pre-loader problem.

    Thanks to aashu.com and brandonbarr for experiencing and helping me with this problem. I hope that this helps anyone else with this problem...


    brent

  2. #22
    Junior Member
    Join Date
    Aug 2001
    Posts
    3
    This sounds like the same problem I'm experiencing. From what I have deduced so far the problem stems from 'linkage' within the library. If you are creating movieclips in the library and then selecting 'export for actionscript' it will automatically check 'export in first frame'. You can check for exported items by expanding the library window...you should see a column called "linkage". This causes the problem you are seeing. The preloader won't show up until all the objects that were "exported" are loaded.

    In my case...80% of the movie is linked for actionscript and this is causing me major headaches.

    If anyone has any ideas about this please add to this thread. I'm trying to create a separate preloader movie that then loads the main movie into level1.

  3. #23
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    I'm trying to create a separate preloader movie that then loads the main movie into level1.
    ...That's what I suggested early on in this thread!

  4. #24
    Yah, old newbie; you was on the ball.

    That seems like the only solution; I'm gonna rework my code to load the movie on level 1 from level 0.

    I look forward to your FLA too, though.

  5. #25
    Junior Member
    Join Date
    Aug 2001
    Posts
    3
    I've tried a couple times to create this preloader but keep running into some problems. Could you post your code here if you get this working?

    I'm assuming that on the first frame you are using:
    loadmovienum("movie.swf", 1);

    or some such action to load the movie in to level 1...

    Then on another frame you have the preloader that measures the load of "movie.swf".

    I'd be very interested in seeing that code.

    Thanks.

  6. #26
    Senior Member
    Join Date
    Jun 2000
    Posts
    120

    glad to find this thread

    very glad to find this thread, was sending my self mad with what seems to be the same problem as you guys are having/ have identified.
    my preloader in its own movie was 4k, but as soon as i put in the movie with my other 9 scenes, it became 18k, and took forever to show up, yet it was exactly the same set of elements!!

    will now go and try all options
    thanks!

  7. #27
    flashing since v3
    Join Date
    Jan 2002
    Posts
    401
    when using dynamic text try to embed only the font shapes that you're gonna be using, namely, 1 2 3 4 5 6 7 8 9 0 for this example...

    embedded fonts really kill bandwidth

  8. #28
    Arckid - Curving the Web
    Join Date
    Dec 2000
    Location
    India
    Posts
    1,412
    Originally posted by offdahook
    when using dynamic text try to embed only the font shapes that you're gonna be using, namely, 1 2 3 4 5 6 7 8 9 0 for this example...

    embedded fonts really kill bandwidth
    who says this? It actually depends upon various conditions and how you used them in your movies.

    so never tell that they are killing bandwidth ..

  9. #29
    flashing since v3
    Join Date
    Jan 2002
    Posts
    401
    Originally posted by aashu.com
    Originally posted by offdahook
    when using dynamic text try to embed only the font shapes that you're gonna be using, namely, 1 2 3 4 5 6 7 8 9 0 for this example...

    embedded fonts really kill bandwidth
    who says this? It actually depends upon various conditions and how you used them in your movies.

    so never tell that they are killing bandwidth ..
    well i say this, fonts have been known to embed up to 50K onto my movies.... so i know to only embed the fonts that im using, unless they are going into input boxes, then i always use system fonts

  10. #30
    Arckid - Curving the Web
    Join Date
    Dec 2000
    Location
    India
    Posts
    1,412
    dont know ... which way you embeds the fonts ...

    i m using this feature from so long ... and never embedded font size gone over 10K.

  11. #31
    ok, i'm still having a heck of a time getting my preloader at http://brandonbarr.com to work.

    Old Newbie's suggesttion seems to be the correct route, but if anyone knows how to do it, could you post some code? (ON, I know you're working on the FLA; could you post here or email me when you get it up?)

    Also, I'm just thinking about how to change my current preloader to work when I load the main movie in a different level. The preloader contains a fillbar that contains script that orginally found the root bytes loaded. How would I write the code in a child on level0 to read a movie on level1? does that make sense?

    Like I said, I'm just trying to fix this. These components are useless unless I can find a preloader that works around the export-to-first-frame business. I tried, but I need an expert's help.

    feeling a bit useless,

  12. #32
    Arckid - Curving the Web
    Join Date
    Dec 2000
    Location
    India
    Posts
    1,412
    send me fla if its size is less then 1 MB ...

    host somewhere and mail me the link .. i will solve it.

  13. #33
    i emailed it to you.

    thx for your help.


  14. #34
    Arckid - Curving the Web
    Join Date
    Dec 2000
    Location
    India
    Posts
    1,412
    will send you back sooon as i got time.

  15. #35
    Arckid - Curving the Web
    Join Date
    Dec 2000
    Location
    India
    Posts
    1,412

    check your mails

    did it ..

    hi

    saw your file ... following things make the problem ...

    - embedded font size total of 26KB total. which comes on 1st frame.
    - then one picture of 13 KB also comes on 1st frame.
    - also one music over there. 13 KB.

    these all things are comming on the 1st frame and increasing the Minimum
    bytes load to view the 1st frame. I am sure that you put all the things in
    one movie clip or on different layers but on 1st frame.

    i would advice you to just put preloader on the 1st frame nothing else.

    Move other things to other frame then 1.

    regarding the fonts ... you embedded common fonts too .. like times, arial
    and i think all ... you dont need to embed those fonts ... because times,
    arial and windings are available on all PC's.

    actually too busy with freelancing projects and beta testing and so much
    other work .. otherwise i will do this thing for you ... but sorry no time
    ... need more than 24 hours per day.

  16. #36

    FINALLY FIXED IT!

    Ok. In a quite roundabout way, and with the help of others, I have solved my own problem. I'm posting my FLAs for others who are experiencing this problem.

    Rehashing--
    It seems MX loads fonts, sounds, components in the first frame of the movie, so first-ten-frame preloaders seem not to work. This is, to the best of my knowledge NOT an optimization issue. When I separated the preloader, a la below, it was only 2K. Maybe only some ppl are experiencing MX exporting many symbols to the first frame. IF YOU ARE HAVING THIS PROBLEM, it messes up the style preloader where you reserve the first ten frames and do a byteLoaded check on the root. Old Newbie suggested loading the main movie in another level. I've finally gotten my preloading bar with percentages (learned from a Flash 5 tutorial SOMEWHERE) adjusted to work pretty well.

    Here is my code. The FLAs are available from the "source" link in the bottom right on the loaded site at http://brandonbarr.com/.

    frame 1:

    LoadMovieNum ("movie.swf",1)

    frame 2:

    loadpercent = "0%";
    loadBytes = "0 of " + Math.round((_level1.getBytesTotal() / 1024) * 1000) / 1000 + " Kb";

    frame 3:

    loadPercent = (Math.floor (_level1.getBytesLoaded() / _level1.getBytesTotal() * 100) + "%");
    loadBytes = (Math.round((_level1.getBytesLoaded() / 1024) * 1000) / 1000 + " / " + Math.round((_level1.getBytesTotal() / 1024) * 1000) / 1000 + " Kb loaded");

    if (_level1.getBytesLoaded() == _level1.getBytesTotal()){

    loadPercent = "100%";
    loadBytes = (Math.round((_level1.getBytesLoaded() / 1024) * 1000) / 1000 + " / " + Math.round((_level1.getBytesTotal() / 1024) * 1000) / 1000 + " Kb loaded");

    gotoAndPlay(5);

    }

    frame 4:

    gotoAndPlay(3);

    frame 5:

    stop();
    _level1.gotoAndPlay("begin_movie")



    the loadbarfill movie has this actionscript to make it scale--

    frame 1:

    this._xscale = ((_level1.getBytesLoaded() / _level1.getBytesTotal()) * 100);

    frame 2:

    gotoAndPlay(1);



    the rest of the site is in a separate SWF named "movie.swf". The first frame of it is labeled "begin_movie".

    Does end result work on other ppl's platforms?

    http://brandonbarr.com/

    If my source files don't work for people having this problem, let me know. I'll see what I can do to help, but it'll be like the blind leading the blind--I'm a poet, but no code poet.

    Best,

  17. #37
    Junior Member
    Join Date
    Aug 2000
    Location
    Amsterdam Holland
    Posts
    25
    I've done some researching for a site I'm changing now and found out that Flash is putting the font 'Arial' (the only one I use in this site) in the first frame.

    That's weird because, my preloader is in the first frame and used to be 4k. Now the thing is around 24k, so it takes a pretty long time before you even see the preloader.

    I found out by copying and pasting a lot with textfields.

    This is even funnier:
    I've got like a dozen textfields in the flashfile. The all have dynamic textfields in which I told them to include the whole Arial-font. So that should mean that Arial will be included in the flashfile. When I read the size-report it was there, but There was no text appearing in the dynamic textfields. The preloader (which uses device-fonts) was a nice 4k. Very strange, because the font was in the flash-file and the .swf file was 52k. Now I made a new Font Symbol in the library. Didn't export it or use it in actionscript. Just made this symbol in the library. After I did that the text appeared again in the dynamic textfield. Not only that, but the size was still the same: 52k. The only difference is that the preloader was 24k instead of 4k.

    What the bloody.....


  18. #38
    flash mangler drunkenmaster2000's Avatar
    Join Date
    Apr 2001
    Location
    England
    Posts
    156
    I've had a similar problem, around 80k of my 100k flash was loading before the preloader kicked in. After doing numerous searches, I found a way round it, the same one you got here, practically.

    Now, it seems to work fine. Once. Once the main swf is cached it freaks the preloader out, and [blah].gettotalbytes was -1. The movie still played, but, because the filesize is wrong, it wouldn't trip the 'if' statement in the preloader, causing my movie to just sit there.

    Anyone got any ideas for that?

    it's on www24.brinkster.com/drunkenmaster2k/ on the right, the 'sound moves map one' try it twice, and let me know what happens.

  19. #39
    Your site works fine on my check. I checked it on a Mac with IE 5 and a PC with IE 5 and Netscape Communicator. I'm on a T1.

    I get negative bytes to start with mine too, but both mine and yours seemed to load cached copies, and presented the total bytes number, before moving on.

    I hope this solution works for others.

    Crossing my fingers,

  20. #40
    flash mangler drunkenmaster2000's Avatar
    Join Date
    Apr 2001
    Location
    England
    Posts
    156
    I hope you're talking about mine working there

    The problem it has is that my trigger goes by the total file size, and when it comes up as -1, it sort of freaks out. I'm gonna try some other things, and see what happens.

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