A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: How do you load and move playhead in another level..

  1. #1
    Member
    Join Date
    Oct 2002
    Location
    Tampa, FL
    Posts
    48

    How do you load and move playhead in another level..

    I need a button on level 1 to load a movie on level 2 and when it loads place the playhead at frame 10.

    I have tried the simple method of

    on (release) {
    loadMovieNum("movie.swf", 2);
    _level2.gotoAndPlay(10);
    }

    but the PLAY command is executed before the movie is loaded so the playhead just starts at frame 1.

    I have also tried a movieclip but it's not efficient due to varying system performance.

    How can I make the second command wait for the movie to fully load on the level then send it to frame 10

    Thanks
    Going NUTS trying to FLASH!!

  2. #2
    Who, What, Why ... ? Fraggs's Avatar
    Join Date
    Jul 2003
    Location
    Flashland .. where else ?
    Posts
    786
    Have you tried using the setInterval script?
    code:
    setInterval(10);


    Time is in seconds.

    Regards,

  3. #3
    Member
    Join Date
    Jul 2002
    Location
    Hannover, Germany
    Posts
    99

    use functions

    getBytesLoaded()

    and

    getBytesTotal()

    should work for your purposes

    Christian

  4. #4
    Member
    Join Date
    Oct 2002
    Location
    Tampa, FL
    Posts
    48
    Thanks for the assistance. However, I'm not sure how to apply the suggested commands as I'm not Flash trained and don't know scripting. I need to know how the complete script has to be to make it work. Thanks
    Going NUTS trying to FLASH!!

  5. #5
    Member
    Join Date
    Oct 2002
    Location
    Tampa, FL
    Posts
    48
    The attached zip file contains the a test fla sorce of what I am trying to achieve. You will see how I have tried the suggested scripts but still with no success.
    Attached Files Attached Files
    Going NUTS trying to FLASH!!

  6. #6
    Member
    Join Date
    Oct 2002
    Location
    Tampa, FL
    Posts
    48
    I still haven't figured this out. I have done some resarch at Macromedia but still no progress, mainly because there was nothing which specifically addressed the issue.
    Going NUTS trying to FLASH!!

  7. #7
    Who, What, Why ... ? Fraggs's Avatar
    Join Date
    Jul 2003
    Location
    Flashland .. where else ?
    Posts
    786
    Slap the setInterval code between your code lines and it will wait for X seconds (where X is an interger) and then it will execute the next line after that time period has passed.

    Regards,

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