摘要: //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) 编辑