Welcome to Virtual Tutorial World Guest!



Hit Test

 
Post new topic   Reply to topic    VTW Forum Index -> Actionscript
View previous topic :: View next topic  
Author Message
Please Register and Login to this forum to stop seeing this advertsing.





Tokens:


Posted:     Post subject:

Back to top
computergeek67
Administrator
Administrator


Joined: 31 Jul 2007
Posts: 144


Tokens: 147
Location: US

PostPosted: Fri Sep 28, 2007 12:26 pm    Post subject: Hit Test Reply with quote

To make a Hit test, you first need to make two objects, make them both Movie Clips and call them object1 and object2. Now on object1, paste this code:

Code:

onClipEvent(enterFrame){
if(this.hitTest(_root.object2)){
_root.gotoAndStop(2);
}
}



Now press Ctrl+Enter and test your flash. When object1 hits object2, it should go to frame 2.



_________________



Come to me if you have any questions
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    VTW Forum Index -> Actionscript All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Card File  Gallery  Forum Archive
Powered by phpBB © 2001, 2005 phpBB Group
Virtual Tutorial World ©2007-2008 computergeek67

Affiliates