A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Button Rewind

  1. #1
    Junior Member
    Join Date
    Jul 2008
    Posts
    19

    Button Rewind

    hello,
    I have to buttons and a certain animation inside a movie clip.
    one button when pressed plays the animation with this code:

    on(release) {
    gotoAndPlay(2);
    }

    and the second button I want to play the animation but at rewind.
    the animation is from frame 1 - 30. so the first button plays it from frame 1
    to 30 and stops on 30. and I want the second button to play from 30 - 1
    backwards and stop on 1 again.

    Thanks for the helpers.
    מעוניינים בשלטים אישיים? הכנסו
    www.signshop.co.il

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    PHP Code:
    this.onEnterFrame = function() {this._currentframe>1?this.gotoAndStop(this._currentframe-1):this.stop()} 
    gparis

  3. #3
    Junior Member
    Join Date
    Jul 2008
    Posts
    19
    thanks for the reply.
    however, I can't apply this on a button..
    מעוניינים בשלטים אישיים? הכנסו
    www.signshop.co.il

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