这个flash实现的效果是通过人工设置线段的起始点和结束点的坐标,来实现对线段的交互控制.
点这里下载演示效果文件
点这里下载源文件
下面是偶的制作步骤,呵呵
(1)新建一个flash文档,按ctrl+f8,创建一个mc,命名为"线",内容为一条线段,让线段位置居中.(2)进入主场景的操作.场景含由个图层,分别为“线”,“文本”,“按钮”。把线mc拖入场景中的“线”层。在文本层中新建4个静态文本和4个动态文本,按钮层当然是放一个按钮了,呵呵(这样做的目的是为了养成一个良好的创作习惯),如图:
screen.width-333)this.width=screen.width-333" border=0>
(3)4个动态文本的变量依次设置为:x1,y1,x2,y2,设置如图:
screen.width-333)this.width=screen.width-333" border=0>
screen.width-333)this.width=screen.width-333" border=0>
screen.width-333)this.width=screen.width-333" border=0>
screen.width-333)this.width=screen.width-333" border=0>
(4)下面是代码的编写了.选择按钮元件,打开动作面板,写如下代码:
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器