-
Need help with linking buttons urls from xml
Can anyone help me with this problem I have.
I have a gfx which I have created 6 shapes and converted them into simple buttons. I have urls sat inside an xml file. How can I get the buttons to use the urls set from within the xml file?
Also how can I change the current external photo that is being loaded to load the url from a setting in the same xml file.
I hope you arnt as confused as I am right now.
I have packaged up the flash file which includeds the xml aswell.
If anyone could help me out with this I would be very greatful.
Thanks All
Flash Files
-
You'll need to load your XML using a URLLoader, see example in the livedocs for XML: http://help.adobe.com/en_US/FlashPla.../XML.html#XML()
Listen for the URLLoader's COMPLETE event. In that listener, you'll parse the text into XML, then query that XML for the data you want. Then, you'll have to associate the properties of your instances to the data from the XML file. The way you do that will depend on how you expect them to relate.
To load an image based on a URL you get from an XML file is no different than loading an image with a URL you got any other way. Create a Loader, tell it to load that URL.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|