利用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"}); }
Search Engine Optimization For Photographers 검색엔진최적화 방법
How To Find The Perfect Slot Demo Princess Terbaru
On The Internet demo slot pragmatic Starlight princess
What Is Really A Saving Life’s Savings? 대출 갈아타기
I like it when folks come together and share thoughts. Great site, stick with it.
Seo – Sorry, Excitement Over – What Is Next? 구글 백링크
Seo Elite Feature Review seo 마케팅
20 Replacement Sash Windows Websites That Are Taking
The Internet By Storm replacement glass for a Window
Malpractice Attorneys: What Nobody Has Discussed malpractice law Firm
10 Things You Learned From Kindergarden Which Will Aid You In Obtaining Medical Malpractice Compensation attorney
10 Facts About Repair Upvc Window That Will Instantly Put You In A Good Mood upvc window Repair
10 Top Facebook Pages Of All Time About Replacement Glass For Windows Windowpane replacement
How Produce Quality Back Links For Website 구글상위노출 대행사
The One 3 Wheel Stroller Travel System Trick Every Person Should Be Able To 435871
You made some good points there. I looked on the web to learn more about the issue and found most people will go along with your views on this website.
Thanks for the writeup. I definitely agree with what you are saying. I have been talking about this subject a lot lately with my father so hopefully this will get him to see my point of view. Fingers crossed!
buy arava pill – buy arava sale buy cartidin pills for sale
Hello there, just became aware of your blog through Google, and found that it is truly informative. I am gonna watch out for brussels. I’ll be grateful if you continue this in future. A lot of people will be benefited from your writing. Cheers!
5 Laws That Can Help The Double Glazing Doctor Near Me Industry the double glazing doctor
buy rogaine generic – buy rogaine medication order generic propecia 1mg
Five Killer Quora Answers To Veterans Disability Law veterans Disability
Perhaps you should also a put a forum site on your blog to increase reader interaction.*::-`
This website is my breathing in, real fantastic design and perfect content .
Five Killer Quora Answers To Double Glazed Window Repairs Near Me Double Glazed Window Repairs Near Me
even mendes is a bit old now but she is still smokin hot and i wanna marry her,,
Website Marketing For New Webmasters 구글상위노출 seo작업
Its good as your other content : D, appreciate it for posting .
You can certainly see your enthusiasm in the paintings you write. The sector hopes for more passionate writers like you who are not afraid to mention how they believe. At all times follow your heart.
You have a very nice layout for your blog” i want it to use on my site too ,
Required to give back that not much remark merely to thank you all over again because of these spectacular techniques you could have provided in this post. It’s so particularly generous with individuals as if you to deliver unreservedly what most people can have marketed being an guide to earn some dough for their own reasons, primarily considering that you could have tried it should you wanted. The tactics also acted to get easy way understand that most of us have similar desire just like my very own to recognize significantly more concerning this condition. I’m there are many nicer opportunities at the start for individuals who read through your site post.
I’m amazed, I must say. Seldom do I come across a blog that’s both educative and entertaining, and without a doubt, you’ve hit the nail on the head. The problem is something too few men and women are speaking intelligently about. I’m very happy that I stumbled across this in my search for something concerning this.