Packageorg.ffilmation.engine.core
Classpublic class fElement
InheritancefElement Inheritance flash.events.EventDispatcher
SubclassesfCamera, fLight, fRenderableElement

The fElement class defines the basic structure of anything in a filmation Scene

All elements ( walls, floors, lights, cameras, etc ) inherit from fElement.

The fElement provides basic position and movement functionality

YOU CAN'T CREATE INSTANCES OF THIS OBJECT



Public Properties
 PropertyDefined by
  id : String
The string identifier of this element.
fElement
  x : Number
X coordinate fot this element
fElement
  y : Number
Y coordinate for this element
fElement
  z : Number
Z coordinate for this element
fElement
Public Methods
 MethodDefined by
  
fElement(defObj:XML, scene:fScene)
fElement
  
distanceTo(x:Number, y:Number, z:Number):Number
Returns the distance of this element to the given coordinate
fElement
  
follow(target:fElement, elasticity:Number = 0):void
Makes element follow target element
fElement
  
moveTo(x:Number, y:Number, z:Number):void
Moves the element to a given position
fElement
  
stopFollowing(target:fElement):void
Stops element from following another element
fElement
Public Constants
 ConstantDefined by
  MOVE : String = "elementmove"
[static] The fElement.MOVE constant defines the value of the type property of the event object for a elementmove event.
fElement
  NEWCELL : String = "elementnewcell"
[static] The fElement.NEWCELL constant defines the value of the type property of the event object for a elementnewcell event.
fElement
Property detail
idproperty
public var id:String

The string identifier of this element. Use it as input parameter to the scene's getElementById methods

xproperty 
public var x:Number

X coordinate fot this element

yproperty 
public var y:Number

Y coordinate for this element

zproperty 
public var z:Number

Z coordinate for this element

Constructor detail
fElement()constructor
public function fElement(defObj:XML, scene:fScene)Parameters
defObj:XML
 
scene:fScene
Method detail
distanceTo()method
public function distanceTo(x:Number, y:Number, z:Number):Number

Returns the distance of this element to the given coordinate

Parameters
x:Number
 
y:Number
 
z:Number

Returns
Number — distance
follow()method 
public function follow(target:fElement, elasticity:Number = 0):void

Makes element follow target element

Parameters
target:fElement — The filmation element to be followed
 
elasticity:Number (default = 0) — How strong is the element attached to what is following. 0 Means a solid bind. The bigger the number, the looser the bind.
moveTo()method 
public function moveTo(x:Number, y:Number, z:Number):void

Moves the element to a given position

Parameters
x:Number — New x coordinate
 
y:Number — New y coordinate
 
z:Number — New z coordinate
stopFollowing()method 
public function stopFollowing(target:fElement):void

Stops element from following another element

Parameters
target:fElement — The filmation element to be followed
Constant detail
MOVEconstant
public static const MOVE:String = "elementmove"

The fElement.MOVE constant defines the value of the type property of the event object for a elementmove event. The event is dispatched when the element moves. Allows elements to track and follow other elements

NEWCELLconstant 
public static const NEWCELL:String = "elementnewcell"

The fElement.NEWCELL constant defines the value of the type property of the event object for a elementnewcell event. The event is dispatched when the element moves into a new cell.