Packageorg.ffilmation.engine.core
Classpublic class fHole
InheritancefHole Inheritance flash.events.EventDispatcher

The fHole class stores information about holes in a plane. Doors and windows are fHoles. The class allows to open and close holes dynamically. However, they can't be created or removed. The holes in any plane are defined by its material.

See also

org.ffilmation.engine.core.fPlane.holes


Public Properties
 PropertyDefined by
  block : MovieClip
This is the element, if any, that is to be displayed when the hole is closed.
fHole
  index : Number
This is the index of this hole in the Array of holes of the fPlane.
fHole
  open : Boolean
Use this property to open/close a hole in your fPlane.
fHole
Public Constants
 ConstantDefined by
  CLOSE : String = "holeclose"
[static] The fHole.CLOSE constant defines the value of the type property of the event object for a holeclose event.
fHole
  OPEN : String = "holeopen"
[static] The fHole.OPEN constant defines the value of the type property of the event object for a holeopen event.
fHole
Property detail
blockproperty
public var block:MovieClip

This is the element, if any, that is to be displayed when the hole is closed. If the material didn't provide the block, this property will be null Use this property, for example, to attach a Mouse Event to a door so it can be opened when clicked.

indexproperty 
public var index:Number

This is the index of this hole in the Array of holes of the fPlane.

openproperty 
open:Boolean  [read-write]

Use this property to open/close a hole in your fPlane. The status of a hole affects both the rendering algorythm and the collision algorythm. Please note that if the material definition does not provide the graphic element (a door, for example) to "fill" the closed fHole, attempts to set this property to false won't work

Implementation
    public function get open():Boolean
    public function set open(value:Boolean):void

See also

Constant detail
CLOSEconstant
public static const CLOSE:String = "holeclose"

The fHole.CLOSE constant defines the value of the type property of the event object for a holeclose event. The event is dispatched when the hole is successfully closed

OPENconstant 
public static const OPEN:String = "holeopen"

The fHole.OPEN constant defines the value of the type property of the event object for a holeopen event. The event is dispatched when the hole is successfully open