Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Initialize QuickTime Video (no white flash)
Director 8.5 Studio
Blend Images
Multiple languages in the same movie.
rescale
Power Point Viewer
Play Soundfile
List Inspector 1.1 with Tree View
VolumeController
Making a simple game
 

 

 

Behavior Initialize QuickTime Video (no white flash)

Added on 5/4/2001

 

Compatibilities:
behavior D7 D8 D8_5 Mac PC

This item has not yet been rated

Author: mdchase

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

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail