PDA

View Full Version : If an object is off stage...


p0c
10-30-2007, 02:33 PM
All i am trying to do is add a simple event that makes "tri" invisible when it is off stage. I attmpted the following script...

if (tri.x==<0){
trace("Off Screen")
}

...and it throws up a load of errors. I thought this is all that it would take. Also I was going to simply make "tri" alpha=0 when off the stage, is there a better way? (bearing in mind that it will return to the stage. It is a elastic tween event that goes over the edges for a split second)

Thanks guys

stompwampa
10-30-2007, 02:35 PM
close.


if (tri.x <= 0)
{
trace("Off Screen");
}

p0c
10-30-2007, 02:42 PM
Cheers for that, at this moment i just added a mc in the way the same colour as the background!! :o