完成的效果就如上
只要記得把caurina.transitions.properties.FilterShortcuts引用進來初始化
其他應該就沒有啥問題了
範例中的舞台上只有放一個叫做『gotoUrlBtn』的MovieClip
裡面包著一個『url_txt』的動態文字跟寫上『gotoUrlBtn』的靜態文字
附上在影格中的程式碼:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | import flash.events.*; import flash.filters.GlowFilter; import caurina.transitions.*; import caurina.transitions.properties.FilterShortcuts; FilterShortcuts.init(); var changeTxtTimer:Timer=new Timer(300); var transition:String="easeOutExpo"; //GlowFilter(color:uint = 0xFF0000, alpha:Number = 1.0, blurX:Number = 6.0, blurY:Number = 6.0, strength:Number = 2, quality:int = 1, inner:Boolean = false, knockout:Boolean = false) var glowIn:GlowFilter=new GlowFilter(0xffffff,0.9,2,2,10,5); var glowOut:GlowFilter=new GlowFilter(0xffffff,0,2,2,10,5); //gotoUrlBtn.url_txt.cacheAsBitmap = true; gotoUrlBtn.buttonMode=true; gotoUrlBtn.addEventListener(MouseEvent.CLICK,gotoUrlBtnDown); gotoUrlBtn.addEventListener(MouseEvent.ROLL_OVER,gotoUrlBtnOver); gotoUrlBtn.addEventListener(MouseEvent.ROLL_OUT,gotoUrlBtnOut); function gotoUrlBtnOver(e:MouseEvent):void { Tweener.addTween(gotoUrlBtn.url_txt, {_filter:glowIn, time:0.3, transition:transition}); } function gotoUrlBtnDown(e:MouseEvent):void { } function gotoUrlBtnOut(e:MouseEvent):void { Tweener.addTween(gotoUrlBtn.url_txt, {_filter:glowOut, time:0.3, transition:transition}); } |
先收下來,爾後有機會再來研究!^^
還不錯炫喔^^
看到這一篇教學,
感到好熟悉呀~~
梅干好久沒碰Flash了~~
看來改天也得再來玩一玩~~
不然真的快忘光了~
呵~
黑阿 就是怕忘光才自己想堆有的沒的^^”
這樣的文字特效滿好看的耶!
你可以拿回去試試阿
GlowFilter(0xffffff,0.9,2,2,10,5);
要改效果就改這邊…