Chrusion
gold plated 3D
mdoyle,
Would you care to see what I'm doing wrong with this Lingo script?
The more interesting thing is that the script below that I wrote works just fine. I simply copy/pasted to the above and modified some variable names.
Anyway, thanks.
Would you care to see what I'm doing wrong with this Lingo script?
Code:
-- the goal for this script is that after all the motions are "cropped", that
-- the 3D sprite will just go ahead and loop play this segment of the animation
-- after the script ends. Not unless something more needs to be done.
on beginSprite me
pMember = sprite(me.spriteNum).member -- reference the cast member of this sprite
mCount = pMember.motion.count -- get how many motions are in the model
-- cycle thru all motions, set their play range to loop the last
-- 3.33 seconds at the end of the animation
repeat while mCount > 1
motionName = pMember.motion(mCount).name -- get the name of the motion
-- this is where the object (I assume it's the keyframeplayer) isn't found
-- and failing the script.
pMember.model(mCount).keyframePlayer.play(motionName, 1, 50333, 53333, 1)
mCount = mCount - 1
end repeat
end
The more interesting thing is that the script below that I wrote works just fine. I simply copy/pasted to the above and modified some variable names.
Code:
property pMember
global playTime, scrub -- these obviously arrive from other scripts
on beginSprite me
pMember = sprite(me.spriteNum).member
end
on exitFrame me
mScrub
end
on mScrub me
motions = pMember.model.count
if scrub then
repeat while motions > 1
pMember.model(motions).keyframePlayer.currentTime = playTime
motions = motions - 1
end repeat
end if
end
Anyway, thanks.