Packageorg.ffilmation.engine.core
Classpublic class fLight
InheritancefLight Inheritance fElement Inheritance flash.events.EventDispatcher
SubclassesfGlobalLight, fOmniLight

The fLight is an abstract definition of a light that contains generic information such as intensity, size, decay and color. To create a new type of light you must extend this class

YOU CAN'T CREATE INSTANCES OF THIS OBJECT



Public Properties
 PropertyDefined by
  bump : Boolean
Determines if this light will be rendered with bumpmapping.
fLight
 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
  decay : Number
From 0 to 100 marks the distance along the lights's radius from where intensity stars to fade.
fLight
  hexcolor : uint
An hexdecimal number specifying the color of the light, example: 0xffeedd
fLight
 Inheritedid : String
The string identifier of this element.
fElement
  intensity : Number
Intensity of the light goes from 0 to 100
fLight
  size : Number
Radius of the sphere that identifies the light, a value of 0 creates a light of Infinite size (ex: The Sun)
fLight
 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
 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
moveTo(x:Number, y:Number, z:Number):void
Moves the element to a given position
fElement
  
render():void
Renders the light
fLight
 Inherited
stopFollowing(target:fElement):void
Stops element from following another element
fElement
Public Constants
 ConstantDefined by
  COLORCHANGE : String = "lightcolorchange"
[static] The fLight.COLORCHANGE constant defines the value of the type property of the event object for a lightcolorchange event.
fLight
  DECAYCHANGE : String = "lightdecaychange"
[static] The fLight.DECAYCHANGE constant defines the value of the type property of the event object for a lightdecaychange event.
fLight
  INTENSITYCHANGE : String = "lightintensitychange"
[static] The fLight.INTENSITYCHANGE constant defines the value of the type property of the event object for a lightintensitychange event.
fLight
 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
  RENDER : String = "lightrender"
[static] The fLight.RENDER constant defines the value of the type property of the event object for a lightrender event.
fLight
  SIZECHANGE : String = "lightsizechange"
[static] The fLight.SIZECHANGE constant defines the value of the type property of the event object for a lightsizechange event.
fLight
Property detail
bumpproperty
public var bump:Boolean

Determines if this light will be rendered with bumpmapping. Please note that for the bumpMapping to work in a given surface, the surface will need a bumpMap definition and bumpMapping must be enabled in the engine's global parameters

decayproperty 
decay:Number  [read-write]

From 0 to 100 marks the distance along the lights's radius from where intensity stars to fade. A 0 decay defines a solid light

Implementation
    public function get decay():Number
    public function set decay(value:Number):void
hexcolorproperty 
hexcolor:uint  [read-write]

An hexdecimal number specifying the color of the light, example: 0xffeedd

Implementation
    public function get hexcolor():uint
    public function set hexcolor(value:uint):void
intensityproperty 
intensity:Number  [read-write]

Intensity of the light goes from 0 to 100

Implementation
    public function get intensity():Number
    public function set intensity(value:Number):void
sizeproperty 
size:Number  [read-write]

Radius of the sphere that identifies the light, a value of 0 creates a light of Infinite size (ex: The Sun)

Implementation
    public function get size():Number
    public function set size(value:Number):void
Method detail
render()method
public function render():void

Renders the light

Constant detail
COLORCHANGEconstant
public static const COLORCHANGE:String = "lightcolorchange"

The fLight.COLORCHANGE constant defines the value of the type property of the event object for a lightcolorchange event. The event is dispatched when the light changes its color

DECAYCHANGEconstant 
public static const DECAYCHANGE:String = "lightdecaychange"

The fLight.DECAYCHANGE constant defines the value of the type property of the event object for a lightdecaychange event. The event is dispatched when the light changes its decay

INTENSITYCHANGEconstant 
public static const INTENSITYCHANGE:String = "lightintensitychange"

The fLight.INTENSITYCHANGE constant defines the value of the type property of the event object for a lightintensitychange event. The event is dispatched when the light changes its intensity

RENDERconstant 
public static const RENDER:String = "lightrender"

The fLight.RENDER constant defines the value of the type property of the event object for a lightrender event. The event is dispatched when the light is rendered

SIZECHANGEconstant 
public static const SIZECHANGE:String = "lightsizechange"

The fLight.SIZECHANGE constant defines the value of the type property of the event object for a lightsizechange event. The event is dispatched when the light changes its size