Packageorg.ffilmation.engine.core
Classpublic class fRenderableElement
InheritancefRenderableElement Inheritance fElement Inheritance flash.events.EventDispatcher
SubclassesfBullet, fObject, fPlane

The fRenderableElement class defines the basic interface for visible elements in your scene.

Lights are NOT considered visible elements, therefore don't inherit from fRenderableElement

YOU CAN'T CREATE INSTANCES OF THIS OBJECT



Public Properties
 PropertyDefined by
  castShadows : Boolean = true
Boolean value indicating if this object casts shadows.
fRenderableElement
  container : MovieClip

WARNING!!!: This property only exists when the scene is being rendered and the graphic elements have been created.

fRenderableElement
 Inheritedcontroller : fEngineElementController
Retrieves controller from this element
fElement
 InheritedcustomData : Object
As elements are not defined as "dynamic", this property can be used to store extra info about this element at run-time.
fElement
  flashClip : MovieClip
A reference to the library movieclip that was attached to create the element, so you can acces methods inside, nested clips or whatever
fRenderableElement
 Inheritedid : String
The string identifier of this element.
fElement
  receiveLights : Boolean = true
Boolean value indicating if this object receives lighting.
fRenderableElement
  receiveShadows : Boolean = true
Boolean value indicating if this object receives shadows.
fRenderableElement
  solid : Boolean = true
Boolean value indicating if this object collides with others.
fRenderableElement
 Inheritedx : Number
X coordinate fot this element
fElement
 InheritedxmlObj : XML
This is the XML node from the scene XML that generated this element.
fElement
 Inheritedy : Number
Y coordinate for this element
fElement
 Inheritedz : Number
Z coordinate for this element
fElement
Public Methods
 MethodDefined by
  
call(what:String, param:* = null):void
Calls a function of the base clip
fRenderableElement
  
Mouse management
fRenderableElement
 Inherited
distanceTo(x:Number, y:Number, z:Number):Number
Returns the distance of this element to the given coordinate
fElement
  
Mouse management
fRenderableElement
 Inherited
follow(target:fElement, elasticity:Number = 0):void
Makes element follow target element
fElement
  
gotoAndPlay(where:*):void
Passes the stardard gotoAndPLay command to the base clip of this element
fRenderableElement
  
gotoAndStop(where:*):void
Passes the stardard gotoAndStop command to the base clip of this element
fRenderableElement
  
hide():void
Makes element invisible
fRenderableElement
 Inherited
moveTo(x:Number, y:Number, z:Number):void
Moves the element to a given position
fElement
  
show():void
Makes element visible
fRenderableElement
 Inherited
stopFollowing(target:fElement):void
Stops element from following another element
fElement
Public Constants
 ConstantDefined by
  HIDE : String = "renderableElementHide"
[static] The fRenderableElement.HIDE constant defines the value of the type property of the event object for a renderableElementHide event.
fRenderableElement
 InheritedMOVE : String = "elementmove"
[static] The fElement.MOVE constant defines the value of the type property of the event object for a elementmove event.
fElement
 InheritedNEWCELL : String = "elementnewcell"
[static] The fElement.NEWCELL constant defines the value of the type property of the event object for a elementnewcell event.
fElement
  SHOW : String = "renderableElementShow"
[static] The fRenderableElement.SHOW constant defines the value of the type property of the event object for a renderableElementShow event.
fRenderableElement
Property detail
castShadowsproperty
public var castShadows:Boolean = true

Boolean value indicating if this object casts shadows. You can change this value dynamically Any element in your XML can be given a castShadows="false|true" attribute in its XML definition

containerproperty 
public var container:MovieClip

WARNING!!!: This property only exists when the scene is being rendered and the graphic elements have been created. This happens when you call fEngine.showScene(). Trying to access this property before the scene is shown ( to attach a Mouse Event for example ) will throw an error.

The container is the base MovieClip that contains everything. If you want to add Mouse Events to your elements, use this property. Camera occlusion will be applied: this means that if this element was occluded to show the camera position, its events are disabled as well so you can click on items behind this element.

The container is defined as MovieClip because MovieClips are "dynamic" and properties can be created into them. The container for each element will have two properties:

fElementId: The ID for this element
fElement: A pointer to the fElement this MovieClip represents

These properties will be useful when programming MouseEvents. Using them, you will be able to access the class from an Event listener attached to the MovieClip

flashClipproperty 
public var flashClip:MovieClip

A reference to the library movieclip that was attached to create the element, so you can acces methods inside, nested clips or whatever

receiveLightsproperty 
public var receiveLights:Boolean = true

Boolean value indicating if this object receives lighting. You can change this value dynamically. Any element in your XML can be given a receiveLights="false|true" attribute in its XML definition

receiveShadowsproperty 
public var receiveShadows:Boolean = true

Boolean value indicating if this object receives shadows. You can change this value dynamically Any element in your XML can be given a receiveShadows="false|true" attribute in its XML definition

solidproperty 
public var solid:Boolean = true

Boolean value indicating if this object collides with others. Any element in your XML can be given a solid="false|true" attribute in its XML definition. When a character moves to a position that overlaps another element, if will trigger either the fCollide or the fWalkover Events, depending on the solid property for that element.

See also

Method detail
call()method
public function call(what:String, param:* = null):void

Calls a function of the base clip

Parameters
what:String — Name of the function to call
 
param:* (default = null) — An optional extra parameter to pass to the function
disableMouseEvents()method 
public function disableMouseEvents():void

Mouse management

enableMouseEvents()method 
public function enableMouseEvents():void

Mouse management

gotoAndPlay()method 
public function gotoAndPlay(where:*):void

Passes the stardard gotoAndPLay command to the base clip of this element

Parameters
where:* — A frame number or frame label
gotoAndStop()method 
public function gotoAndStop(where:*):void

Passes the stardard gotoAndStop command to the base clip of this element

Parameters
where:* — A frame number or frame label
hide()method 
public function hide():void

Makes element invisible

show()method 
public function show():void

Makes element visible

Constant detail
HIDEconstant
public static const HIDE:String = "renderableElementHide"

The fRenderableElement.HIDE constant defines the value of the type property of the event object for a renderableElementHide event. The event is dispatched when the elements is hidden via the hide() method

SHOWconstant 
public static const SHOW:String = "renderableElementShow"

The fRenderableElement.SHOW constant defines the value of the type property of the event object for a renderableElementShow event. The event is dispatched when the elements is shown via the show() method