adspace


Have you built any components with actionscript? If so explain how you did it?

Answer Posted / Gyanesh Kumar

Yes, I have built custom components using ActionScript. To create a component, you typically create an AS file that extends the UIComponent class and define its structure, properties, and behaviors. The Component can then be added to the display list like any other DisplayObject. Here's an example:
package {
import flash.display.*;
import flash.events.*;

public class MyComponent extends UIComponent {
private var _label:TextField;

public function MyComponent() {
init();
}

protected function init():void {
_label = new TextField();
addChild(_label);
}

public function setLabel(value:String):void {
if (_label) _label.text = value;
}
}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

No New Questions to Answer in this Category !!    You can

Post New Questions

Answer Questions in Different Category