dcsimg
A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 22

Thread: loading movie while main movie is loading

Hybrid View

  1. #1

    Lightbulb

    ive got a swf intro on my page...i want one of those nifty "loading" movies to go on while its loading the main swf.

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    You want to load the main movie while the intro movie is playing?

  3. #3
    yes...i believe its called a preloader?...i have MX so im not sure what will work and what wont

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    2 separate things here!
    Yes it could be called a preloader, and you could need one to preload your intro movie. But depending on this intro movie, you might not need a preloader as such on the main movie... Unless you want to show a preloader over your intro movie, to indicate that the main movie is preloading!

  5. #5
    well, all i know is that nothing happens when the movie is loading, its just plain old black(black because i set the wmode to transparent and the page is black). i want something i design to happen while the main movie is loading.

  6. #6
    someone help me here?

  7. #7
    The preloader is the most basic piece in a flash movie. The easy way is to use the progress bar component. Take a look at at http://www.macromedia.com and download the Flash UI Components Set 2

    Jorge

  8. #8
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    IMHO, that component is a piece of...!
    Have never seen it work properly, and on top of it, itself being a component, the preloader will not appear until most of the preloading is done anyway, rendering it quite useless!
    But that's my personal opinion!

  9. #9
    thats great oldnewbie...but, can you offer a working alternative?

  10. #10
    chatbugs.com ***** flashTampaDotCom's Avatar
    Join Date
    Mar 2002
    Location
    Tampa, Florida
    Posts
    171
    Take a look at this documented example I made months ago for someone else on here:

    http://flashtampa.com/flashtutorials...epreloader.fla
    http://flashtampa.com/flashtutorials...epreloader.swf

    the swf is not a "nice looking" product, it's a mix of various features which can be easily removed to suit your needs.. let me know if you need any further help on it.. it works very well, and is also FlashMX friendly (its exported as a flash5 swf)..

    (someone wanted a preloader, then someone wanted to see an animation while it loaded the whole movie, then someone wanted the preloader itself to move, then.. then.. ugh.. lol)

  11. #11
    so, how do i create my own little animation for the loading bar, instead of having to use the gay little sample one...do i just make my own and paste the stop(); code in there?..that doesnt make sense to me...??

  12. #12
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    That preloader may work... If you don't use components and/or export on the first frame stuff (linkage).

    If you do, the preloader, although it may still be working, will not appear until the movies is almost completely downloaded, making the preloader but useless.

  13. #13
    chatbugs.com ***** flashTampaDotCom's Avatar
    Join Date
    Mar 2002
    Location
    Tampa, Florida
    Posts
    171
    You use all the code, and just change the contents of the movieclip that has the bar and the text box in it [and remove the code that adjusts the scale of it; but not critical if you leave it]. That's it. Play with it -- you'll see. And yes, you need to STOP the main timeline, and let the preloader start it again -- once the movie has been fully loaded.

    The example I posted DOES work, and it's only a few hundred bytes worth - depending on any font outlines you embed or any other vector art or tweens. I use it everywhere I can with only a few variations.

  14. #14
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Yeah! Sure! If you say so...

    And as this example so elegantly demontrates!

    http://odin.prohosting.com/~oldnew/f...epreloader.swf

    Used your exact code, only inserted a scrollpane with a picture instead of your content.

    Check this out on a dial-up!

    BTW, didn't say it wouldn't work! Said it wouldn't show up until the preloading process (and display) was almost over!

  15. #15
    chatbugs.com ***** flashTampaDotCom's Avatar
    Join Date
    Mar 2002
    Location
    Tampa, Florida
    Posts
    171
    If you would have taken a moment to LOOK at the FLA and read what I posted, you would understand that that initial frame is 16K for a reason: the animated frames contained in the MC..

    It was a quick example someone asked about "how do I put an animated gif like this in there?"... I just cut and pasted the gif frames -- hence the 1st frame weight in THAT example.

    When you remove the gif frames, it's very small. The ARIAL embedded font outlines add 2305 bytes to the 1st frame. If you remove the text box, and only have the box, you end up with a preloader that is less than 1K. You could also limit the text to only digits.

    It is what I claimed it to be.

    So, eat that, smart one. Here's to using your brain before opening your mouth.

    http://flashtampa.com/flashtutorials..._OldNewbie.swf

    http://flashtampa.com/flashtutorials..._OldNewbie.fla

    http://flashtampa.com/flashtutorials...bie_Report.txt

    The FOCUS of the response was on the concept -- and HOW to do it. Which you neglected to help with.

    So, I don't see what the point of your being a "jerk" about this is -- oh so eloquently I might add.

    (the above files were modified, again, for oldNewbie's sake, see below)
    [Edited by flashTampaDotCom on 09-12-2002 at 02:06 AM]

  16. #16
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Maybe you should also read before posting!

    Never said it wouldn't work!
    Never called you a jerk?

    Only said (not talking about the preloader content), that if components and/or export on first frame stuff were used, your preloader as coded would not show up from the beginning of the preloading process.

    Do me a favor, just add a component or 2 rather than that awful looking gif or whatever, as movie content, or maybe add a 3 minute mp3 linked on the first frame, and show me that your preloader does show up from the beginning, and not when 60 or 80% have already downloaded...

    Then get some sleep, as I will!

  17. #17
    chatbugs.com ***** flashTampaDotCom's Avatar
    Join Date
    Mar 2002
    Location
    Tampa, Florida
    Posts
    171
    What you are saying is totally correct. It has a stop on the 1st frame, and the intention, AS DOCUMENTED by the example, is to keep any animations on that 1st frame small. It's not hard to do.

    Now, if you want to have other content that is larger, it would have to work differently:

    Don't put a stop on the 1st frame.

    Change the code on the onClipEvent(), so that it checks if it has reached a certain frame, or different percentage, and then change the timer check to wait for the full percentage to be reached, before it starts to fade out; or put code on a later frame to begin this process of "fading out" with a flag variable... etc.. etc..

    There are a zillion ways to customize this example.

    The point is, if the instructions are understood, and followed, this example can work very well.

    Like most examples, if the instructions are NOT followed, or the parameters of the understanding of "how its intended to be used" are breached.. well.. you'll get something clumsy.

    AGAIN.. just for oldNewbie's edification, an example with a 40 second streamed MP3 with, the same preloader; albeit, with a few mods to accomodate the variation. Go ahead, bust out your modem!

    http://flashtampa.com/flashtutorials..._OldNewbie.swf

    http://flashtampa.com/flashtutorials..._OldNewbie.fla

    [Edited by flashTampaDotCom on 09-12-2002 at 02:01 AM]

  18. #18
    flashtampa...i cant understand your directions in the fla...i tried pasting the action with all that code into the first frame of one of my layers...and nothing happened...your directions werent very explicit...help me out here.

  19. #19
    chatbugs.com ***** flashTampaDotCom's Avatar
    Join Date
    Mar 2002
    Location
    Tampa, Florida
    Posts
    171
    ok.. fear of retaliation from oldNewbie aside,

    1) copy the FRAME containing the MC (the box u see, which in the 1st example has the text) [right click, copy frame)
    2) paste the frame on its OWN layer, in frame 1. (this will keep the code, and the underlying MC intact), with the main stop(1) on that frame (right click, paste frame)
    3) MOVE your content so that it starts at frame 2.

    should work.

    press control+enter again while the movie is playing to start the bandwidth profiler (to see how it'll behave at slower download speeds)

    now, to clean it up for your tastes:

    double click on that MC that contains the box, and then remove the MC animations..

    that should do it.

  20. #20
    your explaination is still very convaluted...ill post my fla so you can see what i did so far...but, im not sure if it works...

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