利用Tweener製作動畫 – 數大便是美
套用徐志摩的名言:「數大」便是美,意思是說數量多就是美,不過雖然數大便是美,但如果要針對多個元件製作動畫,那利用程式一定會比手工來的輕鬆,甚至可以更漂亮和壯觀,以下的範例就是利用Tweener針對較多的元件來製作動畫的結果,分享給大家參考!希望各位未來不會「數大」便是累。
Tweener 滿天星斗:利用Tweener針對星形製作Alpha動畫,是一個很簡單的範例。
import caurina.transitions.Tweener import flash.display.MovieClip; setInterval(starFn,50) function starFn(){ var scale:Number=Math.random() var mc:MovieClip=new star mc.x=Math.random()*500 mc.y=Math.random()*500 mc.scaleX=scale mc.scaleY=scale mc.alpha=0 addChild(mc) Tweener.addTween(mc, {alpha:1, time:7, transition:"linear"}); Tweener.addTween(mc, {alpha:0, time:3,delay:8, transition:"linear"}); }
Tweener 擴散效果:利用Tweener針對球體來製作動畫,其中還應用到距離計算的Class,可以試著調整參數(彈出距離變數、彈出數量…等)來觀察改變的情況。
import flash.display.Sprite; import roMc; import flash.geom.Point; import caurina.transitions.Tweener; //變數定義區塊 var centerPoint:Point = new Point ;//圓形中心點 var i:int = 1;//迴圈變數 var radius:int = 50;//彈出距離變數 var no:int = 20;//彈出數量 var circleArray:Array=new Array//球體陣列(針對移除使用) var sec:int=1//動畫秒數 var hold:Number=0.1//延遲秒數 centerPoint.x = stage.stageWidth / 2; centerPoint.y = stage.stageHeight / 2; stage.addEventListener(MouseEvent.CLICK,clickFn); function clickFn(e:MouseEvent) { while (circleArray.length > 0) { removeChild(circleArray.pop()); } Tweener.removeAllTweens(); showFn(); } function showFn() { for (i=1; i<=no; i++) { var mc:Sprite = new ball ; circleArray.push(mc) var angle:Number = 2 * Math.PI / no * i; var targetPoint:Point = new Point(); targetPoint.x = radius * Math.cos(angle) + centerPoint.x; targetPoint.y = radius * Math.sin(angle) + centerPoint.y; addChild(mc); mc.x = centerPoint.x; mc.y = centerPoint.y; mc.alpha = 0; Tweener.addTween(mc, {alpha:1,x:targetPoint.x,y:targetPoint.y, time:sec, transition:"linear",delay:i*hold}); Tweener.addTween(mc, {alpha:0,x:centerPoint.x,y:centerPoint.y, time:sec, transition:"linear",delay:i*hold+(no*hold+1)}); } }
order provigil 100mg without prescription
gerlat 7bd55e62be https://www.lamplighteracademy.com/profile/gardenewindfrieda/profile
queehel 7bd55e62be https://www.spirenderom.no/profile/flowingmakenzey/profile
provigil order online order provigil
jymvan 7bd55e62be https://www.soleiarts.com/profile/rashandajadrien/profile
kailshe 7bd55e62be https://www.musicboxpete.com/profile/Veyi-Padagalu-Book-Pdf-Download-FULL/profile
bertkald 7bd55e62be https://www.playwise.co.in/profile/Anurag-Pro-10-Full-Version-2021-Crack-60/profile
frennat 7bd55e62be https://www.penthousecoffee.org/profile/Ls-Dreams-Ls-Land-Issue-Lsd03-10-02-Mpg-Ls-Issue-vanetere/profile
ed drugs compared erectile dysfunction medicines new ed drugs
erythromycin base 250mg https://erythromycin1m.com/#
taitjaci 7bd55e62be https://www.animationmanu63.com/profile/devontamarilyneostafie/profile
provigil 100mg without prescription provigil ca
anthamfr 353a2c1c90 https://laboratoriomediatico.wixsite.com/laboratorio-2-0/profile/goodnessgoodness/profile
ysboli 353a2c1c90 https://stanarcaheartzden.wixsite.com/dranalsiofa/post/sai-flexisign-pro-10-dongle-cracked-heels-latest-2022
buy fildena 100mg pills – ivermectin uk coronavirus ivermectin stromectol
berdoli 353a2c1c90 https://keyminlingtecburk.wixsite.com/zoombgangdeter/post/complex-edition-v1-6-8-cracked-by-termica-termolar
santasp 353a2c1c90 https://www.therentowl.com/profile/hassallholisshassall/profile
yemisha 353a2c1c90 https://www.cakeresume.com/portfolios/gpib-card-driver-and-visa32-free-download-zbysphil
cheap erectile dysfunction pills ed pills online best pills for ed
wyktsant 353a2c1c90 https://www.khadzcomm.com/profile/Ethnos-55-Francais-chazvera/profile
zylsil 353a2c1c90 https://ginabenak.wixsite.com/website/profile/Google-Earth-Pro-8545495-Repack-PortableLatest-Download-2022/profile
pineran 353a2c1c90 https://www.quizzypedia.com/profile/Soal-Ujian-Ut-Non-Pendas-Ilmu-Sosial-Dan-Budaya-13-abakar/profile
mornlin 353a2c1c90 https://www.nicolesbeautybar.nl/profile/jessalinagaline/profile
goonjav 353a2c1c90 https://www.homestart.co.il/profile/benyt6aurorebenyt6/profile
pegcomr 353a2c1c90 https://www.cosmicconsciousness.com.au/profile/shereeshereesaadiq/profile
kaysta 353a2c1c90 https://roktiremute.wixsite.com/tebolilea/post/roy-full-movie-in-hindi-free-download-hd-720p-odiula
queefarr 353a2c1c90 https://ko-fi.com/post/Solidworks-2010-Crack-Sldappu-dll-rar-Updated-D1D2CPE9X
marikaa 353a2c1c90 https://www.hypnotizetulum.com/profile/baldurbalduramadyah/profile
gaupei 353a2c1c90 https://wakelet.com/wake/esDjfZACaxoh42gS_x9gY
whaele 353a2c1c90 https://www.fiora.in/profile/ulalyaramsdynulalya/profile