PDA

View Full Version : [AS1] ball game problem


marco66
01-23-2004, 04:07 AM
Hi all,
In attached .fla, you find a ball game I'm developping.
My problem is that I can't put the obstacle (the grey bar) as part of the game.
Once the ball hits below the bar, it should go back down, while if it bounces over
the bar, it should keep on bouncing up. Obviously, on both sides of the bar, game should
go on normally.
any clue?
thanks
Marco

hswaseer
01-24-2004, 06:40 AM
You have to apply hit_test function.... and you have to do something like this in your movie



onClipEvent(enterFrame)
{

if(_root.ball.hitTest(_root.bar))
{
_root.ball._y -=151;
}
else
{
_root.ball._y +=3;
}
}


Can't open your file .... I am using flash 5....

Or

Send the problem code through this forum

HS

Disjuku
01-25-2004, 12:48 AM
if the file is in flash MX then why on earth is this question posted in the flash 4 and 5 forum? *sighs*, some people amaze me :)

marco66
01-26-2004, 02:49 AM
Originally posted by Disjuku
if the file is in flash MX then why on earth is this question posted in the flash 4 and 5 forum? *sighs*, some people amaze me :)

'cause, dear Disjuku, the .fla file is a MX file, but the final movie should be in flash 5. I hope not to have amazed you too much...:)

Disjuku
01-26-2004, 03:40 AM
cant you make the .fla in flash 5?

marco66
01-26-2004, 04:01 AM
Originally posted by Disjuku
cant you make the .fla in flash 5?


here you are.
thanks

hswaseer
01-26-2004, 11:57 PM
hi

Do have a look at this and let me know if this is what you want...

The file is attached..

I have add the code in the ost1 movie symbol

HS