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
Fade In Out Text
Timehouse Speech Xtra
Royalty Free Music from NEO Sounds
Flash Movie Controls
simFile Xtra
Exploding Text Prepare Movie
Ripple General Settings-Alphamania
Back Button - All In One
VdigXtra
Set WarpMode of a QTVR Sprite
 

 

 

Behavior Image Mover

Added on 9/24/2002

 

Compatibilities:
D8 D8_5 Mac PC Shockwave

This item has not yet been rated

Author: matt_brown_1 (website)

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

Send e-mail