收藏本站 | 广告设计 | 设计素材 | 教程 | ppt素材 | 中职 | 范文 | 常识 | 学习方法 | 作文  
订阅
首页
高考试题中考试卷学习方法范文写作作文大全公务员考试英语考试中职教育生活常识评语大全
热门: 广告设计 设计素材 教程 ppt素材 自考试卷 计算机等级考试 财会类考试 建筑工程考试 医药类考试 考研 电脑学习 驾照考试 语录名言好词 周公解梦 偏方
当前位置:一路求学网文章频道平面设计教程Flash教程Flash CS4教程:AS3制作非常漂亮的曲线5

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

上一页  [1] [2] 

,Flash CS4教程:AS3制作非常漂亮的曲线5

网友评论>>

联系我们 | 网站地图 | 广告设计 | 设计素材 | 教程大全 | ppt素材 | 中职教育 | 范文大全 | 常识大全 | 学习方法 | 作文大全
一路求学网 版权所有. Copyright © - http://www.16qiuxue.com. All rights reserved.
学习方法_小学英语作文_驾照考试试题_幼儿园大班评语
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18