我目前正在处理网页横幅广告,并且无法将按钮与其功能相关联。
这是我的代码:
import com.greensock.TweenLite;
import com.greensock.TimelineLite;
import com.greensock.plugins.*;
import flash.events.MouseEvent;
TweenPlugin.activate([TintPlugin]);
var imageTimeline:TimelineLite;
var speedOfAnimation:Number = .5
var Timeline:TimelineLite = new TimelineLite();
function init():void{
trace("init working");
Timeline.to(replay,0,{alpha:0})
Timeline.to(manwhite,0,{alpha:0})
Timeline.to(womanwhite,0,{alpha:0})
Timeline.to(aelogo,0,{alpha:0})
Timeline.to(sale,0,{alpha:0})
Timeline.to(malefront1,0,{alpha:0})
Timeline.to(malefront2,0,{alpha:0})
Timeline.to(maleback,0,{alpha:0})
Timeline.to(femfront1,0,{alpha:0})
Timeline.to(femfront2,0,{alpha:0})
Timeline.to(femback,0,{alpha:0})
Timeline.to(shopmen,0,{alpha:0})
Timeline.to(shopwomen,0,{alpha:0})
Timeline.to(bg,2.5,{x:"-200"})
Timeline.to(bg,2,{x:"-600"})
Timeline.to(sale,1,{alpha:1})
Timeline.to(aelogo,1,{alpha:1})
TweenLite.to(manwhite, 1, {alpha:1, delay:5.5});
TweenLite.to(womanwhite, 1, {alpha:1, delay:5.5});
TweenLite.to(shopmen, 1, {alpha:1, delay:6.5});
TweenLite.to(shopwomen, 1, {alpha:1, delay:6.5});
TweenLite.to(malefront2, 1, {alpha:1, delay:6.5});
TweenLite.to(femfront1, 1, {alpha:1, delay:6.5});
TweenLite.to(maleback, 1, {alpha:1, delay:7.5});
TweenLite.to(femback, 1, {alpha:1, delay:7.5});
TweenLite.to(malefront1, 1, {alpha:1, delay:8.5});
TweenLite.to(femfront2, 1, {alpha:1, delay:8.5});
TweenLite.to(replay, 1, {alpha:1, delay:9.5});
details.shopmen.addEventListener(MouseEvent.CLICK, shopMenBtn);
}
function shopMenBtn(e:MouseEvent):void{
// open up URL with new tab
var myURL:URLRequest = new URLRequest("http://www.ae.com/web/browse/hp_mens.jsp?catId=mens&navdetail=top:men:p3");
navigateToURL(myURL, "_blank");
}
init();
非常感谢帮助!提前谢谢!