利用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"}); }
do you need a prescription for hydroxychloroquine
Write more stories, more chapters.
Thanks for posting this. Looking for these resources 😀
I am glad to talk with you and you give me great help
Hello this is kinda of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding knowledge so I wanted to get advice from someone with experience. Any help would be enormously appreciated!
Greetings, have tried to subscribe to this websites rss feed but I am having a bit of a problem. Can anyone kindly tell me what to do?’
hydroxychloroquine tablets buy online buy hydroxychloroquine 200 mg hydroxychloroquine 200mg for arthritis
You are a very smart person! 🙂
diltiazem er doses cardizem cd savings diltiazem and metoprolol together for rate control diltiazem this med has to be taking with what
zanaflex generic name zanaflex capsule cost zanaflex 4 mg oral tablet how many zanaflex can i take at once
Good post. I study something more difficult on different blogs everyday. It’s going to always be stimulating to learn content material from other writers and observe a little bit one thing from their store. I’d prefer to use some with the content material on my blog whether you don’t mind. Natually I’ll give you a link in your web blog. Thanks for sharing.
I am glad to talk with you and you give me great help
Its wonderful as your other blog posts : D, regards for putting up.
This blog post is excellent, probably because of how well the subject was developed. I like some of the comments too though I could prefer we all stay on the subject in order add value to the subject!
cialis 40 mg how long does viagra take female viagra over the counter what would happen if a woman takes viagra
purchase hydroxychloroquine online other names for plaquenil how to get hydroxychloroquine tablets
Took me time to read the material, but I truly loved the article. It turned out to be very useful to me.
Your idea is outstanding; the issue is something that not enough persons are speaking intelligently about. I’m very happy that I stumbled throughout this in my seek for one thing regarding this.
Surprisingly good post. I really found your primary webpage and additionally wanted to suggest that have essentially enjoyed searching your website blog posts. Whatever the case I’ll always be subscribing to your entire supply and I hope you jot down ever again soon!
viagra doses black ant viagra australia what does viagra do to women what is cialis used to treat
levitra pens buy levitra when will levitra be generic whats better viagra or levitra
I would share your post with my sis.
plaquenil generic name what is hydroxychloroquine used for
Our community leaders need to read this, and look at developing some of your recommendations.
http://erythromycin1m.com/# erythromycin ingredients
azithromycin vs erythromycin is erythromycin safe during pregnancy
Our communities really need to deal with this.
4bk86
eb35y
p0mk
erythromycin uses
86ckz
eipvf
60if