XML Playlist - Hows My coding?

I made a flash actionscript 3.0 flash file and named it samplexml.fla and defined the document class as samplexml

I added two components to it, first one a text field 198x16 pixels and set it to dynamic text, and gave it a instance name of messageXML

the second component is a list component, and set it to 198x100 pixels with a instance name of musicXML

I then made a XML file and named it samplexml.xml and put the following into its contents:


<?xml version="1.0" encoding="iso-8859-1"?>
<songs>
    <title name="My Playlist"></title>
    <song name="song name 1" data="song location 1"></song>
    <song name="song name 2" data="song location 2"></song>
    <song name="song name 3" data="song location 3"></song>
    <song name="song name 4" data="song location 4"></song>
    <song name="song name 5" data="song location 5"></song>
    <song name="song name 6" data="song location 6"></song>
</songs>

I made a action script 3.0 file and gave it the name samplexml.as and coded the following to it:


package {
    import flash.events.*;
    import flash.utils.*;
    import flash.display.MovieClip;
    import flash.xml.XMLDocument;
    import flash.net.URLRequest;
    import flash.net.URLLoader;
    import fl.data.DataProvider;
    import fl.controls.List;
    import fl.events.ListEvent;
    import flash.text.TextField;

    public class samplexml extends MovieClip {
        
        public var xmlLoader:URLLoader;
        public var musicXML:DataProvider = new DataProvider();
        
        public function samplexml() {
            var xmlString:URLRequest = new URLRequest("samplexml.xml"); 
            // prep loader
            xmlLoader = new URLLoader;  
            // setup events
            xmlLoader.addEventListener("ioError", failedXML);
            xmlLoader.addEventListener("complete", loadedXML);
            // load xml file
            xmlLoader.load(xmlString);
        }

        // successful load
        function loadedXML(event:Event):void
        {
            var myXML:XML = XML(event.target.data);
            if (myXML.song.length() == 0) {
                messageXML.text = "XML Invalid.";
            } else {
                for (var i:int = 0; i < myXML.song.length(); i++) {
                    musicXML.addItem ( {label: ""+myXML.song*[email protected]+"", data: ""+myXML.song*[email protected]+"" } );
                }
                listXML.dataProvider = musicXML;
                listXML.selectedItem = 0;
                messageXML.text = [email protected];
            }
        }
        
        // unsucessful load
        private function failedXML(e:Event):void{
            messageXML.text = "XML LOAD FAILED";
        }
    }
}

I think its pretty clean coding but if anyone has suggestions on how to clean it up some more please let me know, I’m pretty new to Action Script 3.0 (5th day in) and any help would be appreciated. This is just one piece of a larger project.