AbeDajani
asked on
Animating a button in AS3 - on Roll over and roll out
Hello,
Please view attached and advise over the following:
Attached is an image of the navigation menu i'm trying to create. What i have done so far is creating the vector cards and placing them on the stage. i need the script that does the following scenario:
when mouse over any of the 5 cards, the card moves and stops, when roll out, animation is reversed and card moves back to its original state.
The hit area should be the card whether the user clicks on the card during the motion tween or when it reaches the last frame where it stops.
It seems like a simple thing to do, it's been a while since i've worked on flash, let alone that i have no experience with CS3.
I'll appreciate your prompt reply and help
Screen-shot-2011-03-07-at-2.17.5.png
Please view attached and advise over the following:
Attached is an image of the navigation menu i'm trying to create. What i have done so far is creating the vector cards and placing them on the stage. i need the script that does the following scenario:
when mouse over any of the 5 cards, the card moves and stops, when roll out, animation is reversed and card moves back to its original state.
The hit area should be the card whether the user clicks on the card during the motion tween or when it reaches the last frame where it stops.
It seems like a simple thing to do, it's been a while since i've worked on flash, let alone that i have no experience with CS3.
I'll appreciate your prompt reply and help
Screen-shot-2011-03-07-at-2.17.5.png
ASKER
Thanks for your reply,
Each card is a grouped vector and text (graphic only), created in Illustrator then imported to Flash. So if you can bear with me as i am not familiar with flash CS.. can you guide me step by step:
1- the cards are graphics only, shall i convert them each into buttons or movie clips?
2- what are the replaceable names in the script above?
3- what do you mean by "details of tween"?
thanks a million
Each card is a grouped vector and text (graphic only), created in Illustrator then imported to Flash. So if you can bear with me as i am not familiar with flash CS.. can you guide me step by step:
1- the cards are graphics only, shall i convert them each into buttons or movie clips?
2- what are the replaceable names in the script above?
3- what do you mean by "details of tween"?
thanks a million
No worries, here to help.
One question for you before we start, is the number of cards being displayed known?
One question for you before we start, is the number of cards being displayed known?
ASKER
Yes, just like the attachment.. 5 cards
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
How have you put these on stage? Library object or created in the as3?
Basically you need 2 event listeners and a tween, so something like
Var myTween: Tween =new tween(//details of tween);
MyTween.stop();
MenuitemA.addEventListener
MenuItemA.addEventListener
Function do_over_anim(e:mouseevent)
MyTween.play();
}
Function do_out_anim(e:mouseevent):
MyTween.revese();
}
Gmm