Hello all, it’s been awhile since I’ve posted here. Glad to see things are still going strong!
So right to it!
I’ve got a flash application that is extremely simple in presentation and (in my mind) functionality.
Essentially this thing has 2 dynamic text fields that will display text. I have a movie clip in the image of a preloader where there are 100 frames. This movieclip will go to a specific frame based on a number that is fed into a function that determines the current frame setting.
My issue is that, I need these variables (two text strings, and the number for the frame setting) to be populated based on an XML string that will be pushed to the flash via a Javascript funtion from within the containing HTML page.
This is an example of the code that will be sending the variables to flash:
window.document.flashmoviename.SetVariable("xmlstring", "here is my xml string");
The xml string will be formatted like this:
<values>
<val>56</val>
<val>25</val>
<val>200,000</val>
</values>
What I’m asking is how can I listen for this in flash, and further how can I use the string in flash? Would I just use it as if it were an xml document and be able to target the different nodes? Would I need to have a different string for each variable I want to use in flash? This string will be getting updated every 3 seconds to show changes in the movie it controls. Do I need to add a timer to this? I’m thinking that if I add an eventlistener, it will throw an error because of the frequency of the updated XML string.
My first thought is that I can use externalInterface for this. But I’m not sure how.
Thanks in advance!