haha... wow dude -- if you need help with something that basic you've got a long way to go
there's two different ways to do a hit test:
if(SOMETHING.hitTest(somethingelse)){
//do something;
}
if(SOMETHING.hitTest(somethingElse._x, somethingElse._y, true)){
//do something
}
the first one only checks to see if SOMETHING touches even the edge of somethingElse, the second one test to see if SOMETHING touches the center of somethingElse
Ive been fiddling around and got things working to an extant but what I've hit another block. I need to know how to have it so as soon as the thing touches it happens. right now, if you don't release your mouse button when your over the object it doesn't work & you can pass right through it.
Also, I havent exactly used the above code, is that intended for the main stage or on the movie clip? what else am I missing?
heres an example of the code that "works" so far; (and its written on the main stage of frame 3)
player.onPress = function() {
this.startDrag();
};
player.onRelease = function() {
this.stopDrag();
if (this.hitTest(black1)) {
gotoAndStop(2);
}
};
"player" is the movie clip which is your "moving piece" and "black1" is an obstacle. both of which are movie clips (is that okay?) so when you hit and obstacle your supposed to 'loose' and are sent back to the beginning. get it?
If theres not enough here for you to know what Im talking about I understand, Ican tell you more or whatever