A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Motion guide controlled by actionscript?

  1. #1
    Member
    Join Date
    Apr 2004
    Location
    IA, USA
    Posts
    57

    Motion guide controlled by actionscript?

    Hello, I am trying to move a Clip in a winding road fashion, and I want to be able to control and adjust the speed of the Clip's movement dynamically within the game, which is easy to accomplish with ActionScript.

    Additionally, I'd like the clip to move along smooth curves. This is easy to accomplish with a Motion Guide.

    Is there a way to merge these two techniques? I'd like to control the movement along a Motion Guide, and the speed at which it moves across the guide with ActionScript.

    Is this even possible?

    Or are there any other alternatives?

  2. #2
    Ancient Member
    Join Date
    Nov 2000
    Location
    Somewhere
    Posts
    139
    create your tween to a motion path and put it in a Movie Clip.

    Then use actionscript to gotoAndStop in that tween Movie Clip.

    my Actionscript is a bit rusty, or I would help you with the code, but that's the general idea.
    It's nice to be important, but it's more important to be nice." - Hans-Peter Geerdes

  3. #3
    Member
    Join Date
    Apr 2004
    Location
    IA, USA
    Posts
    57
    Ah! Many thanks. I'll play around with that.

  4. #4
    Member
    Join Date
    Apr 2004
    Location
    IA, USA
    Posts
    57
    Okay, the problem I am having is that I need the Clip that's following the motion guide to gradually speed up as users click the right answers.

    With a motion guide, the motion is uniform throughout, based on the FPS of the clip.

    Is there a way to speed up and slow down the object dynamically with ActionScript?

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