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
Wait for DigitalVideo Cuepoint
ResolutionX Xtras
Lingo-An Advanced Guide to Directors Scripting Language
File Save Button
[S] mouse->sprite vector behaviour
HJ Install
Play different Movies For Different Game Levels
RoboDemo Review
Puzzling!
Flip Sprite - Make a sprite appear to rotate in 3-D space.
 

 

 

Behavior Move To Top

Added on 7/8/1999

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

Rating:

Author: MediaMacros (website)

This behavior uses the LocZ property to move the clicked sprite to the top of other sprites using the behavior. This works well with puzzles, drag behaviors, cards, etc.

--Copyright 1999 Chuck Neal
--chuck@mediamacros.com
--If you find this code helpful, send me an e-mail and let me know.  :-)

property spriteNum

global topSprite

on beginSprite me
  if topSprite = void then topSprite = spriteNum
  if topSprite < spriteNum then topSprite = spriteNum
end

on endSprite me
  sprite(spriteNum).locZ = spriteNum
end

on mouseDown me
  topSprite = topSprite + 1
  sprite(spriteNum).locZ = topSprite
end

on getPropertyDescriptionList me
  return "This behavior uses the LocZ property to move the clicked sprite to the top of other sprites using the behavior.  This works well with puzzles, drag behaviors, cards, etc."
end

 


Contact

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

Send e-mail