Skip to main content
Inspiring
March 26, 2008
Answered

Is it possible to load new XML into SWF

  • March 26, 2008
  • 5 replies
  • 348 views
It would sure save a lot of energy, time, headbanging, etc. I have searched and can't come up with an answer. I am willing to chase it if I know it's out there, but I hate to waste a week on an idea just find it can't be done. I want to reload and XML file and update the info within an existing swf, without reloading the swf. Can it be done? Anybody know?
This topic has been closed for replies.
Correct answer _postdBy_Vern__
Thanks for looking in. I got it.

I used the addChild for the list component, then just remove it and reload with XML. I created an array that tracks the history and used that for a back button.

Havin' some fun now! :)

5 replies

_postdBy_Vern__AuthorCorrect answer
Inspiring
March 27, 2008
Thanks for looking in. I got it.

I used the addChild for the list component, then just remove it and reload with XML. I created an array that tracks the history and used that for a back button.

Havin' some fun now! :)
Inspiring
March 27, 2008
OK, this looks like it is going to work, I just have one issue .. I think.

I am using the loaded xml to generate a list of buttons in a list box. Once a button is clicked, I have the functions all working, sending he correct data, loading the correct xml. The problem is, it's not removing the old. It just adds to what is in the list box already - no good. How can I get rid of what is there? I have been searching for removal techniques but I am coming up empty so far.

Thanks for any help!
Damon Edwards
Inspiring
March 26, 2008
you're welcome Vern.
Inspiring
March 26, 2008
That is exactly what I was thinking in my head. Just didn't want to go after it if there was something that would keep it from being done.

Thanks AGAIN dzedward!! :)
Damon Edwards
Inspiring
March 26, 2008
Yes, it can be done. Create a function that parses your XML. When you're ready to load new data, call that function, but just step through different nodes.