Packageorg.ffilmation.engine.elements
Classpublic class fCharacter
InheritancefCharacter Inheritance fObject Inheritance fRenderableElement Inheritance fElement Inheritance flash.events.EventDispatcher

A Character is a dynamic object in the scene. Characters can move and rotate, and can be added and removed from the scene at any time. Live creatures and vehicles are the most common uses for the fCharacter class.

There are other uses for fCharacter: If you want a chair to be "moveable", for example, you will have to make it a fCharacter.

You can add the parameter dynamic="true" to the XML definition for any object you want to be able to move later. This will force the engine to make that object a Character.

The main reason of having different classes for static and dynamic objects is that static objects can be added to the light rendering cache along with floors and walls, whereas dynamic objects (characters) can't.

Don't use this class to implement bullets. Use the fBullet class.

YOU CAN'T CREATE INSTANCES OF THIS ELEMENT DIRECTLY.
Use scene.createCharacter() to add new characters to an scene.

See also

org.ffilmation.engine.core.fScene.createCharacter()


Public Properties
 PropertyDefined by
 InheritedcastShadows : Boolean = true
Boolean value indicating if this object casts shadows.
fRenderableElement
 Inheritedcontroller : fEngineElementController
Assigns a controller to this element
fElement
 InheriteddefinitionID : String
The definition ID for this fObject.
fObject
 InheritedflashClip : 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
 Inheritedheight : Number
The height in pixels of an imaginary cilinder enclosing the object.
fObject
 Inheritedid : String
The string identifier of this element.
fElement
 Inheritedorientation : Number
The orientation (in degrees) of the object along the Z axis.
fObject
 Inheritedradius : Number
The radius in pixels of an imaginary cilinder enclosing the object.
fObject
 InheritedreceiveLights : Boolean = true
Boolean value indicating if this object receives lighting.
fRenderableElement
 InheritedreceiveShadows : Boolean = true
Boolean value indicating if this object receives shadows.
fRenderableElement
 Inheritedsolid : Boolean = true
Boolean value indicating if this object collides with others.
fRenderableElement
 Inheritedx : Number
X coordinate fot this element
fElement
 Inheritedy : Number
Y coordinate for this element
fElement
 Inheritedz : Number
Z coordinate for this element
fElement
Protected Properties
 PropertyDefined by
 InheritedcontainerParent : DisplayObjectContainer
fRenderableElement
Public Methods
 MethodDefined by
 Inherited
call(what:String, param:* = null):void
Calls a function of the base clip
fObject
 Inherited
distanceTo(x:Number, y:Number, z:Number):Number
Returns the distance of this element to the given coordinate
fElement
 Inherited
follow(target:fElement, elasticity:Number = 0):void
Makes element follow target element
fElement
 Inherited
gotoAndPlay(where:*):void
Passes the stardard gotoAndPLay command to the base clip
fObject
 Inherited
gotoAndStop(where:*):void
Passes the stardard gotoAndStop command to the base clip
fObject
 Inherited
hide():void
Makes element invisible
fRenderableElement
 Inherited
moveTo(x:Number, y:Number, z:Number):void
Moves the element to a given position
fElement
 Inherited
show():void
Makes element visible
fRenderableElement
 Inherited
stopFollowing(target:fElement):void
Stops element from following another element
fElement
  
teleportTo(x:Number, y:Number, z:Number):void
fCharacter
Public Constants
 ConstantDefined by
  COLLIDE : String = "charactercollide"
[static] The fCharacter.COLLIDE constant defines the value of the type property of the event object for a charactercollide event.
fCharacter
  EVENT_IN : String = "charactereventin"
[static] The fCharacter.EVENT_IN constant defines the value of the type property of the event object for a charactereventin event.
fCharacter
  EVENT_OUT : String = "charactereventout"
[static] The fCharacter.EVENT_OUT constant defines the value of the type property of the event object for a charactereventout event.
fCharacter
 InheritedHIDE : String = "renderableElementHide"
[static] The fRenderableElement.HIDE constant defines the value of the type property of the event object for a renderableElementHide event.
fRenderableElement
 InheritedMAXSHADOW : * = 2
[static] Limits size of object shadow projection relative to X times the object's height (amount of stretching movieClips will suffer)
fObject
 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
 InheritedSHOW : String = "renderableElementShow"
[static] The fRenderableElement.SHOW constant defines the value of the type property of the event object for a renderableElementShow event.
fRenderableElement
  WALKOVER : String = "characterwalkover"
[static] The fCharacter.WALKOVER constant defines the value of the type property of the event object for a characterwalkover event.
fCharacter
Method detail
teleportTo()method
public function teleportTo(x:Number, y:Number, z:Number):voidParameters
x:Number
 
y:Number
 
z:Number
Constant detail
COLLIDEconstant
public static const COLLIDE:String = "charactercollide"

The fCharacter.COLLIDE constant defines the value of the type property of the event object for a charactercollide event. The event is dispatched when the character collides with another element in the scene

EVENT_INconstant 
public static const EVENT_IN:String = "charactereventin"

The fCharacter.EVENT_IN constant defines the value of the type property of the event object for a charactereventin event. The event is dispatched when the character enters a cell where an event was defined

EVENT_OUTconstant 
public static const EVENT_OUT:String = "charactereventout"

The fCharacter.EVENT_OUT constant defines the value of the type property of the event object for a charactereventout event. The event is dispatched when the character leaves a cell where an event was defined

WALKOVERconstant 
public static const WALKOVER:String = "characterwalkover"

The fCharacter.WALKOVER constant defines the value of the type property of the event object for a characterwalkover event. The event is dispatched when the character walks over a non-solid object of the scene