views:

14

answers:

1

Hi, OK, I have a situation where I use loadvars to load an xml file, which has the address of 2 swf's on the server. I can trace the xml items so know they are loading. So I'm trying to load the swf's but am running into problems. First problem, the swf always gives an error when I publish from flash, "TypeError: Error #2007: Parameter url must be non-null." as it can't find the mention of the xml file, as it's just being published. I'm not sure this affects the next issue which is the swf not loading when I try to load it like this:

var loader:Loader = new Loader();
var defaultSWF:URLRequest = new URLRequest(loadswf1); // where I know loadswf1 = "myswf.swf"
loader.load(defaultSWF);

any advice appreciated, Thanks

A: 

Sorry if I'm stating the obvious but there's very little code to go by... Are you starting to load your SWFs after the XML loading has completed?

PatrickS
Hi Thanks for reply, yes, I make sure the xml is loaded and I write the three swf locations to a dynamic textfield on stage to make sure, then assign those swf names to variables. Then I invoke that bit of loading code you see above, but it's still not working...when I provide "myswf.swf" instead of loadswf1 it loads it fine, so It has to be something wrong with my assigning the variable name to loadswf1...?
Jack
it may be a problem with the scope of your variables, is everything at the same level or do you have code inside various MovieClips?
PatrickS
Hi, No, there is no code in movieclips, it's all in a few classes. I think it might be scope based too, I'm looking at this as a possible way to work it out:http://greenethumb.com/article/11/global-variables-in-as3
Jack