I finally decided to bite the bullet and try to convert my as2 code to
as3. I've gone though some tutorials on how to create classes. I can't
seem to figure how how to chose what to import at the beginning of the
class. plus I get an error:
"**Error** C:\Documents and Settings\Carl Welch\My
Documents\WORK\collective_Sessions\jointJamXMLloader.as : Line 11,
Column 41 : [Compiler] Error #1017: The definition of base class
MovieClip was not found.
public class jointJamXMLloader extends MovieClip {
ReferenceError: Error #1065: Variable jointJamXMLloader is not defined."

"jointJamXMLloader" is the name of my class - and I think I'm supposed
put "public class jointJamXMLloader extends MovieClip {" before my
script - but as3 seems to hate it or something. Can someone tell me
what I'm doing wrong? here's my "class": thanks....

package {
 import flash.events.Event;
 import flash.events.ErrorEvent;
 import flash.events.EventDispatcher;
 import flash.events.IEventDispatcher;
 import flash.net.URLLoader;
 import flash.net.URLRequest;
 import flash.util.flash_proxy;
 import flash.util.Proxy;
 import flash.util.trace;
 public class jointJamXMLloader extends MovieClip {
 static private var instance:Settings;
 private var eventDispatcher:EventDispatcher;
 private var urlLoader:URLLoader;
 private var data:XML;
        
        
var request:URLRequest = new URLRequest("CarlWelch_Songs2.xml")
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onComplete);
loader.load(request);

function onComplete(evt:Event){
trace('onComplete');
var xdata:XML = new XML(loader.data);
        
songAmount = xdata.entry.length();
trace("songAmount: " +songAmount);

trace();
        
for(iii=0;iii<songAmount;iii++){
trace(xdata.entry[iii].attributes());
numberOfTracks = xdata.entry[iii].child("file").length();
trace("numberOfTracks: " + numberOfTracks);
trace();
for(ii=0;ii<numberOfTracks;ii++){
        
trace(xdata..entry[iii].file[ii].trackCreator.text());
trace(xdata..entry[iii].file[ii].path.text());
trace(xdata..entry[iii].file[ii].desc.text());
trace(xdata..entry[iii].file[ii].isDownloadable.text());
trace(xdata..entry[iii].file[ii].creatorIcon.text());
trace(xdata..entry[iii].file[ii].volume.text());
trace(xdata..entry[iii].file[ii].PAN.text());
                        
trace();
}
trace("**************************");
trace();
}

}
}
}


--
Carl Welch
http://www.carlwelch.com
[EMAIL PROTECTED]
805.403.4819
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to