-
moving MClip smoothly using Actionscript
I have a menu with a box that surrounds the menu text for the selected link. I have it so that each time a link is pressed the box (a sperate MC) is moved to surround the appropriate menu text (i.e. which one was pressed. This was done by using
this.contactPage.onRelease = function{
menuBox._y = 320;
}
and etc. for each menu btn. The problem is that when it moves to the place it does it instantaeously where as I would like it to slide smoothly from its present position to the preset position (e.g. _y = 320). Is there a way to do this with actionscript? Thanks in advance masters of Flash!
J
Last edited by dptoot; 10-13-2004 at 01:03 PM.
-
Senior Member
ON the box MC.........
onClipEvent(enterFrame){
this._y+=(_root.ypos-this._y)/7;
}
...and code for the button
_root.ypos=320;
-
super advice works perfectly
thanks... yay Flash Kit
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|