利用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)}); } }
emex 3 serial keybfdcm
bd86983c93 olwegio
erythromycin eye ointment side effects erythromycin topical
Download Opnet Modeler 14.5 Full Version Free
bd86983c93 hendrail
slate digital fg x crack straight
bd86983c93 athyel
plagiarism detector software crack keygen
bd86983c93 golcher
plagiarism detector software crack keygen
bd86983c93 golcher
Shadow Hills Mastering Compressor Torrents
bd86983c93 ridldevo
Just want to say what a great blog you got here!I’ve been around for quite a lot of time, but finally decided to show my appreciation of your work!
can i take 40mg of cialis best price for daily cialis buy cialis in canada
descargar calculo aplicado hoffmann pdf
bd86983c93 wrajash
You write Formidable articles, keep up good work.
This is something that will need all of our combined efforts to address.
download film evil dead sub indo mp4
bd86983c93 letitad
Download Microsoft Office Access Database Engine 2007 64 Bit
bd86983c93 forgman
Pixelpipe Uploadr
b22440cf97 harsyr
purchase tadalafil pill – modafinil price oral provigil 100mg
cialis 20 mg usa cialis cialis made in the usa
The sketch is tasteful, your authored material stylish.
Good points – – it will make a difference with my parents.
Thanks for sharing the information. I found the information very useful. That’s a awesome story you posted. I will come back to scan some more.
professional cialis tadalafil without a doctor’s prescription cialis paypal australia
cialis cheep tadalafil 20mg mex rx cialis
doxycycline usa – clomiphene 100mg cheap order tadalafil 20mg pills
viagra 100mg price sildenafil 20 mg where to buy viagra
https://nooorasa.ru/2022/05/25/girls-dresses-preteen-tween-teen-young-woman-mix-imgsrc-ru_63711275phb-dress-imgsrc-ru/
75260afe70 alisfin
http://www.lexgardenclubs.org/?p=2404
75260afe70 farmich
http://persianorings.com/girls-img_4741-1152×1536-imgsrc-ru/
75260afe70 haiwhelm
https://cyclades.in/en/?p=12980
75260afe70 jeosal
https://aurespectdesoi.be/tres-sombreros-de-copa/
75260afe70 kensha
https://paulinesafrica.org/?p=68320
75260afe70 charimel