A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: on amount loaded = total amount , i want to display something else.

  1. #1

    on amount loaded = total amount , i want to display something else.

    I have a preloader for the movie, and while the preloader is loading, there is an animation going on. It says "Loading_", with the underscore flashing. I want to make the "Loading_" MC say something else when the amount loaded equals the total amount, in other words: when it reaches 100% loaded, i want "Loaded_" to change to "Finished". Can someone help me out?..I'm doing a website for a band and they want it done relatively soon.

    David "O"

  2. #2
    Senior Member
    Join Date
    May 2001
    are you looping through frames when preloading?
    frame 2
    show preloadpercentage
    frame 3
    if totalBytesLoaded < totalBytes gotoAndPlay frame 2

    -- or --
    are you doing this using an onEnterFrame event?
    this.onEnterFrame = function()
    preloader stuff
    if complete
    delete onEnterFrame


    either way, you are looping until complete, the next frame is after you are complete, change the text there and start showing movie

  3. #3
    good point, that works for me, thanks.

  4. #4
    now...ive attached the fla file, and i want to put a sound file on the "Loaded" frame. I have a button that advances users to the "Loaded", but when they hit it, they can hit again and go back and back and so on. The thing is, is that when you click the button , the sound plays again. I dont want that to happen...is there a way that i can tell the music only to play once, untill its finished?

    If something's unclear, just let me know...(not like you won't)

  5. #5
    sorry, here's the fla link cause this site doesnt support a big enough size for fla...dumb

  6. #6
    Senior Member
    Join Date
    May 2001
    i dont want to look at your fla anyway

    my solution, create a variable,

    var blnPlayedSound = false;

    somewhere during your preload or before your Loaded frame
    play your sound using attachSound, rather then putting it in the frame.
    when user clicks,

    if ( ! blnPlayedSound )
    play the sound
    blnPlayedSound = true;
    whatever else you do

    now, it will play once, unless you would want to reset the blnPlayedSound variable

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