A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: shouldn't be too difficult but can't get it to work

  1. #1

    Red face

    I've got a button which controls a movieclip.. Onpress it plays the clip.. now I want it to play a certain number of frames when the button is released (e.g. (_totalframes)-(_currentframe) and then to stop at a certain point. This point differs (i.e. depending on where you release, the 'stopframe' will be different). I can't, however, add a stop action to the 'stopframes' because I don't want the movie to stop when you have the mouse down.. How do I get it to play when the mouse is down yet stop at that point when it is released?

  2. #2
    Senior Member
    Join Date
    May 2001
    Posts
    323
    you could put a variable somewhere maybe in the root

    like _root.IsPressed = false

    and when the button is

    pressed set this to true

    and on release set this to false

    then in the frames put the stop command in a if statement

    if (_root.isPressed == False ){
    Stop();
    }

    this will only stop if the user is not pressing the button


  3. #3

    Smile

    yes, ofcourse... so simple... Thanks!

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