利用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"}); }
important site have a peek at this site 837857
useful site learn more here 2936754
mail order drugs without a prescription
вывод из запоя в стационаре анонимно вывод из запоя в стационаре анонимно .
вывод из запоя круглосуточно сочи вывод из запоя круглосуточно сочи .
как сделать загранпаспорт быстро как сделать загранпаспорт быстро .
this post continue reading this 7164148
special info pop over here 3919011
какой процессор лучше topcpu.ru .
you can look here go to the website 612188
Learn The ADHD Symptoms In Women Tricks The Celebs Are Using adhd adult female Symptoms [jamesnerve7.Werite.Net]
сравнение производительности процессоров https://topcpu.ru .
look at this now their website 4063085
Magparehistro sa https://vip-slot.com – vip slot at tanggapin ang espesyal na welcome bonus na $100! Ito ay isang regalo para sa mga bagong user na nais maranasan ang saya ng online casino gaming. Gamitin ang bonus para subukan ang mga sikat na laro at manalo nang higit pa. Madaling mag-sign up, kaya’t simulan na ang iyong journey ngayon!
website click here for info 9632827
nedra2021.ru/ — индивидуальный проект под любой запрос.
Pretty! This was an incredibly wonderful article. Many thanks for supplying this information.
Simulan ang iyong https://gemini-ph.com – gemini journey nang may libreng $100! Magparehistro bilang bagong user at makuha ang espesyal na bonus para sa mga laro tulad ng baccarat, slots, at live casino. Ang simpleng registration process ay nagbibigay sa iyo ng dagdag na advantage. Sumali na ngayon!
Makakuha ng Bonus na $100 Sa Unang Pagparehistro sa https://eclipse-ph.com – eclipse!
https://www.tellern.com Telegram应用是开源的,Telegram下载的程序支持可重现的构建。Telegram同时适用于以下环境:Android安卓端,iPhone 和 iPad及MacOS的Apple端,Windows/Mac/Linux桌面版
https://art-ph.com – art casino Online Support: Tugon sa Iyong Mga Tanong 24/7
sweet bonanza yorumlar: sweet bonanza giris – sweet bonanza demo oyna
The Top Reasons People Succeed At The Replacement Door Lock Industry window lock repairs near me
deneme bonusu veren yeni siteler: yeni deneme bonusu veren siteler – deneme bonusu veren yeni siteler
https://candykitchen.ru — Candy Kitchen предлагает лучшие решения для кухонь.
Paano Makakuha ng Registration Bonus sa https://mr-mobi-casino.com – mr mobi? Sundan Ito!
Large Fridge Freezer UK Tools To Improve Your Daily Life Large Fridge Freezer UK Trick That Every Person Must Be Able To
large fridge freezer uk (Leigh)
Ang https://defineslot.com – define slot App ay may mabilis at makatarungang gaming environment. I-download at i-install ito upang maranasan ang optimized na interface ng app para sa mas magaan na paglalaro. Mag-enjoy ka sa iyong mga paboritong laro nang walang delay.
https://casinositeleri25.com/# canl? casino siteleri
casino bahis siteleri Canl? Casino Siteleri Canl? Casino Siteleri