Flash CS4教程:AS3制作非常漂亮的曲线5
一路求学网 http://www.16qiuxue.com 阅览次数: 107次 11-23 13:05:53
标签:flash教程制作,flash动画教程,flash教程下载,http://www.16qiuxue.com
Flash CS4教程:AS3制作非常漂亮的曲线5,
Draw the buttons and make the click events
Now we write a function for each button that applies the colors and effects we have created in the beginning. On each function we insert the text buttons into the stage by drawing it with actionscript 3.0 using the drawRect class and we choose the rectangle fill color. Then we create a second function inside this one which calls the MouseEvent we have mentioned above and will start the effect.
private function drawFireBtn(obj:MovieClip):void { with(obj.graphics) { beginFill(0x0000ff,0); drawRect(0,0,20,20); endFill(); } fireTF.text = "Fire" fireTF.textColor = 0x666666; fireTF.mouseEnabled = false; fireTF.selectable = false; this.addChild(obj); obj.buttonMode = true; obj.addChild(fireTF); obj.x = 20; obj.y = 380; } private function makeFire(E:MouseEvent):void { sp.filters = [bf,growFilter,growFilter_b,dropShadow]; } private function drawSkyBtn(obj:MovieClip):void { with(obj.graphics) { beginFill(0x0000ff,0); drawRect(0,0,20,20); endFill(); } skyTF.text = "Sky" skyTF.textColor = 0x666666; skyTF.mouseEnabled = false; skyTF.selectable = false; this.addChild(obj); obj.buttonMode = true; obj.addChild(skyTF); obj.x = 70; obj.y = 380; } private function makeSky(e:MouseEvent):void { sp.filters = [bf,growFilter_2,growFilter_b_2,dropShadow_2]; } private function drawGrassBtn(obj:MovieClip):void { with(obj.graphics) { beginFill(0x0000ff,0); drawRect(0,0,25,20); endFill(); } grassTF.text = "Grass" grassTF.textColor = 0x666666; grassTF.mouseEnabled = false; grassTF.selectable = false; this.addChild(obj); obj.buttonMode = true; obj.addChild(grassTF); obj.x = 120; obj.y = 380; } private function makeGrass(e:MouseEvent):void { sp.filters = [bf,growFilter_3,growFilter_b_3,dropShadow_3]; } private function drawSunBtn(obj:MovieClip):void { with(obj.graphics) { beginFill(0x0000ff,0); drawRect(0,0,20,20); endFill(); } sunTF.text = "Sun" sunTF.textColor = 0x666666; sunTF.mouseEnabled = false; sunTF.selectable = false; this.addChild(obj); obj.buttonMode = true; obj.addChild(sunTF); obj.x = 170; obj.y = 380; } private function makeSun(e:MouseEvent):void { sp.filters = [bf,growFilter_4,growFilter_b_4,dropShadow_4]; } } }
This was the Line Effect tutorial. I hope it will be usefull for many of you. Now you can try to create your own line effects and drop a comment mentioning the url of your experiments. We are always looking for the results of our tutorials.
源文件下载:http://www.webjx.com/files/soft/1_090619181757.zip
,Flash CS4教程:AS3制作非常漂亮的曲线5《Flash CS4教程:AS3制作非常漂亮的曲线5》相关文章
- Flash CS4教程:AS3制作非常漂亮的曲线5
- › FlashAS3.0实例教程:喷泉动画特效
- › Flash教程:片头加载loading的制作方法
- › 将FlashVars写在JS函数中,实现变量更新与后台同步(推荐)
- › Flash教程:制作卡片翻转动态效果
- › Flash CS3仿真艺术设计教程:封套工具的变形
- › Flash CS3仿真艺术设计教程:封套工具的应用
- › Flash教程:AS制作加载外部.swf影片的视频播放器
- › Flash cs3仿真艺术设计1.15:全新的Flash界面
- › Flash技巧:组合技巧制作吸引人的动画0
- › Flash实例教程:飞机阴影跟随飞机飞翔5
- › Flash AS教程:propertydata问题解决
- › Flash动画制作技巧:动物行走动画制作揭秘
- 在百度中搜索相关文章:Flash CS4教程:AS3制作非常漂亮的曲线5
- 在谷歌中搜索相关文章:Flash CS4教程:AS3制作非常漂亮的曲线5
- 在soso中搜索相关文章:Flash CS4教程:AS3制作非常漂亮的曲线5
- 在搜狗中搜索相关文章:Flash CS4教程:AS3制作非常漂亮的曲线5
- tag: Flash教程,flash教程制作,flash动画教程,flash教程下载,平面设计教程 - Flash教程