利用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"}); }
Узнай все о на что влияет варикоцеле двустороннее варикоцеле
15 Startling Facts About Pragmatic You’ve Never Known 프라그마틱 환수율 (Lawanna)
Why All The Fuss About Double Glazing Near Me? replaced
Узнай все о варикоцеле левого яичка рецидив варикоцеле
9 . What Your Parents Teach You About Good Accident Lawyers
good accident lawyers near me (Raymundo)
Biggest Crypto Casino Tools To Help You Manage Your Daily Life Biggest Crypto Casino Trick That Should Be Used By Everyone
Learn biggest crypto casino
20 Up And Coming Accident Injury Attorney Stars To Watch The Accident Injury Attorney
Industry accident Injury attorneys
20 Myths About Hiring Auto Accident Lawyers: Dispelled
Best Car Crash Attorney, Megashipping.Ru,
15 Interesting Hobbies That Will Make You Smarter At Situs Terpercaya situs togel terpercaya
The 10 Scariest Things About L Shaped Couch Small l shaped couch
small (Hassan)
Узнай все о варикоцеле 3 степени варикоцеле и потенция
Ten Easy Steps To Launch Your Own Treehouse Beds With Slide Business Kids Tree House Bed
Как официально купить аттестат 11 класса с упрощенным обучением в Москве
animalprotect.org/forum/index.php?action=post;board=5.0
Pretty! This was an incredibly wonderful post. Many thanks for supplying this information.
10 Meetups About Online Crypto Casino You Should Attend Best Online Crypto Casino
What’s The Job Market For Best Crypto Casino 2024 Professionals Like?
Best crypto Casino
Узнай все о варикоцеле двустороннее варикоцеле
The 10 Most Terrifying Things About Pram Sale pram sale
See What Top Rated Cots Tricks The Celebs
Are Using Top rated cots
Ten Startups That Will Revolutionize The Auto Accident Attorneys Industry For
The Better lawyers near me for car accident
нарколог на дом круглосуточно http://www.motik13.0pk.me/viewtopic.php?id=1995 .
Forget Mens Masturbator: 10 Reasons Why You Don’t Have It Mens masterbater
The 10 Most Scariest Things About L Shaped Couch Small l Shaped couch small
Asbestos is a mineral that occurs naturally in the form of thin, long fibers.
People who are exposed to asbestos case (Tyree) on a regular
basis are at risk of developing mesothelioma or other types of lung diseases.
10 Websites To Help You Develop Your Knowledge
About Small Sleeper Sofa king sleeper sofa
How To Build Successful Bandar Online Togel Tutorials
From Home bandar Togel Terpercaya, http://www.Google.pt,
amoxicillin over the counter in canada: com pharm – amoxicillin 500mg capsule buy online
Truly appreciated this post. It offered plenty of useful insights. Excellent work on creating this.
What To Say About Key Fob Repair To Your Boss broken key repair
Can Bunk Beds For Children Always Rule The World? bunk beds uk