This content has been marked as final. Show 3 replies
On Sat, 02 Sep 2006 10:46:31 GMT, mirianam posted in
> How do I modify the code of the "Rotation(time-based) behaviour" so
> that when it reaches 360 degrees (or 20 seconds) I can go to another
> frame of the movie?
I only have the D8.5.1 version to look at, but if it's the same as the
current version, you can monitor the behavior's myTicksLeft property. Just as
a test, I created the following behavior and dropped it on the same sprite
with the Rotation(time-based) behavior.
on exitFrame me
if sprite(me.spriteNum).myTicksLeft = 0 then
go the frame + 1
I only quickly scanned the behavior's comments, though. It's possible that
the author provided a method to do this without directly accessing the
Mark A. Boyd
If you only want this behavior to work for one full rotation of the
sprite then you can do this:
add a property to listing at the top of the behavior.
then in the on initialize me function add this as the last line:
startingTicks = myTicks + myRotationTime
then in the on Turn me function add this as the last line:
if startingTicks > the ticks then go to "new marker name"
where "new marker name" is the name of the marker that you want to jump
Adobe Community Expert
Thank you so very very much - you put me in the right direction.
As I have another sprite which actually starts the rotation I have used the following code and it works as I need it to.
on exitFrame me
if sprite(me.spriteNum).rotation = 360 then
go to "well_done"
I didn't realize that I could add another behaviour to the "minute" sprite and that it would be able to get the information from the "Rotation(time-based) behaviour. I must have tried putting this code everywhere except onto the "minute" sprite.
I tried modifying the rotation behaviour but it didn't work for me - will see if I can get it to work.
Thank you again