I'm trying to make an xml based tracklist for a music mix on a website. The code loads the info from the XML file, and displays it in the text field, and I have a UIScrollbar component as well. When I test movie, everything seems to be working fine. However, the swf file is 14.1 MB. The .FLA is only 690kb... so where the hell is the size coming from? I only have text in the xml file, and the code is pretty compact. Why is the swf so big? Here is my code:
I also need to make up about 30 of these... and short of creating 30 copies of this playlist file, is there a way i can call on the xml file in the html code? I know this is possible with mp3 players... an example of which is here:Code:var showX:XML; var showList:XMLList; var output:String = ""; var style:StyleSheet = new StyleSheet(); var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE, onComplete); loader.load(new URLRequest("The_Fixx_DJ_Little_Fever_Show8.xml")); function onComplete(e:Event):void { showX = new XML(loader.data); showList = showX.song; for(var i:uint = 0; i<showList.length(); i++) { var track:Number = (i + 1); if(i<9) { output += "0" + track + ". " + showList[i].number + " " + showList[i].artist + " - " + showList[i].title + "<br>"; } else { output += track + ". " + showList[i].number + " " + showList[i].artist + " - " + showList[i].title + "<br>"; } } show_txt.htmlText = output; }
If anyone knows how this could be done so I can create one shell swf file, and load the xml file in the html/php code. Thanks!!Code:AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','400','height','275','src','playlist_player?xml_path=66011.xml','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','playlist_player?xml_path=66011.xml' );




Reply With Quote
