This content has been marked as final. Show 4 replies
You could have an attribute or a tag that would hold the path to the image.
<sometag img=' http://www.myDomain.com/images/myImage.jpg'>somethingHere</sometag>
Would I have to define this tag in the Actionscript in the FLA? If so, where?
Below is the Actionscript that loads the XML file, putting data into 3 dynamic text fields on the stage ("day_txt", "performer_txt" and "info_txt"). Ideally, I'd want the image to be embedded in the "info_txt" text.
I assume your XML looks something like this...
You could add the image info anywhere you want in the XML. Perhaps an attribute of the PerformerName tag?
<PerformerName image=' http://www.myDomain.com/images/myImage.jpg'>SomeInfoHere</PerformerName>
When you parse the XML data and build your Array, then you just need to capture the additional tag attribute. Similar to how you got the date attribute.
Then at that point you would add it into the textField of your info_txt.
Read this page in the docs to see how to add the image.