摘要: 在写 actionscript的时候经常犯的一个错误就是把从DisplayObjectContainer继承下来的类去addChild(DisplayObject)的时候总是忘了设置宽度,虽然不影响可视,但是当你需要用到那个width的时候却是0,这是经常容易忽视的问题。就像初中考数学经常粗心一样,其实经常出现只能说明注意力不够集中,水平还不够。 阅读全文
posted @ 2011-03-16 10:55 lyqandgdp 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 默认的情况下,表头会写headerText属性的文字,但是有时候想customize header就得用到AdvancedDataGridColumn.headerRender属性,这时候可以自己实现一个headerRender,但是数据的传输是个问题,数据的传输一般采用headerText属性,这是一个字符串,因此可以考虑使用xml进行传输,将xml转成String类型,传入,再解析回即可。 阅读全文
posted @ 2011-03-14 23:24 lyqandgdp 阅读(233) 评论(1) 推荐(0) 编辑
摘要: 通过AdvancedDataGrid的headerSortSeparatorSkin的属性设置可以改变其head SortSaparator的样式,默认为undifined,设置成mx.skins.ProgrammaticSkin可以消除该线。 阅读全文
posted @ 2011-03-14 17:03 lyqandgdp 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 关于DisplayObject的width和height属性的问题,主要两点记住:1.当没有使用graphics去绘制内容时, 其width和height一定是0.2.child DisplayObject对其宽度和高度没有影响。注意:这里是DisplayObject类和其一些子类。UIComponent并不如此。There are something to explain about the height and width of DisplayObject.1: If there is no content in the instanceof DisplayObject(except fo 阅读全文
posted @ 2011-03-12 22:42 lyqandgdp 阅读(248) 评论(0) 推荐(0) 编辑
摘要: Implement the Singleton In AS3The following example implementthe Singleton In AS3 at the run-time.I don’t know if there is some other way toimplement the Singleton in Compile-time.From http://www.tink.ws/blog/stricter-singletons/Strict Singletons in AS 3.0With As 3.0 conforming to ECMA there you can 阅读全文
posted @ 2011-03-11 20:55 lyqandgdp 阅读(185) 评论(0) 推荐(0) 编辑
摘要: A Way to implement Abstract Class In FlexIt’s a fact that, until now(3.0) the ActionScript doesn’t implement theabstract class, it has Interface, but the abstract class is very useful whenyou have some logic that is fixed, and these class extends the class have somesame methods(logic), and some othe 阅读全文
posted @ 2011-03-11 20:39 lyqandgdp 阅读(493) 评论(0) 推荐(0) 编辑
摘要: 在典型的可视化开发环境中,你能够在应用程序中选中并且拖动一个对象在屏幕中来回移动。Flex Drag and Drop管理器能够让用户选中一个对象,比如List控件的一个元素,或者一个控件比如Image控件,并且拖动他们跨过一个元素,放到另一个元素中。所有的Flex组件支持拖放操作。Flex在拖放方面对一些控件,比如List,Tree和DataGrid,都有额外的功能支持。开始阶段用户通过使用鼠标选中一个组件,或组件中的元素,然后按住鼠标移动组件或元素移动,来发起一个拖放操作。例如,用户用鼠标选择一个List控件的元素,然后按住鼠标左键移动几个像素。这个被选择的组件就叫做“拖动开始点”(dra 阅读全文
posted @ 2011-03-11 15:52 lyqandgdp 阅读(1132) 评论(0) 推荐(0) 编辑
摘要: //bill.lee created in 2011.2.10//version 1.0package { public class Color { // contructor, use a number // actionscript的构造函数不能重载 public function Color(color:String) { this.stringValue = color; } //--------------set value in different format------------- // set value by integer (real value) public fun 阅读全文
posted @ 2011-03-08 20:48 lyqandgdp 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 在某些情况下需要通过配置文件来获取类名进而进行实例化。<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()"> <mx:Script> <![CDATA[ import flash.utils.getDefinitionByName 阅读全文
posted @ 2011-03-08 20:40 lyqandgdp 阅读(141) 评论(0) 推荐(0) 编辑
摘要: //the following is a piece of simple code for assessing the xml config file in the projectpackage { import flash.xml.XMLDocument; public class ConfigLoader { import flash.events.Event; import flash.net.URLLoader; import flash.net.URLRequest; import mx.controls.Alert; public function ConfigLoader() { 阅读全文
posted @ 2011-03-08 20:07 lyqandgdp 阅读(321) 评论(0) 推荐(0) 编辑