Classes
Posted by Paulus T on Jan 6th, 2008
2008
Jan 6
In ActionScript there are sealed class and dynamic class. And in ActionScript 2.0, sealed class enforcement were only handled by the compiler. Which mean we still can do some workaround the restriction using array access operator to reference variables. For example :
var mysound:Sound = new Sound(); mysound['myownvalue'] = 2;
In ActionScript 3.0, we can not longer do that workaround. Sealed classes enforced are not only in compile time, but also in runtime. So we must note which objects are dynamic and which are not. And here is the list of dynamic classes that commonly used :
- Array
- Object
- Date
- Dictionary
- Error
- MovieClip
- RegExp
- StyleSheet
- URL Variables
- XML and XMLList
Other Languages: