A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: How to make movie stop and wait for key/click

  1. #1
    Senior Member
    Join Date
    Feb 2002
    Posts
    125

    How to make movie stop and wait for key/click

    Hello! How can I make a movie stop an a certain image and only continiue if the user clicks the movie or pushes a key?

  2. #2
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    In the frame you want the movie to stop on add a movie clip, on this movie clip attach the actions

    onClipEvent(load) {
    _parent.stop();
    }
    onClipEvent(mouseDown) {
    _parent.play(); // play if the mouse is clicked
    }
    onClipEvent(keyDown) {
    _parent.play(); // or if a key is pressed
    }

  3. #3
    Senior Member
    Join Date
    Feb 2002
    Posts
    125
    Hi catbert303,

    thanx this works. I got antoher question: I have several places where I need the movie to stop and play again like this. Do I have to write this code for every instance of my invisible movie-clip or is there a better way?

  4. #4
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    Once you write the code once, if you copy and paste the movie clips to the other frames you want to pause, the code will stay attached to them. So you only need to type it once

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