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
ADOXtra
Password Field
ISO STUDIO Free Authoring Version
Narration Tool
Shadow Maker
Macromedia Director 8 Shockwave Studio- Illustrated Introductory
File Association and save
Button - De-Xploding behaviour
MPEG Xtra Controller Button
Cross-platform scripting differences: Sorted Lists
 

 

 

Behavior Group of Sprite Mover

Added on 6/16/2001

 

Compatibilities:
behavior D7 D8 D8_5 Mac PC

This item has not yet been rated

Author: Dietmar

Moves the sprite where the behavior is attached and upper sprites you specify the last sprite by channel number.

property spriteNum
property first
property lastSprite

on getPropertyDescriptionList me
  set pdList = [:]
  set ls = the currentSpriteNum + 1
  addProp pdList, #lastSprite, [#format:#integer,#default:ls,#comment:"Sprite-No. to the last sprite in group"]
  return pdList
end getPropertyDescriptionList

on beginSprite me
  first = me.spriteNum
end

on mouseDown me
  beginMouseLoc = the mouseLoc
  repeat while the mouseDown
    duringMouseLoc = the mouseLoc
    if duringMouseLoc <> beginMouseLoc then
      difMouseLoc = duringMouseLoc - beginMouseLoc
      beginMouseLoc = duringMouseLoc
      repeat with i = first to lastSprite
        sprite(i).loc = sprite(i).loc + difMouseLoc
      end repeat
      updateStage
    end if
  end repeat
end

 


Contact

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

Send e-mail