|
Quicktime Movie Loops
Click here to download the sample file.
Import a Quicktime Movie
You should know the pixel size, frame rate, and number of frames. Choose File-Import...
Use one long movie, we will skip around it by pressing buttons. If you use more than one movie there will be a noticeable pause while Director is switching movies.
Scripts:
Frame 1 Score Behavior Script: on exitFrame go to the frame end
Start MOVIE Script --Must be a Movie Script global gogulch,gowitch,gohouse,g,w,h startMovie g = 2 w = 2 h = 2 gogulch=false gowitch=false gohouse=false end
Miss Gultch Button Behavior Script: global g,w,h,gowitch,gogulch,gohouse on mouseDown g = g+1 --count mouse clicks if g > 2 then g = 1 end if
if g = 1 then gogulch = true gowitch = false gohouse = false sprite(1).movieTime = 1 w = 2 --set the other button click counters back to start h = 2 end if if g = 2 then --2nd mouse click stops the movie gogulch = false sprite(1).movieRate = 0 end if end
on exitframe if gogulch = true then --run the movie sprite(1).movieRate = 1 if sprite(1).movieTime > 332 then sprite(1).movieTime = 1 end if end if end
Witch Button Behavior Script: global g,w,h,gowitch,gogulch,gohouse
on mouseDown w = w+1 --count mouse clicks if w > 2 then w = 1 end if if w = 1 then gogulch = false gowitch = true gohouse = false sprite(1).movieTime = 332 g = 2 --set the other button click counters back to start h = 2 end if
if w = 2 then --2nd mouse click stops the movie gowitch = false sprite(1).movieRate = 0 end if end
on exitframe if gowitch = true then sprite(1).movieRate = 1 if sprite(1).movieTime > 882 then sprite(1).movieTime = 332 end if end if end
House Button Behavior Script: global g,w,h,gowitch,gogulch,gohouse on mouseDown h = h+1 --count mouse clicks if h > 2 then h = 1 end if
if h = 1 then gogulch = false gowitch = false gohouse = true sprite(1).movieTime = 892 g = 2 --set the other button click counters back to start w = 2 end if
if h = 2 then --2nd mouse click stops the movie gohouse = false sprite(1).movieRate = 0 end if end
on exitframe if gohouse = true then sprite(1).movieRate = 1 if sprite(1).movieTime > 1250 then sprite(1).movieTime = 892 end if end if end |