AS2 Rewind Prototype


/ Published in: ActionScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. MovieClip.prototype.rewind = function(from, to) {
  2. this.from = from
  3. this.to = to
  4.  
  5. if (!from)
  6. this.from = this._currentframe
  7.  
  8. if (!to)
  9. this.to = 1
  10.  
  11. if (this.from <= this.to)
  12. return
  13.  
  14. this.gotoAndStop(this.from)
  15. this.onEnterFrame = function() {
  16. if (this._currentframe == this.to) {
  17. this.onEnterFrame = null
  18. return
  19. }
  20. this.prevFrame()
  21. }
  22. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.