Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Advanced Lingo for Games
DMFade
Set Rotation angle of a Flash Member
Simatrix Lingo Font
Wait for a DirectMedia CuePoint (Index ID as Reference)
Gang Buster
Video Status bar
Set Color properties of a vector cast member
Cool Control Button
General Purpose MP3 Parent
MediaMacros Xtras Mall
 

 

 

Behavior change LocZ

Added on 8/30/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

Rating:

Author: CarolGuo

Whebn you click a sprite in group, the sprite will be on top

--CREATE BY:Carol Guo
--when click a sprite in group, the sprite will be on top

property pStartSpriteNum
property pEndSpriteNum
property pLocZ
property pMySprite

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

 


Upload Provided by ABCUpload ASP

Contact

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

Fax - (206) 339-5833

Send e-mail