From: gtrufitt on
Hi, I am using flash SWF animations within my director movie, with markers
seperating each one. How do I loop the playback so that the full flash
animation plays and then moves to another marker?

Thanks, Gareth

From: Sean Wilson on
You add a frameScript to monitor the Flash file for completion before
allowing the playhead to continue. Something like (watch for
unintentional line-breaks):
-- warning: will only work for Flash sprites whose animation is on _root,
-- and not for one where the animations is buried in a movieClip
property flashSprite
property flashFrameCount
property bEnabled

on isOKToAttach me, sType, sNum
return (sType = #script)
end

on getPropertyDescriptionList
lRange = []
repeat with c = 1 to the lastChannel
if sprite(c).member.type = #flash then lRange.append(c)
end repeat
pdl = [:]
pdl[#flashSprite] = [#comment: "Flash sprite channel:", #format:
#integer, #default: 0, #range: lRange]
return pdl
end

on beginSprite me
bEnabled = 1
flashSprite = sprite(flashSprite)
tMember = flashSprite.member
if tMember.type <> #flash then
bEnabled = 0
exit
end if
flashFrameCount = tMember.frameCount
end

on exitFrame me
if bEnabled then
if (flashSprite.frame = flashFrameCount) then
tFrame = _movie.frame + 1
else
tFrame = _movie.frame
end if
_movie.go(tFrame)
end if
end