Bust A Groove

Hey al i was wondring how to…Do the following…

Say a drawing was moving up a screen and when it is inside of a movieclip and you press a key say up and it will show an animation…

Hope i explained it right

Try this:

if (Key.isDown(Key.UP)) {
_root.animation._visible = true
}

Hope this helps!

yours,
h88

I know that code…But i want it so when it hits the movieclip and then you press the key it does the animatio…
Not play the animation right away…

Thanks anyWay try again if ya want

Ahh, u mean hitTest, i’ll try doing it now.

Thanks h88 you helped me alot…

So when ever i finish one of my games you will be the first to see any of them…
And some Credit.

Here u go:

if (myCircle.hitTest(_root.myWall)) {
trace("hit detected");
if (Key.isDown(Key.UP)) {
_root.animation._visible = true
}
}

Tell me now?

yours,
h88

 if (key.hitTest(_root.Wall)) {
    if (Key.isDown(Key.UP)) {
        _root.key.gotoAndPlay(2);
    }
}
{

For some Reson i would like to ask if you know that would be an accurate code
Would this nbe accurate…

Sorry, the above code was not correct, this should do it for u:

myCircle.onEnterFrame = function(){
if (this.hitTest(_root.myWall)) {
	if (Key.isDown(Key.UP)) {
		trace("key input detected");
	}
}
};

yours,
h88

Well actually i tried that just now and nothing happends…

You did’nt place the script correctly i assume, check the attachment, drag the ball into the wall, and press the “Up” Key, you will c an output. “key input detected”, change the trace command to ypur own and it should work!

yours,
h88

O.K i see what i did wrong i forgot to name my instances.(Stupid me)

But thanks man LOT I MEAN ALOT…

mAN IIM SO STUPID.

No problem. :slight_smile: