Accessibility
 
Home > Products > Director > Support > Lingo, Behaviors and Parent Scripts
Macromedia Director Support Center - Lingo, Behaviors and Parent Scripts
Code listing

The following is a listing of the scripts contained in the example movie.

 
Send Type behavior

This script is attached to the member sprites.

-- Send Type behavior

-- This handler sends a message to the other sprites indicating the -- type of member the pointer is over. You attach this behavior to
-- a sprite containing a bitmap, shape, text, or field member.
on mouseEnter
    sendAllSprites(#displayType, the type of member the member of sprite the currentSpriteNum)
end
 
Display Type behavior

This script is attached to the Display Field member.

-- Display Type behavior

-- This handler displays the member type name in a field, based
-- on the symbol contained in the memberType parameter. You
-- attach this behavior to a field sprite.
on displayType me, memberType

    set currentSprite to the spriteNum of me

  -- Determines the name to display.
  case memberType of

        #shape:set the member of sprite currentSprite to "Shape icon"

        #bitmap: set the member of sprite currentSprite to "Bitmap icon"

        #richText: set the member of sprite currentSprite to "Text icon"

        #field:	 set the member of sprite currentSprite to "Field icon"
        
    end case

end