|
|
Initialize QuickTime Video (no white flash)
Added on 5/4/2001
|
This frame script/behavior combination virtually eliminates the annoying "white flash" seen when QT videos start playing on the Stage. It works by moving the video sprite offstage on beginSprite, starts it playing, then throws it back onto the stage.
-- Initialize QuickTime Video behavior
-- by Mark D. Chase
--
-- This frame script/behavior combination virtually eliminates
-- the annoying "white flash" seen when QT videos start
-- playing on the Stage. It works by moving the video sprite
-- offstage on beginSprite, starts it playing, then throws it
-- back onto the stage.
--
-- This behavior must be used in conjunction with the
-- Start Video frame script.
--
-- Free to copy and use, just give credit (and let me
-- know what you use it in!)
property mySprite
on beginSprite me
-- Relocate video sprite offstage so we don't see white flash
mySprite = me.spriteNum
sprite(mySprite).LocH = sprite(mySprite).LocH + 1000
end
on startVideo me
-- Start the video.
sprite(mySprite).movieRate = 1
-- Move the video sprite back onto the stage.
-- (Kinda hard to see it otherwise.)
sprite(mySprite).LocH = sprite(mySprite).LocH - 1000
end
-- Start QuickTime Video frame behavior
-- by Mark D. Chase
--
-- Triggers the startVideo handler in the
-- Initialize QuickTime video sprite behavior.
on exitFrame me
sendAllSprites(#startVideo)
end
|
|