利用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"}); }
order kamagra pill sildenafil 100 mg uk cheap kamagra
I appreciate, cause I found just what I was looking for. You’ve ended my four day long hunt! God Bless you man. Have a great day. Bye -.
purchase kamagra for sale sildenafil cost sildenafil canada
essay on community service
the help by kathryn stockett essay
write my essay wikipedia
pregabalin 75 mg canada order pregabalin online cheap pregabalin us
Advanced reading here!
Public policy is key here, and our states need to develop some strategies – – soon.
Your thing regarding creating will be practically nothing in short supply of awesome. This informative article is incredibly useful and contains offered myself a better solution to be able to my own issues. Which can be the specific purpose MY PARTNER AND I has been doing a search online. I am advocating this informative article with a good friend. I know they are going to get the write-up since beneficial as i would. Yet again many thanks.
online essay editing service
national honor society essay help
essay helpers
buy lyrica 150mg lyrica 150mg tablet pregabalin 150mg brand
mature woman dating pictures
japanese chubby
free web girl
lyrica 150mg for sale pregabalin online order lyrica 75 mg tablet
Your article has answered the question I was wondering about! I would like to write a thesis on this subject, but I would like you to give your opinion once 😀 majorsite
where can i buy stromectol ivermectin 6mg tablet for lice price of ivermectin liquid
Hello. Great job. I did not expect this on a Wednesday. This is a great story. Thanks!
ivermectin tablets ivermectin 8000 stromectol cvs
massianic singles free dating sites
plentyoffish login
plenty of fish sign in
Your posts provide a clear, concise description of the issues.
I think I might disagree with some of your analysis. Are the figures solid?
I concur with your conclusions and will eagerly look forward to your future updates. The usefulness and significance is overwhelming and has been invaluable to me!
I just added this to my favorites. I truly love reading your posts. Tyvm!
stromectol ivermectin how much is ivermectin stromectol canada
Simply want to say your article is as amazing. The clarity in your post is just great and i can assume you’re an expert on this subject. Fine with your permission allow me to grab your feed to keep up to date with forthcoming post. Thanks a million and please keep up the gratifying work.
free date web sites
dating sinulator online
tinder web
ivermectin 3mg dosage stromectol for sale ivermectin tablets
viagra gг©nг©rique 20mg viagra achat belgique viagra 40 mg pas cher
These kind of posts are always inspiring and I prefer to read quality content so I happy to find many good point here in the post. writing is simply wonderful! thank you for the post
The post is absolutely great! Lots of great info and inspiration, both of which we all need! Also like to admire the time and effort you put into your blog and detailed information you offer! I will bookmark your website!
generique viagra 5mg vente viagra en ligne viagra commande
adult dating site
asien dating online
internet dating site