Skip to main content
May 31, 2006
Question

looping loadvars

  • May 31, 2006
  • 1 reply
  • 107 views
Hi
I'm writing a site in Flash where I want some of the copy to be dynamic, ie client can replace copy in text files that are loaded into the swf at runtime.

I've been able to do it using the first bit of code below but since there are 15 external files I would like to do it in a loop. I found some code at http://proto.layer51.com/ (I hope it's OK to use) in the LoadVars section that looks like it should do the trick and I've tweaked to suit. (2nd chunk )

Tracing summaries._loadedVars.toString() tells me that both files are in the _loadedVars array. Where it's falling over is in the onAllLoaded function. The loop never gets past 0 despite _loadedVars.length being 2.

Can anyone see where my problem may be? Thanks in advance for any help you may be able to give.

regards

This topic has been closed for replies.

1 reply

May 31, 2006
Further...

OK - this is (I think) officially weird. I've mucked about with the onAllLoaded function.