Listing 1
on beginSprite me
--get the member reference
pMember = sprite(spriteNum).member
--get the type
pType = pMember.type
--qt and digital video use the same controller
if pType = #digitalVideo then pType = #quickTimeMedia
--make sure we have a parent script for this type
if me.memberExists(pType && "Video Base") then
--set the ancestor
me.ancestor = script(pType && "Video Base").new()
--make it active
pActive = 1
else
--no parent so deactivate it
pACtive = 0
exit
end if
--container for general settings. Varies for each part
pInfo = [:]
--prep it
pInfo[#baseTempo] = the frameTempo
--call the ancestor to prepare the video
me.prepVideo()
--start it playing
me.doVideo(#play)
end