Control loop times in swf file


hello:

i have sprite swf framecount 45.
how can control example loop 3 times , after stop
animation?t
what parameter have test?
thank


you test _currentframe property of flash sprite
and count how many times see 45.

something might job:

--------
property mycounter
property loopcount
property totalframes
property thissprite

on getpropertydescriptionlist
myproplist = [:]
myproplist.addprop(#loopcount,[#comment:"number of times
loop:",#format:#integer,#default:3,#range:[#min:1,#max:10]])
return myproplist
end

on beginsprite me
thissprite = me.spritenum
totalframes = sprite(thissprite)._totalframes
mycounter = 0
end

on exitframe me
if sprite(thissprite)._currentframe = totalframes
mycounter = mycounter + 1
end if
if mycounter = loopcount -- you're done
sprite(thissprite).stop() -- or sprite(thissprite).gotoandstop(1)
end if
end
----------

--
rob
_______
rob dillon
adobe community expert
http://www.ddg-designs.com
412-243-9119

http://www.macromedia.com/software/trial/


More discussions in Director Lingo


adobe

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support