dcsimg
A Flash Developer Resource Site

Page 3 of 4 FirstFirst 1234 LastLast
Results 41 to 60 of 62

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

  1. #41
    Junior Member
    Join Date
    Apr 2002
    Posts
    14

    Compressed SWF?


    Is your preloader SWF compressed? Maybe there is a problem in the Flash Player 6 that prevents a compressed SWF from playing "streamed" if not enough compressed SWF data has been downloaded to be uncompressed into a regular, playable SWF?? I don't really know. I'm just brainstorming. Maybe try testing your preloader and/or your loaded SWFs as uncompressed.

  2. #42
    Junior Member
    Join Date
    Apr 2002
    Posts
    8
    hi brandon
    look like your preloader scripts same as mine.. and i have the same problem too, well i want to ask with your solution that you posted earlier,.. do i have to make a new movie for a preloader? or just make a new scene?
    im sorry im not too good for action scripting..

    thanx

  3. #43
    flash mangler drunkenmaster2000's Avatar
    Join Date
    Apr 2001
    Location
    England
    Posts
    156
    no. I'm actually exporting them both as Flash 5, as they have no need to be done in flash 6, and the customer wants F 5 (etc.)

    Here is my code:

    Code:
    Preloader:
    
    Frame 1
    loadMovieNum("map.swf", 1);
    
    Frame 7
    var bLoaded = _level1.getBytesLoaded();
    var bTotal = _level1.getBytesTotal();
    var kLoaded = Math.round(bLoaded/1024);
    var kTotal = Math.round(bTotal/1024);
    var kPercent = (kLoaded/kTotal)*100;
    percent = bloaded+" of "+bTotal+" bytes";
    if (bTotal<=1000) {
    	gotoAndPlay(1);
    }
    if (kLoaded == kTotal) {
    	this.gotoAndPlay(15);
    }
    
    Frame 8
    GotoAndPlay(7);
    
    Frame 40
    _level1.nextFrame()
    
    Frame 41
    stop();
    
    ========
    
    map.swf
    
    Frame 1
    stop();
    
    etc...
    The large gaps are so I can fade the preloader text in and out.

    So the problem at the moment is that when I run it, it works fine, but second time, the filesize is reported as -1 byte. Now the trap in Frame 7 should boot it back to the start for being < 1Kb, but it doesn't, for some reason, ithits the next trigger and fades my text out. This is not noticeable when it's cached, but if you are downloading the file, the preloader will report complete, and it will just sit there, blank, until it's finished loading.
    The actual filesize is 100Kb, occasionally I've actually seen it report it, but only a few...

    Surely if the new movieclip is on _level1, even if it loaded quickly, surely GetbytesTotal will still return the value..


  4. #44
    Originally posted by themanual
    hi brandon
    look like your preloader scripts same as mine.. and i have the same problem too, well i want to ask with your solution that you posted earlier,.. do i have to make a new movie for a preloader? or just make a new scene?
    im sorry im not too good for action scripting..

    thanx
    You should make a new movie for the preloader, and it should have the same dimensions and properties as your main movie.

    The rest of your movie would, in my example, be in a separate SWF, called "movie.swf" and in the same directory as the preloader. Then my code should work. At least it does for me.

  5. #45

    Lightbulb make it easier

    Hey y'all,

    Brandon - good job with your problem solving!

    However, an easier solution exists! Although I haven't fully tested it in and out, it seems to work fine.

    Background:

    So, I created a large glossary in F5, and created a preloader for it. I've just opened the source in F6, and it works on test movie export, especially when I do the modem speed streaming test (the built in bandwidth test settings). Now, there aren't any sound files, nor video, nor picture images, so I'm unsure about what would happen in your individual movies, but here goes:

    Soln:
    Build your movie as you would without a preloader, leaving 2-10 frames for the preload. Then, build the preloader in ITS OWN MOVIE CLIP, which you place in frame one of the main timeline. Movie clips have independent timeline, so the actions in the preloader movie clip will all execute (the frames will loop properly) even though the main movie hasn't passed frame one. If you'd like to test my preloader on your own machines, go to:

    http://www.pccrf.org

    >enter the site >click "Glossary of Terms" in the main menu

    I hope this works for all different types of movies, as it is a very simple and clean method. Let me know if you want the .fla

    rock on!
    -dp

  6. #46
    flash mangler drunkenmaster2000's Avatar
    Join Date
    Apr 2001
    Location
    England
    Posts
    156
    nice one, dexter.

    Unfortunately the problem we have here is that our movies preload all the 'linked' files before frame 1 is even loaded, thus, the preloader still wouldn't kick in. The only way I can think of getting round this is to make sure the preloader clip is also attached, but make it load before everything else. Although I don't know whether this is possible.

  7. #47

    doesn't matter.

    it still does work. It allows the first frame to play, at least. I just created a 2.4 Mb movie in MX with an 89 frame video starting at frame 5. I also included a piece of text at frame 45 with "all font outlines" embedded. By your theory, it would load them all before frame one, but it doesn't. At least; if it does, it still allows frame 1 to play, because I'm watching my preloader work correctly right now.

    I just ask that you give it a try, it seems to be working fine.

    BTW, I visited a site last week which required me to upgrade to a NEWER version of the F6 player. You might want to check out the MM site. It'd be crazy if this issue were already fixed by the creators.

  8. #48

    Thumbs down ahhh

    ahh, I see for LINKED images and whatnot. disregard, sorry.

  9. #49
    Junior Member
    Join Date
    Nov 2001
    Posts
    23

    One other way around this

    There's another way around this without creating a separate movie for your preloader.

    It might take a little longer, but it works.

    The basic steps are to clear the Export in first frame check box for all of your linked components, and then place instances of those components in the frame that you want them to load.

    First
    Clear the Export in first frame check mark located in the Linkage Properties window. To get to it, right-click on each and all of the movie clips you don't want to load to frame 1 and select linkage...

    Second
    Since these components are now no longer initialized on or before the first frame, you must drag instances of the component symbols to the frame where you want the component to load. Otherwise some parts or all parts of the linked components will not load.

    Third
    use the SetProperty action to change the visibility of the ScrollPane component instances to false.

    In the following example, I've loaded a dynamic menu inside the ScrollPane, you can view the ScrollPane by clicking on the button Working with LTV.

    I placed all ScrollPane components inside a single movie clip called ScrollComponents with an instance name of instScrollComponents and placed that movie clip on Frame 3. I made it invisible using the follwing script:

    setProperty(instScrollComponents, _visible, false);

    This loads the ScrollPane components I need on Frame 3 instead of on or before Frame 1 where my preloader is located.

    http://home.earthlink.net/~vidalh/Flash/LTV.swf

    http://home.earthlink.net/~vidalh/Flash/LTV.zip

    Hope this helps!

  10. #50
    brilliant.


  11. #51
    flash mangler drunkenmaster2000's Avatar
    Join Date
    Apr 2001
    Location
    England
    Posts
    156
    OMG! I never thought of that.

    /me sits in corner with D hat on..

  12. #52
    Junior Member
    Join Date
    Mar 2001
    Posts
    12
    I just get a white blank screen until the main site loads - no progress bar. I'm on IE6.0 / Win XP / Flash Player 6,0,23,0

    (I checked twice and deleted temporary internet files each time to force the swf.to be downloaded again.).

    Anyone else not see the progress bar in this example ?

    ____________________________
    Smudge

  13. #53
    Junior Member
    Join Date
    Nov 2001
    Posts
    23
    If you're talking about my example:

    http://home.earthlink.net/~vidalh/Flash/LTV.swf

    I've tested it on Windows 2000 with IE 5.5, IE 6.0 and with Flash player 6. I've also tested it on a Windows 95 machine with IE 5.5, Netscape 4.08, and Flash 6.

    I've always been able to see the progress bar loading the site.

    I've even tested the behavior with Flash 5. With Flash 5 you get a blank white screen and then a non-functional progress bar - it just stops at the progress bar and doesn't move on to the main site. This makes sense since the ScrollPane I'm using only works with Flash player 6.

    I have not tested it on a Windows XP machine.

    If you figure out what's wrong let me know.

    Thanks.

  14. #54
    flash mangler drunkenmaster2000's Avatar
    Join Date
    Apr 2001
    Location
    England
    Posts
    156
    Hugo, I tried your idea the other night, but it caused a most unusual bug. I have a mapping system, where you click on one of the worlds continents, it will attach the required continent, and move it into place.
    When I set up the movie like you said, it did get the bulk of the download off frame 1, but when you ran it, and clicked on one of the continents, it freaked out, the screen went blank, then it seemed to redraw the entire movie, and scale it to the size that the continent should have been. It looks most wierd, I can tell you. I got some time off (real) work, so I'll look into it.

  15. #55
    Junior Member
    Join Date
    Nov 2001
    Posts
    23

    That's Weird

    Hey Drunkenmaster,

    That's weird. I really don't have any suggestions off the top of my head, but if you can email me the fla file, I'd be very curious to look at it.

    My email address is vidalh@earthlink.net

  16. #56
    Junior Member
    Join Date
    Apr 2002
    Posts
    13
    Originally posted by offdahook
    embedded fonts really kill bandwidth
    It largely depends on the complexity of the shapes in the font, and how many different fonts you embed, and how many characters you embed.

    For instance, a font like Arial Black, which is pretty efficient in terms of the amount of points used to draw it as a vector shape, won't take up nearly as much space as a font like, 6808chargen (a LCD/terminal type font).

    Basically the more points the font has as a vector shape, the more memory you need to store it.

    General rule: Use ONLY the characters that you need (e.g. you don't need anything except 0-9 and % on your preloader dynamic text object [DTO] (that's if you even include the % in the DTO).

    Also, ask yourself, do you really NEED the "super-cool ornamental medieval lettering font" for your preloader?? The focus of your site should be your site, not your preloader. People see preloaders once, they will see your site time and time again (hopefully I'm not saying make your preloader crappy, it is a first impression. But I don't see a point in a super-cool font for a percentage display.

    If you are getting 100K+ sizes from fonts, you're probably using 10 fairly complex fonts and embedding every character...

    Richard

  17. #57
    Senior Member
    Join Date
    May 2001
    Posts
    351

    old newbie is right

    when you use attachMovie in your action script and set your linkage, it automaticaly selects "Export in first frame" for you. By doing this, you load up your first frame with stuff you dont see and isnt in your preloader.

    so thats how your first frame gets so large without there being much in it.

    if you go through your library and de-select everything that is marked export in first frame, you need to drag an instance of that clip onto your timeline somewhere. maybe create a new layer and mask it.

  18. #58
    Thanks for everyone's help and comments. My preloader solution seems to work well; it's good to know there are other solutions as well.

    Best,

  19. #59
    Senior Member
    Join Date
    Apr 2001
    Posts
    246
    i think this problem is because of those MX components....

  20. #60
    Junior Member
    Join Date
    Jul 2001
    Posts
    2
    Be SURE YOU ARE NOT USING "LINKAGE" for attaching or Exporting MovieClips! as this preload on the first frame, even before a preloader!,
    A work around is possible by placing the movie clip on outside the Stage.

    :-)

    Hope this helps you


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