如何使用FLASH组件实现下拉条功能(1)(AS3)
的有关信息介绍如下:下拉条是制作FLASH课件时经常会用到的组件,但是对于不怎么会代码的同学,制作这样的效果就比较难了。在这里讲使用TextArea组件实现文字内容下拉条的方法。
打开制作软件,新建AS3文档。
打开组件面板,快捷键(Ctrl+F7)。
找到TextArea组件,用鼠标拖到舞台上,并用任意变形工具进行变形,改变大小。
选择这个组件,在属性面板中点击显示参数按钮打开参数面板。
在属性面板设置该组件的实例名为text_area,最后在主时间轴加如下代码:
text_area.text="asdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfaasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nsdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\nasdfasdfasdfasdfasdfasdf\n";
上面的代码中,\n是代表回车,要注意一下。
好了,简单的下拉条效果就出来了。