| Package | org.ffilmation.engine.elements |
| Class | public class fCharacter |
| Inheritance | fCharacter fObject fRenderableElement fElement 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
| Method | Defined by | ||
|---|---|---|---|
![]() |
call(what:String, param:* = null):void
Calls a function of the base clip
| fObject | |
![]() |
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 | |
![]() |
gotoAndPlay(where:*):void
Passes the stardard gotoAndPLay command to the base clip
| fObject | |
![]() |
gotoAndStop(where:*):void
Passes the stardard gotoAndStop command to the base clip
| fObject | |
![]() |
hide():void
Makes element invisible
| fRenderableElement | |
![]() |
moveTo(x:Number, y:Number, z:Number):void
Moves the element to a given position
| fElement | |
![]() |
show():void
Makes element visible
| fRenderableElement | |
![]() |
stopFollowing(target:fElement):void
Stops element from following another element
| fElement | |
|
teleportTo(x:Number, y:Number, z:Number):void
| fCharacter | ||
| Constant | Defined 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 | ||
![]() | HIDE : String = "renderableElementHide" [static]
The fRenderableElement.HIDE constant defines the value of the
type property of the event object for a renderableElementHide event. | fRenderableElement | |
![]() | MAXSHADOW : * = 2 [static]
Limits size of object shadow projection relative to X times the object's height (amount of stretching movieClips will suffer)
| fObject | |
![]() | 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 | |
![]() | SHOW : 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 | ||
| teleportTo | () | method |
public function teleportTo(x:Number, y:Number, z:Number):voidParameters
x:Number |
|
y:Number |
|
z:Number |
| COLLIDE | constant |
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_IN | constant |
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_OUT | constant |
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
| WALKOVER | constant |
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