I know how to access external XML file in ActionScript 2, however in this project the requirement is that the SWF file must be self-contained.
The reason I’m keeping the XML is because it’s the output of another program, so if I can keep the XML as it is, I avoid manual data input.
I understand that there’s the meta-tag available in AS3, but I’m stuck with AS2 unfortunately.
Is there a way to embed the XML file, or read the data and store as a variable at compile/publish time with ActionScript 2?
After testing extensively, I found that my limitation is too much to depend solely on Flash to solve my problems.
Because I’m limited to AS2 and I can’t use external XML, it means that…
So what I did was create a separate HTML page, using jQuery I load the target XML file and clean up all the data the Flash file doesn’t make use of, and spit out the result onto a div, properly escaping angled brackets and quotes, this way the result XML data is small enough to fit into a textfield on the stage that I can use as input.
So the work flow becomes:
It might be another step, but HTML/JavaScript can run anywhere and is pretty braindead simple for my users, so it ended up being a good solution considering my limitations.