0
這是我的代碼:的ActionScript 3 - 傳遞參數給的addEventListener
function switchText(evt, newText:String, time=5) {
var fadeTextTween:Tween = new Tween(evt, "alpha", Regular.easeIn, evt.alpha, 0, time, false);
fadeTextTween.addEventListener(TweenEvent.MOTION_FINISH, textTweenEnd);
}
function textTweenEnd(e:TweenEvent) {
e.target.obj.text=newText;
}
我想從內textTweenEnd訪問newText參數。如何將newText作爲參數傳遞給textTweenEnd函數?
我也強烈推薦使用TweenLite([GSAP](http://www.greensock.com/v12/))。點擊該鏈接並下載AS3版本。 – Marcela