Starting, then stopping, then starting, and then stopping...

Starting, then stopping, then starting, and then stopping...

Post by gregmax1 » Fri, 24 Mar 2006 06:19:03


With an onClipEvent, how would make it start and then stop multiple times? For
example, let's say my character moves at this space. A setInterval begins only
once! And when the character moves out of the space, the interval is cleared
(erased). Then lets say he decides to walk on the same space again, then off,
then on, then off, etc.

This is the only code I can think of for this sort of thing:

if(!once ne '') {
//do this
once = 1;
}
else
{
//do this
once = '';
}
 
 
 

Starting, then stopping, then starting, and then stopping...

Post by gregmax1 » Fri, 24 Mar 2006 06:26:29

Oops, typo in the script I wrote. It should be:

if(!once ne ''){

once = '';

} else {

once = 1;

}

Would this make it loop through again, again, again, and again, etc.