Packagenet.guttershark.util
Classpublic class ScopeUtils

The ScopeUtils class provides utilities for working with scope.



Public Methods
 MethodDefined by
  
[static] Singleton access.
ScopeUtils
  
retarget(source:InteractiveObject, target:InteractiveObject, ... objs):void
Re-target instance variables from a source to a different scope.
ScopeUtils
Method detail
gi()method
public static function gi():ScopeUtils

Singleton access.

Returns
ScopeUtils
retarget()method 
public function retarget(source:InteractiveObject, target:InteractiveObject, ... objs):void

Re-target instance variables from a source to a different scope.

Parameters
source:InteractiveObject — The source instance where the variables are declared.
 
target:InteractiveObject — The new target.
 
... objs — The instance variables in which the pointer is changing.

Example
Re-targetting a class' instance variables to inside of a movie clip.
 
   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);
         }
     }
   }