Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Complete Idiots Guide to Macromedia Flash 5
Generic Slider w/Text
Custom Scroll Bars
Scroll Thumb
Hex to integer
ShapeWindow Xtra
CatCube
cXtraTransitions
Change ShapeType of a Shape Sprite
Game protector
MediaMacros Xtras Mall
 

 

 

Behavior Sprite Group Movement behavior

Added on 6/10/1999

 

Compatibilities:
behavior D6_5 Mac PC

This item has not yet been rated

Author: RettCrocker

Sprite Group Movement behavior

property spriteNum
property pGroupName, pMouseLoc

on mouseDown me
  set pMouseLoc = point(the mouseH, the mouseV)
  add the actorList, me
end

on mouseUp me
  deleteOne the actorList, me
end

on mouseUpOutside me
  deleteOne the actorList, me
end

on stepFrame me
  set lNewLoc = point(the mouseH, the mouseV)
  set lOffset = lNewLoc - pMouseLoc
  set pMouseLoc = lNewLoc
  sendAllSprites(#moveMyself_SGM, pGroupName, lOffset)
end

on moveMyself_SGM objRef, lPassedGroup, lOffset
  if lPassedGroup = pGroupName then
    set the loc of sprite spriteNum = (the loc of sprite spriteNum) + lOffset
  end if
end

on getPropertyDescriptionList
  set description = [:]
  addProp description,#pGroupName,[#default:"", #format:#string,#comment:"Group Name:"]
  return description
end

on getBehaviorDescription
  set lText = ""
  put "--======= Sprite Group Movement behavior =======--" & RETURN after lText
  put "This behavior, allows multiple sprites to move as if " after lText
  put "they are one.  Each sprite with this behavior and the " after lText
  put "same group name will move together whenever clicked " after lText
  put "and dragged.  Try it.  You"ll see." & RETURN & RETURN after lText
  put "As always, if you use this behavior I would " after lText
  put "like a mention in your credits.  Enjoy." & RETURN & RETURN after lText
  put "--== © Rett Crocker 1997" & RETURN after lText
  put "    --==  rett@zapgun.com" & RETURN after lText
  put "        --==  www.zapgun.com" & RETURN after lText
  return lText
end  

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail