Flash CS4教程:AS3制作非常漂亮的曲线
本教程是使用Flash CS4或者Flex Builder 3里面的Actionscript3.0实现的一种非常漂亮的曲线特效! 最终效果: 下面大致介绍下制作的流程,文章的最后提供源码下载。其中的一些英文没有给大家翻译啊!呵呵 建立一个ActionScript 3.0项目或者类如果你用的是 Flex Builder 那么你就创建一个新的ActionScript 3.0项目,命名为LineEffect。如果你使用的是Flash CS3 or CS4创建一个新的文档(ActionScript 3.0)命名为LineEffect.as 。 package { Same ImportsAgain, if you use Flex Builder (Flex Builder I use too), it is not mandatory to write this step, because Flex Builder automatically imports when it sees something unknown. But if you use Flash CS3 or CS4 is required to write this step. import flash.display.Graphics; import flash.display.MovieClip; import flash.display.Sprite; import flash.events.Event; import flash.events.MouseEvent; import flash.filters.BlurFilter; import flash.filters.DropShadowFilter; import flash.filters.GlowFilter; import flash.text.TextField; import flash.utils.getTimer; [SWF(width = "600", height = "400", frameRate = "30", backgroundColor = "#000000", pageTitle = "Line Effect")] If you are confused about this line of code: [SWF(width = "600", height = "400", frameRate = "30", backgroundColor = "#000000", pageTitle = "Line Effect")] Well, here we set the width, height, framerate, backgroundColor and the title of the SWF file. Declaring VariablesTo be easier for your future reference, I’ve declared variables for each color line. But before colors we need to declare a Sprite because we want to draw a line, and apply an effect to it. After that we will declare an Array that will help to animate the line. At the end we will declare the buttons with text as also line colors. The line colors consists in a BlurFilter, two GlowFilter and a DropShadowFilter. The code looks like that: public class LineEffect extends Spr |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |