- Home
- Articles
- Product Reviews
- Creating custom controls with SPAS 3.0
Creating custom controls with SPAS 3.0
By Pascal ECHEMANN
|
Published January 27, 2009
|
Product Reviews , Intermediate , Flash , Tutorials
|
Unrated

2. Introduction to the SPAS 3.0 control objects API
All controls in SPAS 3.0 must subclass the org.flashapi.swing.core.UIObject class, and implement the org.flashapi.swing.core.IUIObject interface.
The IUIObject interface defines a couple of methods to control IUIObject displaying. These methods signatures are shown below:
public function display(x:Number = undefined, y:Number = undefined):void
public function remove():void
But SPAS 3.0 architeture needs at least 2 other methods to create graphical objects. These methods are used internally and overrides existing actions: createUIObject and refresh. The following lines illustrate the signature of these methods:
override protected function createUIObject(x:Number = undefined, y:Number = undefined):void
override protected function refresh():void
These four methods are the base API for creating graphical objects with SPAS 3.0.
