| Package | com.bourre.core |
| Interface | public interface Accessor |
| Implementors | MethodAccessor, MultiAccessor, PropertyAccessor |
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Accessor interface defines common rules
to create abstract access to properties or methods of an
object. That interface allow tweens to get and set both
properties and methods of an object in a transparent way.
An Accessor could access to only one property or
getter/setter pair of methods for an object. To access many
properties/methods in one time see the AccessorComposer
interface.
In order to the accessor to get or set value with methods, an accessor must know both getter and setter methods name. If one of these information is not available, the accessor must throw an exception in order to prevent the tween to work on unavailable data.
There isn't any method to dynamically bind an accessor to a new property or a new getter/setter pair of method. You have to create a new accessor if you need to change the property you want to access.
Note : Of course, only public members of the target object could be accessed by an accessor instance.
See also
| Method | Defined by | ||
|---|---|---|---|
|
getGetterHelper():String
Returns the string name of the getter access used
by this accessor to retreive data from its target
object.
| Accessor | ||
|
getSetterHelper():String
Returns the string name of the setter access used
by this accessor to defines new data to its target
object.
| Accessor | ||
|
getTarget():Object
Returns the target object onto which this accessor
operate.
| Accessor | ||
|
getValue():Number
Retreives the value from the target property.
| Accessor | ||
|
setValue(value:Number):void
Defines the new value for the target property.
| Accessor | ||
| getGetterHelper | () | method |
public function getGetterHelper():String
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns the string name of the getter access used by this accessor to retreive data from its target object.
ReturnsString — the string name of the getter access used
by this accessor
|
| getSetterHelper | () | method |
public function getSetterHelper():String
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns the string name of the setter access used by this accessor to defines new data to its target object.
ReturnsString — the string name of the setter access used
by this accessor
|
| getTarget | () | method |
public function getTarget():Object
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns the target object onto which this accessor operate.
ReturnsObject — the object onto which this accessor operate
|
| getValue | () | method |
public function getValue():Number
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Retreives the value from the target property. If the type of the data stored by this object is not a number type, the call must fail with an exception.
ReturnsNumber — current value stored in the target property
|
— ClassCastException — The target property
doesn't store a number.
|
| setValue | () | method |
public function setValue(value:Number):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Defines the new value for the target property. If the type of the data stored by this object is not a number type, the call must fail with an exception.
Parametersvalue:Number — new numeric value for the target property
|
— ClassCastException — The target property
doesn't store a number.
|