### clickMode

Syntax: | `the clickMode of sprite` `whichFlashSprite`
| `the clickMode of member` `whichFlashMember`
Type: | Cast member property; sprite property
Description: | This property controls when the Flash movie sprite detects mouse click events (mouseUp and mouseDown) and when it detects rollovers (mouseEnter, mouseWithin, and mouseLeave). The `clickMode` property can have these values:

| `#boundingBox` Mouse click events are detected anywhere within the sprite's bounding rectangle. Rollovers are detected at the sprite's boundaries.
| `#opaque` If the sprite's ink effect is set to Background Transparent, mouse click events are detected only when the pointer is over an opaque portion of the sprite. Rollovers are detected at the boundaries of the opaque portions of the sprite. If the sprite's ink effect is anything other than Background Transparent, this setting has the same effect as the `#boundingBox` setting.
| `#object` Mouse click events are detected when the mouse pointer is over any filled (non-background) area of the sprite. Rollovers are detected at the boundaries of any filled area. This setting works regardless of the sprite's ink effect.

| The `clickMode` property can be tested and set. The default is `#opaque`.
Example: | This sprite script checks to see if the sprite, which is specified with an ink effect of Background Transparent, is currently set to be rendered direct to stage. If the sprite is not rendered direct to stage, the sprite's `clickMode` is set to `#opaque`. Otherwise (because ink effects are ignored for Flash movie sprites that are rendered direct to stage), the sprite's `clickMode` is set to `#boundingBox`.

    on beginSprite me
    	if the directToStage of sprite the spriteNum of me = FALSE then
    		set the clickMode of sprite the spriteNum of me = #opaque
    	else
    		set the clickMode of sprite the spriteNum of me = #boundingBox
    	end if
    end

Previous | Next