| Package | org.ffilmation.engine.core |
| Class | public class fElement |
| Inheritance | fElement flash.events.EventDispatcher |
| Subclasses | fCamera, 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
| Property | Defined 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 | ||
| Method | Defined by | ||
|---|---|---|---|
| fElement | |||
|
distanceTo(x:Number, y:Number, z:Number):Number
Returns the distance of this element to the given coordinate
| fElement | ||
|
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 | ||
| Constant | Defined 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 | ||
| controller | property |
controller:fEngineElementController [read-write]Assigns a controller to this element
Implementation public function get controller():fEngineElementController
public function set controller(value:fEngineElementController):void
| customData | property |
public var customData:ObjectAs elements are not defined as "dynamic", this property can be used to store extra info about this element at run-time.
| id | property |
public var id:StringThe string identifier of this element. Use it as input parameter to the scene's getElementById methods
| x | property |
public var x:NumberX coordinate fot this element
| xmlObj | property |
public var xmlObj:XMLThis 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.
| y | property |
public var y:NumberY coordinate for this element
| z | property |
public var z:NumberZ coordinate for this element
| fElement | () | constructor |
| distanceTo | () | method |
public function distanceTo(x:Number, y:Number, z:Number):NumberReturns the distance of this element to the given coordinate
Parametersx:Number |
|
y:Number |
|
z:Number |
Number — distance
|
| follow | () | method |
public function follow(target:fElement, elasticity:Number = 0):voidMakes element follow target element
Parameterstarget: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):voidMoves the element to a given position
Parametersx:Number — New x coordinate
|
|
y:Number — New y coordinate
|
|
z:Number — New z coordinate
|
| stopFollowing | () | method |
public function stopFollowing(target:fElement):voidStops element from following another element
Parameterstarget:fElement — The filmation element to be followed
|
| MOVE | constant |
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
| NEWCELL | constant |
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.