利用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"}); }
how to write a dissertation proposal
dissertation review
dissertation only phd
need help
format for writing dissertation proposals
dissertation help free
Wow, amazing blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your site is great, as well as the content!
Hello there I am so delighted I found your weblog, I really found you by mistake, while I was searching on Google for something else, Anyhow I am here now and would just like to say cheers for a remarkable post and a all round exciting blog (I also love the theme/design), I don’t have time to browse it all at the moment but I have book-marked it and also included your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the superb work.
Just want to say what a great blog you got here!I’ve been around for quite a lot of time, but finally decided to show my appreciation of your work!
I loved your idea there, I tell you blogs are so exciting sometimes like looking into people’s private life’s and work. Every new remark wonderful in its own right.
I am lucky that I discovered this website , precisely the right info that I was searching for! .
We are a group of volunteers and starting a new initiative in our community. Your blog provided us with valuable information to work on|.You have done a marvellous job!
writing doctoral dissertation
dissertation printing
writing the doctoral dissertation
baclofen drowsy baclofen medicine is baclofen safe while breastfeeding baclofen raises what receptors
diflucan candida cost of diflucan in canada can you take diflucan while on antibiotic diflucan yeast infection how long
xenical vaistai kaina xenical buy usa orlistat how much weight loss orlistat over the counter where to buy
best dissertation help services
dissertation help
dissertation only phd
prednisone and advil prednisone in india does prednisone help poison ivy how do you pronounce prednisone
do my dissertation
professional writing service
dissertation titles
metformin off label best metformin brand what are the side effects to metformin how does metformin cause weight loss
Thanks for a Interesting item; I enjoyed it very much. Regards Sang Magistrale
baclofen 10mg buy baclofen uk is baclofen a good muscle relaxer which would help me to sleep better trazodone or baclofen
We’re developing some community services to respond to this, and your blog is helpful.
Thanks a bunch for sharing this with all people you really recognize what you are talking about! Bookmarked. Kindly also seek advice from my web site =). We can have a link alternate contract between us!
glaxosmithkline paxil average cost of paroxetine are prozac or paxil addictive how long does paxil take to work for anxiety
pastillas orlistat efectos xenical precio how to lose weight with xenical orlistat how long to take
orlistat price xenical canadian pharmacy orlistat 120 mg en espanol how much does xenical cost atv rite aid