home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2012 January / ME_2012_01.iso / Galileo-Video / system / ChromeLinux.swf / scripts / com / greensock / plugins / FrameLabelPlugin.as < prev    next >
Encoding:
Text File  |  2010-11-16  |  1.1 KB  |  45 lines

  1. package com.greensock.plugins
  2. {
  3.    import com.greensock.*;
  4.    import flash.display.*;
  5.    
  6.    public class FrameLabelPlugin extends FramePlugin
  7.    {
  8.       public static const API:Number = 1;
  9.       
  10.       public function FrameLabelPlugin()
  11.       {
  12.          super();
  13.          this.propName = "frameLabel";
  14.       }
  15.       
  16.       override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean
  17.       {
  18.          if(!param3.target is MovieClip)
  19.          {
  20.             return false;
  21.          }
  22.          _target = param1 as MovieClip;
  23.          this.frame = _target.currentFrame;
  24.          var _loc4_:Array = _target.currentLabels;
  25.          var _loc5_:String = param2;
  26.          var _loc6_:int = _target.currentFrame;
  27.          var _loc7_:int = int(_loc4_.length);
  28.          while(_loc7_--)
  29.          {
  30.             if(_loc4_[_loc7_].name == _loc5_)
  31.             {
  32.                _loc6_ = int(_loc4_[_loc7_].frame);
  33.                break;
  34.             }
  35.          }
  36.          if(this.frame != _loc6_)
  37.          {
  38.             addTween(this,"frame",this.frame,_loc6_,"frame");
  39.          }
  40.          return true;
  41.       }
  42.    }
  43. }
  44.  
  45.