| Package | org.ffilmation.engine.elements |
| Class | public class fObject |
| Inheritance | fObject fRenderableElement fElement flash.events.EventDispatcher |
| Subclasses | fCharacter |
An Object is a graphic element that is part of the the environment and is not projected in any way. The library item is attached to the scene as is. Objects cast and receive shadows.
Trees, statues and furniture are typical examples of objects.
Objects can't be moved and can't be added/removed dynamically because this allows several rendering optimizations. If you want to move something or add/remove it on the fly use the "Character" class instead
YOU CAN'T CREATE INSTANCES OF THIS OBJECT.
Objects are created when the scene is processed
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | castShadows : Boolean = true
Boolean value indicating if this object casts shadows.
| fRenderableElement | |
![]() | controller : fEngineElementController
Assigns a controller to this element
| fElement | |
| definitionID : String
The definition ID for this fObject.
| fObject | ||
![]() | 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 | |
| height : Number
The height in pixels of an imaginary cilinder enclosing the object.
| fObject | ||
![]() | id : String
The string identifier of this element.
| fElement | |
| orientation : Number
The orientation (in degrees) of the object along the Z axis.
| fObject | ||
| radius : Number [read-only]
The radius in pixels of an imaginary cilinder enclosing the object.
| fObject | ||
![]() | 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 | |
![]() | x : Number
X coordinate fot this element
| fElement | |
![]() | y : Number
Y coordinate for this element
| fElement | |
![]() | z : Number
Z coordinate for this element
| fElement | |
| 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 | |
| Constant | Defined 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 | |
| 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 | |
| definitionID | property |
public var definitionID:StringThe definition ID for this fObject. It is useful for example when processing collision events, as it will allow you to know what kind of thing did you collide against.
| height | property |
height:Number [read-write]The height in pixels of an imaginary cilinder enclosing the object. It is used only for colision detection. You can change it anytime This is useful for example if a character has rolling or crawling movements and you want to change its collision height during those movements.
Implementation public function get height():Number
public function set height(value:Number):void
| orientation | property |
orientation:Number [read-write]The orientation (in degrees) of the object along the Z axis. That is, if the object was a man standing anywhere on our scene, this would be where was his nose pointing. The default value of 0 indicates it is "looking" towards the positive X axis. The Axis in the Filmation Engine go like this.
positive Z
|
| / positive X
| /
| /
(0,0,0) X/
\
\
\
\ positive Y
public function get orientation():Number
public function set orientation(value:Number):void
| radius | property |
radius:Number [read-only]The radius in pixels of an imaginary cilinder enclosing the object. It is used only for colision detection.
Implementation public function get radius():Number
| call | () | method |
public override function call(what:String, param:* = null):voidCalls a function of the base clip
Parameterswhat:String — Name of the function to call
|
|
param:* (default = null) — An optional extra parameter to pass to the function
|
| gotoAndPlay | () | method |
public override function gotoAndPlay(where:*):voidPasses the stardard gotoAndPLay command to the base clip
Parameterswhere:* — A frame number or frame label
|
| gotoAndStop | () | method |
public override function gotoAndStop(where:*):voidPasses the stardard gotoAndStop command to the base clip
Parameterswhere:* — A frame number or frame label
|
| MAXSHADOW | constant |
public static const MAXSHADOW:* = 2Limits size of object shadow projection relative to X times the object's height (amount of stretching movieClips will suffer)