This script moves a set of images across the stage
-- Image Mover
-- (c) 2002 Matt Brown
-- www.flatspinmedia.com
property pTickCount
property pWait
property pInitialize
property pLastTimer --holds timer value at start of wait
global gImage -- number of image we are on
on beginsprite me
gImage = 1
pWait = FALSE
pInitialize = FALSE
end
on exitframe me
if not pInitialize then
if sprite(me.spritenum).loch > 397 and sprite(me.spritenum).loch < 402 then
pWait = TRUE
pInitialize = TRUE
pLastTimer = the timer
else
pWait = FALSE
end if
end if
--
if pWait = TRUE then
if (the timer - pLastTimer) < 60*2.5 then -- (2.5) = seconds to wait
nothing
else
pWait = FALSE
pInitialize = FALSE
sprite(me.spritenum).loch = sprite(me.spritenum).loch + 4 -- *
updatestage
end if
else
sprite(me.spritenum).loch = sprite(me.spritenum).loch + 4 -- *
updatestage
-- ## Now check for image swap ## --
if sprite(me.spritenum).loch > 850 then -- **
if gImage = 5 then -- (5) = number of images to cycle
gImage = 1
else
gImage = gImage + 1
end if
NewImage = member("loopimage" & gImage)
sprite(me.spritenum).member = NewImage
sprite(me.spritenum).loch = -50
updatestage
end if
end if
end
-- images must be named loopimage1, loopimage2, ... loopimage5
-- * change the 4 to change the speed of movement.
-- ** the 850 is the position you want the image to be swaped at
-- (c) 2002 Matt Brown
-- www.flatspinmedia.com
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA