Discussion:
pause QT with Spacebar
(too old to reply)
mwh71057
2009-04-03 02:44:35 UTC
Permalink
I want to pause a QT movie with the space bar, one click stops it, one click
starts it. The script below only works while bar is being pressed. - Help!

on enterFrame me
sprite (1).movieRate = 1

if _key.keyPressed(49) then

if sprite (1).movieRate = 0 then
sprite (1).movieRate = 1
else
if sprite (1).movieRate = 1 then
sprite (1).movieRate = 0
end if
end if
end if
end

Second question:
If projector is made to a specific size ie 1024X768, is ther a way that the
projector can shrink to a smaller size if played on a monitor of 800X600?
Sean Wilson
2009-04-03 04:29:47 UTC
Permalink
Post by mwh71057
I want to pause a QT movie with the space bar, one click stops it, one click
starts it. The script below only works while bar is being pressed. - Help!
on enterFrame me
sprite (1).movieRate = 1
-- remove the line above - you are effectively starting it every time
#enterFrame fires
Post by mwh71057
if _key.keyPressed(49) then
if sprite (1).movieRate = 0 then
sprite (1).movieRate = 1
else
if sprite (1).movieRate = 1 then
sprite (1).movieRate = 0
end if
end if
end if
end
If projector is made to a specific size ie 1024X768, is ther a way that the
projector can shrink to a smaller size if played on a monitor of 800X600?
Read the docs for 'drawRect'
Ned
2009-04-03 16:56:09 UTC
Permalink
Post by mwh71057
if sprite (1).movieRate = 0 then
sprite (1).movieRate = 1
else
if sprite (1).movieRate = 1 then
sprite (1).movieRate = 0
end if
end if
can be wrote :

sprite (1).movieRate = not (sprite (1).movieRate)

hth
openspark
2009-04-03 12:30:37 UTC
Permalink
You can find a set of behaviors and a demo movie
http://nonlinear.openspark.com/tips/scripts/ which redimension the stage and
resize and reposition sprites so that the movie fits a smaller screen.

Note that the font size in text and field members will need to be adjusted,
too.
mwh710@hotmail.com
2009-04-03 19:32:58 UTC
Permalink
Wow, thanks for all of the help. I have one slight change, I misunderstood my
boss. He wants to pause the "Director movie (projector)", not the QT movie with
the space bar. Hit once for pause, once for start back up. Thanks again.
Loading...