| Package | net.guttershark.util |
| Class | public class ScopeUtils |
| Method | Defined by | ||
|---|---|---|---|
|
gi():ScopeUtils
[static]
Singleton access.
| ScopeUtils | ||
|
retarget(source:InteractiveObject, target:InteractiveObject, ... objs):void
Re-target instance variables from a source to a different scope.
| ScopeUtils | ||
| gi | () | method |
| retarget | () | method |
public function retarget(source:InteractiveObject, target:InteractiveObject, ... objs):voidRe-target instance variables from a source to a different scope.
Parameterssource:InteractiveObject — The source instance where the variables are declared.
|
|
target:InteractiveObject — The new target.
|
|
... objs — The instance variables in which the pointer is changing.
|
package
{
class MyView extends CoreClip
{
public var formfieldwrapper:MovieClip;
public var firstname:TextField; //actually exists in formfieldwrapper.firstname.
public var lastname:TextField;
public function MyView()
{
super();
//in this call, "formfieldwrapper" represents the source, and "this" represents the new target host.
utils.scope.retarget(formfieldwrapper,this,"firstname","lastname");
trace(firstname);
}
}
}