Copy link to clipboard
Copied
Dear Folks,
trying hardly to use embed tag to implement an XML-File.
Followed these instructions and tried it nummerous times on different places in the code:
http://dispatchevent.org/roger/embed-almost-anything-in-your-swf/
Code:
###
[Embed(source="test.xml", mimeType="text/xml")]
protected const EmbeddedXML:Class;
var x:XML = XML(new EmbeddedXML());
trace(x.toXMLString()); //it should work!
###
Can somebody confirm that this should work in Flash Professional project / AS3 (no Flex)
Best,
Cedric
Copy link to clipboard
Copied
This works for me:
...
[Embed(source="test.xml", mimeType="application/octet-stream")]
private const EmbeddedXML:Class;...
trace(XML(new EmbeddedXML()));
(Note the mimeType is not text/xml but application/octet-stream)
Find more inspiration, events, and resources on the new Adobe Community
Explore Now