利用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"}); }
Finding A Charge Card With Good Apr 다바오 워터파크 호텔
Quick And Simple Keyword Assist Guide To Marketing Success 검색엔진최적화 회사
A Holiday Loan Consider Boredom Outside Your Life 다바오 탁아소있는 호텔
Slots Secrets Revealed 윌슨 에볼루션 vs 퓨어샷
How Long Does It Take Construct Credit After Personal Chapter?
다바오 홀덤 아이폰
Bank Is In Charge Of People With Bad Credit 직장인 대출
Review Of Vegas Red Online Casino 디지몬 어드벤처 라스트 에볼루션 인연 보기, marengi.org,
A Look In The Secrets Of Window Doctor storm window Repair
What Put Together About Poker Pro Fred Sarge Ferris 다바오 부티크 호텔
The 10 Most Scariest Things About Cerebral Palsy Attorneys cerebral palsy attorneys
Home Loans With Bad Credit: Get Yourself A Legit Loan In Three Easy Steps
중소기업 대출
Get Bank Loan Questions Answered Here 다바오 vpn 추천
Bank Rate Loan Calculator: Free Straightforward 다바오 홀덤 머니상
Why ADHD Private Assessment Is Fast Increasing To Be The Hottest Trend Of 2023 Private Adhd Assessment Newcastle Cost
Ask Me Anything: 10 Responses To Your Questions About
Door Doctor Near Me skylight window Replacement
A How-To Guide For Peugeot 207 Key From Start To Finish peugeot 2008 Key fob Not working
Choosing Quite Best Online Poker Game Website 다바오 머니 (http://www.similarityapp.com/forum/index.php?action=profile;u=974798)
Acquaintance With Online Casino Vocabulary Is
Important 에볼루션 주식시장
Engaging You To Ultimately Online Personal Loans: Faster? Or Worst?
다바오 발코니있는 호텔
How To Correctly Use Search Keyword Tools seo 마케팅
I seriously love your blog.. Great colors & theme. Did you develop this amazing site yourself? Please reply back as I’m looking to create my very own blog and want to know where you got this from or what the theme is named. Thanks!
The 10 Scariest Things About Classic Casino Slots casino
slots (http://mariskamast.net:/smf/index.php?action=profile;U=2882191)
3 Reasons Three Reasons Your Fela Claims Railroad Employees Is Broken (And How To Repair It)
legal
Nine Things That Your Parent Teach You About View Our Deals Today View Our Deals Today (http://Shop7.Kokoo.Kr/Bbs/Board.Php?Bo_Table=Inquiry&Wr_Id=39269)
12 Facts About Auto Accident Claim To Make You Think
Twice About The Cooler. Cooler auto accident attorney (Lashawn)
Custom Card Making – Least Expensive Gifts Can Often Mean The Most
다바오 kyc
Bank Repo Cars – Buy Highly Affordable Cars At Auctions 카카오 대출
7 Things You’ve Always Don’t Know About Private ADHD Assessment Edinburgh private adhd assessment devon (Clemmie)
Meet With The Steve Jobs Of The Kia Duplicate Key Industry How To Get A Kia Replacement Key
Personal Loans With Poor Credit Will Assist You Start Fresh 다바오 골프 호텔