A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: xml based dynamic text field with huge swf file

Threaded View

  1. #1
    Member
    Join Date
    Feb 2009
    Posts
    30

    xml based dynamic text field with huge swf file

    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:

    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;
    }
    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:
    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' );
    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!!
    Last edited by djsting; 03-16-2009 at 01:30 AM. Reason: something to add

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center