A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: endless foward and back loop

  1. #1
    Junior Member
    Join Date
    Jun 2000
    Posts
    26

    endless foward and back loop

    I´m rotating a object, this object is rendered as images from 3d studio max.
    I want to play movieclip timeline in a endless lopp foward or back depending on which button the user presses. So as long as the user holds down the button the object will rotate. Searched the board but cant find a solution. Tried some solutions with _prevframe but the timeline stops at frame 1.
    Any solution to this ?

  2. #2
    Senior Member
    Join Date
    Oct 2004
    Posts
    2,049
    Just a guess try something like this maybe - untested -

    Code:
    //forwards
    on(press){
    MovieClip.onEnterFrame = function(){
             this._currentFrame += 1;
        }
    }
    on(release){
        delete onEnterFrame;
    }
    
    
    //backwards
    on(press){
     MovieClip.onEnterFrame = function(){
             this._currentFrame -= 1;
        }
    }
    on(release){
        delete onEnterFrame;
    }

  3. #3

  4. #4
    Junior Member
    Join Date
    Jun 2000
    Posts
    26
    Thanks alot for the help, just what i was trying to acomplish

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