Write a program to create custom list in ActionScript?
Write a program to create custom list in ActionScript?
- To create the custom list there is a need of the parent to child relationship and a hierarchy needs to be maintained.
- There is a way to access the parent and children without or with adding of new nodes in the link.
- To create a custom list in ActionScript there is a need of the variables and listing:
package{
import fl.controls.List;
import fl.controls.Label;
import flash.display.*;
import flash.events.Event;
import flash.net.URLRequest;
import flash.events.IOErrorEvent;
public class ListTest extends MovieClip{
public function ListTest(){
var imageHolder = new MovieClip();
imageHolder.width = 140;
imageHolder.height = 140;
var theSprite = new Sprite();
theSprite.height = 150;
var theMsg = new Label();
theMsg.text = "something";
theSprite.addChild(theMsg);
trace("text = " + theSprite.getChildAt(0).text);
}