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
  controller : fEngineElementController
Assigns a controller to this element
fElement
  customData : Object
As elements are not defined as "dynamic", this property can be used to store extra info about this element at run-time.
fElement
  id : String
The string identifier of this element.
fElement
  x : Number
X coordinate fot this element
fElement
  xmlObj : XML
This is the XML node from the scene XML that generated 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
controllerproperty
controller:fEngineElementController  [read-write]

Assigns a controller to this element

Implementation
    public function get controller():fEngineElementController
    public function set controller(value:fEngineElementController):void
customDataproperty 
public var customData:Object

As elements are not defined as "dynamic", this property can be used to store extra info about this element at run-time.

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

xmlObjproperty 
public var xmlObj:XML

This is the XML node from the scene XML that generated this element. It is useful if you want to add custom attributes to specific instances of your elements, and access them later from your app. For example, you could add descriptions to objects, and then display those descriptions when the user rollOvers that object.

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.