利用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"}); }
famous essay writers
mba essay help
cheap essays writing service
Does it look like we’re in for a big ride here?
Cherished is likely to be what people say about your comments.
OK, you outline what is a big issue. But, can’t we develop more answers in the private sector?
I enjoy your blog posts, saved to my bookmarks!
essay writing on customer service
help writing a compare and contrast essay
help to write an essay
help 123 essay
cheap essays writing service
cheapest essay writing services
Hiya, I am really glad I have found this information. Nowadays bloggers publish only about gossip and net stuff and this is actually frustrating.
cost valsartan 160 mg valsartan buy online order valsartan 80 mg pill
professional essay writers review
customized essays
best essay writing company
Hello there, just became aware of your blog through Google, and found that it is truly informative. I am going to watch out for brussels. I will appreciate if you continue this in future. Lots of people will be benefited from your writing. Cheers!
whoah this weblog is wonderful i like reading your articles. Keep up the good paintings! You already know, many people are looking around for this information, you can help them greatly.
help starting an essay
who will write my essay for me
essay writting service
order nebivolol 5 mg order bystolic 10 mg generic cost nebivolol 10 mg
nebivolol 5 mg sale buy bystolic 10 mg bystolic 10 mg cost
cheap essay help
buy an essay paper
buy cheap essay
I will share you blog with my sis.
essay homework help online
custom essay toronto
cheap essay writers
buy nebivolol 5 mg for sale buy bystolic 10 mg online cheap order generic bystolic
help me write a compare and contrast essay
cheap custom essay writing service
best essay editing service
essay marking service
professional essay writers review
i need help writing an argumentative essay
buy vardenafil 60 mg pills levitra over the counter cost vardenafil 60 mg
write my admissions essay
essay writing service scams
best essay writing service canada
Great post. I was checking constantly this blog and I’m impressed! Very useful info specifically the last part 🙂 I care for such info much. I was looking for this certain information for a very long time. Thank you and good luck.
Took me time to read the material, but I truly loved the article. It turned out to be very useful to me.
essay writing website
help with writing essay
i need help writing an essay
A wholly agreeable point of view, I think primarily based on my own experience with this that your points are well made, and your analysis on target.
You write Formidable articles, keep up good work.
what can i write my essay on
common application essay help
help writing an essay
This is a great blog. Thank you for the very informative post.