| Package | com.mosesSupposes.bitmap |
| Class | public class InteractivePNG |
| Inheritance | InteractivePNG flash.display.MovieClip |
No special instructions are needed to use this class if the clip's artwork does not change during play, simply use this class in place of MovieClip. If the MovieClip animates or changes, you can call drawBitmapHitArea() at any time to refresh the hit area.
| Property | Defined by | ||
|---|---|---|---|
| alphaTolerance : uint
Set to 0 to detect hit on any pixel that is not completely transparent, or 255
detect only completely opaque pixels.
| InteractivePNG | ||
| interactivePngActive : Boolean [read-only]
Whether this MovieClip is using InteractivePNG functionality.
| InteractivePNG | ||
| Method | Defined by | ||
|---|---|---|---|
|
InteractivePNG functionality is active from instantiation, but can
be turned off at any time by calling disableInteractivePNG().
| InteractivePNG | ||
|
disableInteractivePNG():void
Turns off the functionality of this class.
| InteractivePNG | ||
|
drawBitmapHitArea(event:Event = null):void
A hit-detection bitmap is generated on the first mouse interaction with the clip,
but you may need to call this method or use it as an ENTER_FRAME handler to refresh
the hit area if the clip's shape changes during play.
| InteractivePNG | ||
|
enableInteractivePNG():void
Restores functionality of this class if it was previously disabled.
| InteractivePNG | ||
| alphaTolerance | property |
alphaTolerance:uint [read-write]Set to 0 to detect hit on any pixel that is not completely transparent, or 255 detect only completely opaque pixels.
The default value is 128.
public function get alphaTolerance():uint
public function set alphaTolerance(value:uint):void
| interactivePngActive | property |
interactivePngActive:Boolean [read-only]Whether this MovieClip is using InteractivePNG functionality.
Functionality is enabled by default from instantiation. Only returns
false if disableInteractivePNG() has been called. (Note that setting
hitArea or mouseEnabled may result in a disable
in certain cases, see documentation in the class file for more information
on this topic.)
public function get interactivePngActive():Boolean
See also
| InteractivePNG | () | constructor |
public function InteractivePNG()InteractivePNG functionality is active from instantiation, but can be turned off at any time by calling disableInteractivePNG().
| disableInteractivePNG | () | method |
public function disableInteractivePNG():void
Turns off the functionality of this class. Note that setting
hitArea or mouseEnabled may result in
a disable in certain cases (see documentation in the class file
for more information on this topic).
See also
| drawBitmapHitArea | () | method |
public function drawBitmapHitArea(event:Event = null):voidA hit-detection bitmap is generated on the first mouse interaction with the clip, but you may need to call this method or use it as an ENTER_FRAME handler to refresh the hit area if the clip's shape changes during play.
Parametersevent:Event (default = null) — Provided so this method can be used as an event handler with no extra work.
|
| enableInteractivePNG | () | method |
public function enableInteractivePNG():void
Restores functionality of this class if it was previously disabled.
This method will have no effect if hitArea has been set.
See also