Only starting from Flash 9 and Actionscript 3 we can reliably use relative path to load data. Let me explain the problem.
say for example we have an swf file named ‘Slide.swf’ in a folder ‘Slide001’ folder which loads ‘data.xml’ using the following statement
This works fine when we directly call the swf, or the html page that embeds the swf stays in the same folder.
But if you load the swf(‘Slide.swf’) inside another swf which resides in the parent folder, ‘data.xml’ is expected at the parent folder instead of ‘Slide001’
Same happens when we move the html to parent folder. The prototype I’ve given below, which finds the path of the current swf can solve this problem.
Once you have the above prototype change the xml.load statement as shown below