Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Wait for a MouseClick or Keypress
Mastering Macromedia Dreamweaver 3
Set Linked Property of a Animated Gif Cast member
Font Freak
NTI CD Maker
Dual Button With Rollover Effect
Set ButtonsEnabled Property of a Flash Sprite
Grabbing the Stage (D7)
Sprite Stick To Mouse Cursor
Buddy API
MediaMacros Xtras Mall
 

 

 

Behavior Pass handler to next Sprite

Added on 10/24/2003

 

Compatibilities:
D7 D8 D8_5 D9 Mac PC Shockwave

This item has not yet been rated

Author: MediaMacros (website)

Sometimes in Director you may need a sprite to catch an event and then pass the information down to the next sprite that is able to receive it. Adding this to your first sprite lets it send the message to the next relevant sprite for processing. This example uses mouseUp but can be modified to use any handler.

--Copyright 2003 MediaMacros, Inc & Chuck Neal

property spriteNum

on mouseUp me
  repeat with x = (spriteNum - 1) down to 1
    --check the sprite
    if (the mouseLoc).inside(sprite(x).rect) then
      sList = sprite(x).scriptInstanceList
      if sList.count = 0 then nextRepeat
      --check the scripts
      repeat with s in sList
        h = s.handlers()
        if h.getOne(#mouseUp) > 0 then
          sendSprite(x, #mouseUp)
          exit
        end if
      end repeat
    end if
  end repeat
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