A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: pause n play a flash movie

  1. #1
    Junior Member
    Join Date
    Aug 2001
    Posts
    4
    hi, i need help urgently. Is there anyway to make a flash movie pause n play again at any point of the movie using the keyboard's keys? I need it to do some presentation stuff. So anyone know please help me. thanx!

  2. #2
    Arckid - Curving the Web
    Join Date
    Dec 2000
    Location
    India
    Posts
    1,412
    let me know something about ur movie ...

    how many timeline(s) / MCs it contains ?

  3. #3
    Senior Member
    Join Date
    Mar 2001
    Posts
    110
    create a movie clip in this clip you want two frames and two layers

    frame 1

    create your stop button on the bottom layer and assign the following actions :

    on (keyPress "<THE KEY YOU WANT TO PRESS>") {
    _level0.stop();
    play();
    }

    on the top layer add the action stop()

    fRAME 2

    add the stop(); action to the top layer again
    add the play button to the bottom layer with these action :-
    on (keyPress "<THE KEY YOU WANT TO PRESS>") {
    _level0.play();
    play();
    }

    hope this helps, all it does is on pressing the button it tells the main timeline to stop and the MC's timeline to play. that reveals the new play button which does the same but tells the main time line to play

    hope it helps.

    Danny

  4. #4
    Junior Member
    Join Date
    Aug 2001
    Posts
    4
    erm..i am jus a beginner in flash, so duneo wad is MC...
    do the number of timeline n scenes affect the pause thing i wana do? think i can create the clip in only one scene. so wad is the simplest way? thanx!

  5. #5
    Senior Member
    Join Date
    Mar 2001
    Posts
    110
    ok see it work here http://sharpmail.co.uk/startstop.fla open it in flash 5 then you will see a button says stop this is a Movie Clip (MC) dubble click it to see what i said to do. edit the buttons if you want them to look different.

    Danny

  6. #6
    Arckid - Curving the Web
    Join Date
    Dec 2000
    Location
    India
    Posts
    1,412
    hi there ...

    MC means movie clip ....

  7. #7
    Arckid - Curving the Web
    Join Date
    Dec 2000
    Location
    India
    Posts
    1,412
    to sharpmail ...

    i think that will just stop main timeline not the whole timelines and the movie-clips running on the main timeline ...

    m i right ???

  8. #8
    Junior Member
    Join Date
    Aug 2001
    Posts
    4

    Smile

    thanx alot guys...will go try out if i can figure out the stuffs. think will still need ur guys help. if there is other ways of doing it, pls continue to post them.
    thanx very very much.
    :">

  9. #9
    Senior Member
    Join Date
    Mar 2001
    Posts
    110
    aashu.com, yes it will but to combat that he could put the stop command for each MC, so where he has _level0.stop();

    he can target the other MCs at the same time

    _level0.stop();
    _level0.MC1.stop();
    _level0.MC2.stop();
    _level0.MC3.stop();
    _level0.MC4.stop();

    and the same for play.

    Danny

  10. #10
    Arckid - Curving the Web
    Join Date
    Dec 2000
    Location
    India
    Posts
    1,412
    hi there ...

    i think thats the point ...

    and each and every time when user pauses u must hav to stop all the MCs ...

    so lets know that what he wanna use this trick by which way ???

    m i right ?

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