package com.greensock.plugins { import com.greensock.*; import flash.display.*; public class VisiblePlugin extends com.greensock.plugins.TweenPlugin { public function VisiblePlugin() { super(); this.propName = "visible"; this.overwriteProps = ["visible"]; return; } public override function onInitTween(arg1:Object, arg2:*, arg3:com.greensock.TweenLite):Boolean { this._target = arg1; this._tween = arg3; this._initVal = this._target.visible; this._visible = Boolean(arg2); return true; } public override function set changeFactor(arg1:Number):void { if (arg1 == 1 && (this._tween.cachedDuration == this._tween.cachedTime || this._tween.cachedTime == 0)) { this._target.visible = this._visible; } else { this._target.visible = this._initVal; } return; } public static const API:Number=1; protected var _target:Object; protected var _tween:com.greensock.TweenLite; protected var _visible:Boolean; protected var _initVal:Boolean; } }