利用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"}); }
Abnormal this put up is totaly unrelated to what I was searching google for, but it surely used to be listed at the first page. I suppose your doing one thing proper if Google likes you adequate to place you at the first page of a non similar search.
Its wonderful as your other blog posts : D, regards for putting up.
This is definitely a wonderful webpage, thanks a lot..
dating apps
adlt dating
best internet dating websites
cenforce 50 mg drug cenforce 100mg pill order cenforce 100mg online
sildenafil usa buy sildenafil online cheap sildenafil medication
Amazing article, cheers, I will bookmark you now.
fantastic internet site, I could definitely go to your web page once more…acquired some really nice info.
I would really like to appreciate the endeavors you cash in on written this article. I’m going for the similar best product from you finding out in the foreseeable future as well. Actually your creative writing abilities has urged me to begin my very own blog now. Genuinely the blogging is distributing its wings rapidly. Your write down is often a fine illustration showing it.
I am glad to be one of the visitors on this great site (:, appreciate it for putting up.
This website has lots of really useful stuff on it. Thanks for informing me.
Thank you for sharing this very good post. Very interesting ideas! (as always, btw)
gay chat line charlotte nc
gay universe chat
free gay web cam chat rooms
gay cam chat webcam
gay bear free webcam chat rooms
gay men webcam chat rooms
I imagine so. Very good stuff, I agree totally.
asain gay chat phone lines
gay sex chat free
live video streaming gay chat
gay and bi text chat
free gay video chat r
best free gay chat
Im impressed. I dont think Ive met anyone who knows as much about this subject as you do. Youre truly well informed and very intelligent. You wrote something that people could understand and made the subject intriguing for everyone. Really, great blog youve got here.
cenforce 50 mg canada order generic cenforce buy cenforce 100mg for sale
gay couple chat
chat canada gay
choose a gay video chat free
Hello.This article was extremely interesting, particularly since I was searching for thoughts on this subject last couple of days.
cenforce ca cheap cenforce 100mg order cenforce sale
Great post. Just a heads up – I am running Ubuntu with the beta of Firefox and the navigation of your blog is kind of broken for me.
prix viagra 20mg prise de viagra viagra en generique
viagra efficacitг© composition viagra viagra 20mg pas cher
I am glad to talk with you and you give me great help
it is a really nice point of view. I usually 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!
choose a gay video chat free
in gay chat what is an poz?
gay chat chartestone
ivermectin 6 ivermectin lotion ivermectin syrup
ivermectin oral ivermectin purchase ivermectin 2mg