The McLeodGaming forums were permanently closed on April 30th, 2020. You are currently viewing a read-only archive.
View unanswered posts | View active topics It is currently Fri May 15, 2020 5:39 am

Forum rules


IMPORTANT

This Forum is for Flash related questions ONLY! Do not ask questions about spriting, Game Maker, Photoshop, or anything else not related to Flash.



 [ 5 posts ] 
[Question] unhittest 
Author Message
User avatar

Joined: Tue Oct 28, 2008 1:37 pm
Posts: 300
is there anyway how i could unhittest something if you know what im talking about

_________________
Image
super smash bros blits(working title)-1% done
new flash game


Last edited by bowser guy on Wed Aug 12, 2009 7:33 am, edited 1 time in total.



Sun Aug 09, 2009 3:53 pm
User avatar

Joined: Tue Oct 28, 2008 1:37 pm
Posts: 300
any help

_________________
Image
super smash bros blits(working title)-1% done
new flash game


Mon Aug 10, 2009 7:32 am
User avatar

Joined: Mon Aug 11, 2008 8:43 am
Posts: 209
Location: Here.
If you are using AS2:

onClipEvent (enterFrame) {
if (!this.hitTest(_root.[instance name of one of the movieclips])) {
_root.gotoAndStop(1);
}
}

The "!" basically makes the code do the opposite of what it would do without the "!". You can switch _root.gotoAndStop(1); to what you want to happen when the two objects don't hit.

With AS3, if you are using it, this page should inform you of what to do. (I don't know anything about AS3).

_________________
Image


Wed Aug 12, 2009 2:35 pm
User avatar

Joined: Wed Apr 29, 2009 11:28 pm
Posts: 323
Location: Nowhere, Antarctica
Gender: Anime Girl
Skype: Evilagram
Code:
onClipEvent (enterFrame) {
if (this.hitTest(_root.movieclip == false)) {
_root.gotoAndStop(1);
}
}


[] these types of brackets should not be used that way, and will probably lead to errors.

I also changed it to == false, because I frankly never trusted !.

_________________
Image

Style [Stayl] (n) - One's unique and personal method of defacing a perfectly good piece of paper.

READ THIS: http://ipgd.freehostia.com/copypasta.html


Wed Aug 19, 2009 2:35 pm
User avatar

Joined: Tue Oct 28, 2008 1:37 pm
Posts: 300
thanks guys

_________________
Image
super smash bros blits(working title)-1% done
new flash game


Sun Aug 30, 2009 4:50 pm
Display posts from previous:  Sort by  
 [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF.