dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: timeline control

  1. #1
    3D kiwi
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    95

    timeline control

    I have an movie clip that plays one long animation but is split in 4 distinct sections. I want to be able to control the foward and reverse playing and stop point of the clip depending on 1 of 4 buttons the user rolls over.

    ie. if user passes over button 3 the playhead moves from where ever it is foward to frame 30, if the user moves the pointer over button 1 while the playhead is still moving to frame 30, it will stop and start playing in reverse until it gets to frame 1.

    is this a case of prevFrame nextFrame.... Until loop?

    I have no idea how to do this.

  2. #2
    Knows where you live
    Join Date
    Oct 2004
    Posts
    944
    Something like this?
    target = 10;
    _root.onEnterFrame = function() {
    if (target>this._currentframe) {
    nextFrame();
    }
    if (target<this._currentframe) {
    prevFrame();
    }
    };
    Change the target varible and it will go to that frame.
    The greatest pleasure in life is doing what people say you cannot do.
    - Walter Bagehot
    The height of cleverness is to be able to conceal it.
    - Francois de La Rochefoucauld

  3. #3
    3D kiwi
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    95
    thanks dude, that worked perfectly.

    Ive been after that simple function for ages. Life saver.

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