- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
public static function hide (target:MovieClip, time:Number = .1, finshCallBack:Function = null, time2:Number = 0):void
{
if (!target) return;
cansel(target);
var fun:Function = function (event:Event = null):void
{
var tw:Tween = new Tween(target, 'alpha', null, target.alpha, 0, time, true);
tw.addEventListener(TweenEvent.MOTION_FINISH, hideEnd);
if (finshCallBack != null) tw.addEventListener(TweenEvent.MOTION_FINISH, finshCallBack);
if (target['tw']) target['tw'].stop();
target['tw'] = tw;
target['is_hide'] = true;
if (target.hasOwnProperty('is_over')) target['is_over'] = false;
}
if (time2 == 0)
{
fun();
}
else
{
var timer:MyTimer = new MyTimer(time2 * 1000, 1);
target['timer'] = timer;
timer.addEventListener(TimerEvent.TIMER_COMPLETE, fun);
timer.start();
}
}