Here's a really weird one: I created a Flash 8 swf -- using
Actionscript 2.0 -- compiled it as a Flash 8 swf, but it doesn't work
in the Flash 8 player. It does, however, work in the Flash 9 player.

The file loads data in from multiple xml files. It actually works
fine, even in Flash 8, if I only try to load from nine xml files, but
as-soon-as I ad a tenth file, it stops working. By stops working, I
mean that when the swf runs, I only see the Stage background.

This same swf (without being changed in any way or recompiled) works
fine in the Flash 9 player.

The 8 player doesn't seem to be balking at the amount of xml, because
if I cut the code from the tenth xml file and paste it into the 9th
file, everything works fine. It just seems to choke on ten files.

//works in Flash player 8 and 9
var strXmlPath:String =
"file1.xml,flie2.xml,file3.xml,file4.xml,file5.xml,file6.xml,file7.xml,file8.xml,file9.xml";

//works only in Flash player 9
//var strXmlPath:String =
"file1.xml,flie2.xml,file3.xml,file4.xml,file5.xml,file6.xml,file7.xml,file8.xml,file9.xml,file10.xml";

var xml:XML = new XML();
var arrXmlPaths:Array = new Array();
var arrXmlLoaders:Array = new Array();
var numXmlFilesLoaded:Number = 0;

function parseXML(str:String):Void
{
        var xml:XML = new XML();
        var strXml:String;
        
        xml.ignoreWhite = true;
        
        arrXmlPaths = str.split(","); //get list of xml files
        for (var i:Number = 0; i < arrXmlPaths.length; i++)
        {
                strXml = arrXmlPaths[i];
                arrXmlLoaders[i] = new XML();
                arrXmlLoaders[i].ignoreWhite = true;
                arrXmlLoaders[i].onLoad = xmlFileDoneLoading;
                arrXmlLoaders[i].load(strXml);
        }
}

function xmlFileDoneLoading():Void
{
        numXmlFilesLoaded++;
        divideXmlIntoArrays(this);
        
       //have all the xml files loaded?
        if (numXmlFilesLoaded == arrXmlPaths.length)
        {
                parseMediaArray();
                parseMediaHolderArrayAndMakeMediaHolders();
                parseAndSetUpImmediateRelationships();
        }
}
_______________________________________________
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