利用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"}); }
brand modafinil
buy modafinil 100mg online cheap buy modafinil 100mg sale oral provigil 200mg
erythromycin ingredients erythromycin ophthalmic
tadalafil tablets 20 mg india tadalafil best price 20 mg cialis 20mg
buy modafinil 100mg online cheap buy modafinil 100mg for sale provigil cheap
online purchase of tadalafil in india cialis coupon cialis
buy provigil 100mg online provigil 200mg pill
modafinil 200mg tablet buy provigil online order provigil 100mg without prescription
prescribing stromectol stromectol 12 mg tablets stromectol 3 mg tablets price
provigil 200mg cheap modafinil online buy provigil 100mg over the counter
modafinil 200mg uk order modafinil 200mg order modafinil pills
prescribing stromectol stromectol price usa buy stromectol online
canada rx drugs online buying from canadian online pharmacies aarp approved canadian online pharmacies
ivermectin cream before and after rosacea ivermectin how much ivermectin to give a 50lb dog
propecia costs is propecia a prescription drug propecia costs
ivermectin 12 ivermectin lotion over the counter ivermectin ointment
prescription drugs online without doctor cheap pet meds without vet prescription anti fungal pills without prescription
prescription drugs canada buy online best non prescription ed pills buy prescription drugs
cheap ed pills best ed pills online pills for erection
treatments for ed ed remedies ed medication online
where can i order prednisone 20mg buy prednisone online prednisone tablets canada
generic cialis no prescription australia cialis usa prescription 20mg generic cialis
what doe cialis look like cheapest cialis usa cialis 20 mg canada
stromectol tablets buy online what worms does ivermectin kill in dogs ivermectin capsules for humans
100mg viagra without a doctor prescription erection pills cheap medications
stromectol dosage does oral ivermectin kill demodex mites ivermectin, metronidazole
homepage ed meds online without doctor prescription how to treat ed
new ed treatments
Heya i’m for the first time here. I found this board and I find It truly helpful & it helped me out much. I’m hoping to give one thing back and aid others like you aided me.
I am regular reader, how are you everybody? This
post posted at this web page is actually good.
buy kamagra 100 mg