摘要: 界面的元件全部使用 Flash CS3 自带的组件: 首先,放入 TextInput 组件(实例名 input_txt),作为用户输入; 再放入 Button 组件(实例名 submit_btn),用于提交输入的信息; 最后放入 TextArea 组件(实例名 output_txt),显示聊天信息。二、组件参数初始化 由于客户端代码不是很多,我们这次就写在动作帧上:// ************ 组件参数初始化 ************submit_btn.label = "发送消息";output_txt.editable = false;// 设置各组件中字体的大小input_txt.se 阅读全文
posted @ 2011-02-17 17:40 as爱好者 阅读(648) 评论(0) 推荐(0) 编辑
摘要: setChildIndex常用有以下几种:置顶:容器.setChildIndex(对象A,容器.numChildren-1);置底:容器.setChildIndex(对象A,0);插入对象B的前面:容器.setChildIndex(对象A,容器.getChildIndex(对象B));插入对象B的后面:容器.setChildIndex(对象A,容器.getChildIndex(对象B)-1); 阅读全文
posted @ 2011-02-17 17:40 as爱好者 阅读(4207) 评论(0) 推荐(0) 编辑
摘要: 在FLASH中我们可以使用setStyle来设置组件的样式..可对于像List/ComboBox/DataGrid这类数据显示类的组件...使用setStyle("textFormat",textFormat)并不会设置其中的数据区域的文本样式..那是因为这类组件..显示数据部份为CellRenderer..而对组件setStyle并不会影响到CellRenderer..我们应当调用setRendererStyle方法来另外对CellRenderer进行设置像list.setRendererStyle("textFormat",new TextFormat("宋体",14,0xFF6600)) 阅读全文
posted @ 2011-02-17 17:39 as爱好者 阅读(783) 评论(0) 推荐(0) 编辑
摘要: 最近在看BitmapData这个类,对这个东西也不是很熟悉,所以在网上看了一些资料,现在把他们都整理了一下,我想通过以下这些会让大家会对BitmapData这东西有个深刻的了解,对大家的理解有所帮助。利用BitmapData的优势:我们知道传统的矢量渲染模式下,任何元件的位移和变型以及任何改变显示的变化都会使得Flashplayer对其进行绘制,并渲染到显示器。(Fl9以后有所优化,但改变不了根本)而BitmapData可以先进行像素数据的操作,操作之后在进行渲染。并且跳过FP的绘制,直接将像素数据交给显示渲染。开发游戏的角色使用mc(影片)还是BitmapData?很多的游戏,都是使用mc的 阅读全文
posted @ 2011-02-17 17:38 as爱好者 阅读(7534) 评论(1) 推荐(1) 编辑
摘要: var comicSansTF:TextFormat = new TextFormat();comicSansTF.font = "黑体";x_cb.textField.setStyle("textFormat", comicSansTF);x_cb.dropdown.setRendererStyle("textFormat", comicSansTF); 阅读全文
posted @ 2011-02-17 17:37 as爱好者 阅读(435) 评论(0) 推荐(0) 编辑
摘要: public final class Randompublic static function get boolean() : Booleanpublic static function get wave() : intpublic static function get color() : uintpublic static function integet(num : int) : intpublic static function number(num : int) : Numberpublic static function char(…args) : Stringpub 阅读全文
posted @ 2011-02-17 17:36 as爱好者 阅读(459) 评论(0) 推荐(0) 编辑
摘要: import com.greensock.*; import com.greensock.easing.*;TweenMax.to(mc, 2, {colorMatrixFilter:{saturation:0}}); 阅读全文
posted @ 2011-02-17 17:33 as爱好者 阅读(215) 评论(0) 推荐(0) 编辑