-
Animating Buttons
Does anyone one the how to animate buttons like the top menu buttons, on the Diesel site http://www.diesel.com/.
-
zephyr
Create a movieclip with the text for the button in it. In a layer above create a mask to fit this text. Make the text layer constrain to the mask by dragging it below the mask layer. Lock and hide the mask layer.
In the layer with the text in the first frame set the 'stop();' action. In the second frame select the text, copy it and paste it in place. Recolour this second text and move it to the side of the previous text.
Select the two and convert them to a symbol (graphic or movie clip). Tween them sliding to the left and in the last frame put the 'stop();' action.
Then in the frame after this tween the symbol going back into place.
Leave this movie clip and set the instance name to 'text1'.
Now you need an invisible button, to do this just create a button over the movieclip and put a box the size you want in the Hit stage. Set the actions for the button to:
Code:
onRollover{
tellTarget("text1"){
play();
}
}
on Rollout{
tellTarget("text1"){
play();
}
}
If using the play command doesn't work then label the frames and use the 'gotoAndPlay("frame name");' command instead
-
Thanks for replying to my post. You advice was very helpful
-
zephyr
No probs, but I just realised a slight mistake it should be:
on(rollover) not onRollover, same for rollout
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
|