Featured FLA
» Author: Nitin Tikhe
» Title: Cart
» Description: This Animation Tut is a fun and useful for kids below 15 years. Watch the Flag, Doors, Stick and Horse movements.
» More by Nitin Tikhe
Featured Site
» Posted in the Flash Kit Links section
» Title: Banana Swimwear
» Description: This is a banana swim wear interactive catalog we designed and animated in Flash
Create two movieclips, and do whatever you want with them. Just so I can show you how they work in hit test coding, I will call them mc1 and mc2. In mc1, type the following:
onClipEvent (enterFrame) {
if (this.hitTest(_root.mc2)) {
_root.
}
}
Right now it will only detect the contact, but nothing will happen. If you want it to go to frame 2 of mc1 after contact, give frame 2 of the mc a frame label, for instance, Action. (to give frame labels, just select the frame and in the properties type in frame label Action) Then type this in after the last _root.:
GotoAndStop("Action");
Now, put everything you've learned into a game, or at least be happy with whatever actionscript you copied and then closed this tutorial.