on getPropertyDescriptionList me
list=[:]
addProp list,#pStartSpriteNum,[#comment: "First sprite of the group", #format: #integer, #default: 0]
addProp list,#pEndSpriteNum,[#comment: "Last sprite of the group", #format: #integer, #default: 0]
return list
end
on getbehaviordescription me
vDesc = "all sprites use this behavior load into scroe in sequence" & RETURN
vDesc = vDesc &"when click a sprite in group, the sprite will be on top"
return vDesc
end
on beginSprite me
pMySprite = sprite(me.spriteNum)
pLocZ = pMySprite.locZ
end
on mouseDown me
tClickLocZ = pLocZ
repeat with i = pStartSpriteNum to pEndSpriteNum
case TRUE of
(sprite(i).pLocZ < tClickLocZ): sprite(i).pLocZ = sprite(i).pLocZ
(sprite(i).pLocZ = tClickLocZ): sprite(i).pLocZ = pEndSpriteNum
(sprite(i).pLocZ > tClickLocZ): sprite(i).pLocZ = sprite(i).pLocZ - 1
end case
sprite(i).locZ = sprite(i).pLocZ
end repeat
updateStage
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA