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
Generic behavior to change System Desktop Icons
27 Sum Game-Numbers
Video Status bar
PrintF in Lingo
ADOXtra Lite
Mastering Macromedia Director 6
Index Xtra
Inspect
dmm_window
Useful list functions
 

 

 

Behavior Drag around-Alphamania

Added on 6/10/1999

 

Compatibilities:
D6_5 D7 D8 Mac PC Script

Required Xtras:
Alphamania
Effector Set I for Alphamania

This item has not yet been rated

Author: MediaLab (website)

Requires Effector Set 1 Behavior Support Scripts.

Property partner,partnerExists

on getPropertyDescriptionList
  set pList=[:]
  addProp pList,#partner,[format:#integer,
                             comment:"Also Drag Sprite#:",
                             Default:0]
  
  return pList
end

on beginSprite me
  set partnerExists=((partner >0) and (partner<121))
end

on mouseDown me
  dragAround(me)
end

on dragAround me
  set s=the spriteNum of me
  set offH = the mouseH - the locH of sprite s
  set offV = the mouseV - the locV of sprite s
  if partnerExists then
    set offH2= the mouseH - the locH of sprite partner
    set offV2= the mouseV - the locV of sprite partner
  end if
  repeat while the mouseDown
    set mh=the mouseH
    set mv=the mouseV
    set the locH of sprite s=mh - offH
    set the locV of sprite s=mv - offV
    if partnerExists then
      set the locH of sprite partner = mh - offH2
      set the locV of sprite partner = mv - offV2
    end if
    updateStage
  end repeat
end

 


Contact

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

Send e-mail