Ok, so playing a set time period then closing a sprite
doesn't sound that complicated but I swear it's more in depth!
First off, it's for a game so it's dependent on mouse clicks
not the time line. What I have is after a click a sprite member
changes to a second animated member, I got that done. I wan't that
animation to play for a set period of time then remove the
sprite(or at least move it off the stage) afterward. I have the
member change and the removal done but I can only do it instantly
on the mouse click, I'm looking for some type of script to delay
the two. Any Help is appreciated, ohh and I'm using Director MX
(not 2004) if that makes a difference. ~Mintmoose
The memory game that you can find at
does something similar. It waits a set amount of time before
swapping the member of a sprite back to what it was before the
mouse click. Perhaps the source code can inspire you.
It sounds like a perfect job for a timeout object. Perhaps
like the following will serve as a starting point (check the
on mouseUp me
-- swap sprite, etc.
t = timeout().new("delay" & string(me), 2000,
on mHideSprite me, aTimeout
if ilk(aTimeout, #timeout) then aTimeout.forget()
-- move sprite, swap member, ...
sprite(me.spriteNum).loc = point(10000, 10000)