A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: :: play()

  1. #1
    Member
    Join Date
    Jan 2003
    Location
    CPU
    Posts
    38

    :: play()

    Hi!
    i want that flash plays the movie faster or slower in relation of "x" mouse's position...how can i do it?

  2. #2
    Senior Member
    Join Date
    Nov 2000
    Posts
    302
    Hi %20,
    you can not directly, dynamicaly set the fps of the movie once it is published (as far as I know). You could however control the currentframe. Try to contain the animation you want to control the speed of in a single clip and control it's frame-position by using:

    onClipEvent(enterFrame) {
    frame = myFunction; // Whatever function or statement gives the desired result.
    this.gotoAndPlay(Number(frame));
    }

    Good luck, cYa!
    [swf width="300" height="40" background="#FFDDBB"]http://www.cid-iv.com/flash/Banner/footer.swf[/swf]

  3. #3
    Member
    Join Date
    Jan 2003
    Location
    CPU
    Posts
    38
    Originally posted by Ivo Vandeberg
    Hi %20,
    you can not directly, dynamicaly set the fps of the movie once it is published (as far as I know). You could however control the currentframe. Try to contain the animation you want to control the speed of in a single clip and control it's frame-position by using:

    onClipEvent(enterFrame) {
    frame = myFunction; // Whatever function or statement gives the desired result.
    this.gotoAndPlay(Number(frame));
    }

    Good luck, cYa!
    thank u...
    and if i want only to say...if the mouse is 0<x<300 then play()...else stop()???

    thank u very very much!

  4. #4
    Senior Member
    Join Date
    Nov 2000
    Posts
    302
    What did you mean by that question? How to set it to only react with those parameters? Well, just:
    if (_root._xmouse>0 && _root._xmouse<300) {
    // your script
    }

    cYa
    [swf width="300" height="40" background="#FFDDBB"]http://www.cid-iv.com/flash/Banner/footer.swf[/swf]

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