///pc/img/blank.gif" width="12" height="8" border="0">当前位置:///default.htm" class="under">亿度网络 -> ///pc/index.htm" class="under">网页制作教程 -> Flash实例


/pc/bin/msg.pl?file_id=k_flashjq31 target="_blank">///pc/img/message.gif" width="64" height="54" alt="请您留言" border="0">
谈谈您的看法

///pc/img/blank.gif" width="1" height="1" border="0">
31.用Flash制作一简单表单

预览成品:在输入框中输入您想要输入的内容,然后按提交按钮,这时从输出框中将输出输入框中的内容,按清除按钮,将清除输入框中的内容。

///pc/homepage/flashsl/flash31/swf/32.zip"> 下载源程序


逐步说明:
  1)新建一电影文件。
  2)点击工具栏中的文字工具///pc/homepage/flashsl/flash31/img/001.gif" width="23" height="22" align="absmiddle" alt="文字工具">,按下参数栏中的///pc/homepage/flashsl/flash31/img/002.gif" width="22" height="21" align="absmiddle">按钮,然后在工作区的适当位置拉出一文本框。

///pc/homepage/flashsl/flash31/img/003.gif" width="357" height="81" alt="文本框">

选择箭头工具,用鼠标右键点击它,在弹出的菜单中选择Properties项,

///pc/homepage/flashsl/flash31/img/004.gif" width="138" height="212" alt="属性菜单">

设置其变量为“text1”,其他参数为默认。

///pc/homepage/flashsl/flash31/img/005.gif" width="358" height="216" alt="设置变量">

设置完毕,点击OK按钮,关闭属性对话框。
  3)点击工具栏中的文字工具,再次点击参数栏中的///pc/homepage/flashsl/flash31/img/006.gif" width="25" height="23" align="absmiddle">按钮,使它处于未按下状态,然后在文本框的左边输入文字“输入”,并适当调整其位置。

///pc/homepage/flashsl/flash31/img/007.gif" width="267" height="40" alt="输入文字“输入”">

  4)同理在文本框的下方制作另一文本框,设置其变量为“text2”,并为不可编辑。然后在左边输入文字“输出”。

///pc/homepage/flashsl/flash31/img/008.gif" width="271" height="106" alt="输出文本框">

  5)制作一按钮btn,

///pc/homepage/flashsl/flash31/img/009.gif" width="368" height="154" alt="按钮btn">

并从图符资料库中拉入到工作区中,复制它,并调整位置为如图所示。

///pc/homepage/flashsl/flash31/img/010.gif" width="322" height="146" alt="拉入按钮">

  6)点击工具栏中的文字工具,在左边的按钮上方输入文字“提交”,在右边按钮的上方输入文字“清除”。

///pc/homepage/flashsl/flash31/img/011.gif" width="319" height="40" alt="在按钮上输入文字">

  7)双击左边的按钮,在弹出的对话框中切换到Actions,输入语句:

///pc/homepage/flashsl/flash31/img/012.gif" width="346" height="133" alt="输入提交按钮的Actions">

On (Release)
 Set Variable: "text2" = text1
End On
即表示;当点击该按钮时,变量名为“text2“的文本框中将显示变量名为“text1”的文本框中的内容。
  8)设置右边按钮的Actions为:

///pc/homepage/flashsl/flash31/img/013.gif" width="341" height="132" alt="输入右按钮的Actions">

On (Release)
 Set Variable: "text2" = ""
End On
即表示:当点击该按钮时,变量名为“text2”的文本框将显示为空。


上一实例(彩虹文字)  下一实例(遮照效果)

/pc/bin/msg.pl?file_id=k_flashjq31 target="_blank">///pc/img/message.gif" width="64" height="54" alt="请您留言" border="0">
谈谈您的看法

 

网页制作 网页设计 网站建设 网站设计 网站制作 做网站 做网页