利用Tweener製作動畫 – 廣告看板
依然是Tweener範例清倉,本篇範例大致是搭配Tweener讓目標物移動到指定座標的效果,話不多說看範例吧!
Tweener 橫幅廣告 範例:主要為利用Tweener針對廣告看板進行移動,以下為本範例的程式碼:
import caurina.transitions.Tweener; var i:int;//迴圈用變數 var pic:int = 1;//播放張數紀錄變數 var clock;//計時器變數 //按鈕變色與監聽 btnChange(); function btnChange() { for (i=1; i<=4; i++) { this["b" + i].gotoAndStop(1); this["b" + pic].gotoAndStop(2); } } for (i=1; i<=4; i++) { this["b" + i].addEventListener(MouseEvent.CLICK,clickFn); } function clickFn(e:MouseEvent) { clearInterval(clock); clock = setInterval(autoChange,5000); pic = e.currentTarget.name.substr(1,1); bannerChange(); btnChange(); } //計時器設定(每5秒更換) clock = setInterval(autoChange,5000); function autoChange() { pic++; if (pic>4) { pic = 1; } bannerChange(); btnChange(); } //圖片切換函數 function bannerChange() { Tweener.addTween(banner, {x:(pic-1)*-560, time:1, transition:"easeOutQuint"}); }
Tweener 移動看板 範例:與上面範例大致相同,不過本範例增加了縱向的移動。
import caurina.transitions.Tweener var i var j var targetX var targetY for(i=1;i<=3;i++){ for(j=1;j<=3;j++){ this["b"+i+j].addEventListener(MouseEvent.CLICK,moveFn) } } function moveFn(e:MouseEvent){ targetX=(e.currentTarget.name.substr(2,1)-1)*-450 targetY=(e.currentTarget.name.substr(1,1)-1)*-450 Tweener.addTween(nb, {x:targetX, y:targetY, time:2, transition:"easeOutQuint"}); }
https://erythromycinn.com/# erythromycin and acne
order cialis tadalafil no prescription female cialis
cialis 50mg price tadalafil 20mg cialis is for daily use
cialis without prescriptions uk tadalafil 20mg cialis quebec dollars canadien
I think I will become a great follower.Just want to say your post is striking. The clarity in your post is simply striking and i can take for granted you are an expert on this subject.
Substantially, the post is really the best on this laudable topic. I concur with your conclusions and will eagerly watch forward to your future updates.Just saying thanx will not just be enough, for the wonderful lucidity in your writing.
Might we expect to see more of these same problems in the future?
cialis/dapoxetine with overnight ship buy cialis in australia online new cialis commercial 2010
Enjoyed reading through this, very good material. Thanks!
I think it is a nice point of view. I most often meet people who rather say what they suppose others want to hear. Good and well written! I will come back to your site for sure!
I am glad to talk with you and you give me great help
mechanism of action of erythromycin
cheap cialis pills uk is it legal to buy cialis online? where do you inject liquid cialis
can ubuy cialis on streets cialis cialis with dapoxitine
cialis kidney function generic version of cialis buy viagra cialis mix online
viagra amazon sildenafil 100 mg buying viagra online
buy generic 100mg viagra online viagra pills viagra from canada
erythromycin for dogs erythromycin 250mg tablets
stromectol for sale stromectol for humans for sale stromectol 12 mg tablets
stromectol 12 mg tablets stromectol tablets for humans stromectol 12 mg tablets
stromectol for sale stromectol tablets for humans mectizan stromectol
provigil price
buy generic provigil 100mg order generic modafinil 200mg
viagra tablets for men sildenafil citrate 100mg for sale viagra
provigil 100mg oral
tadalafil best price 20 mg tadalafil 20 mg buy online lowest price tadalafil
where to buy cheap clomid online clomid for sale clomid for sale
provigil us buy modafinil 100mg pill modafinil 200mg tablet
buy modafinil for sale modafinil 100mg generic
tadalafil without a doctor’s prescription tadalafil generic tadalafil 20mg india