A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Need help with linking buttons urls from xml

  1. #1
    Registered User
    Join Date
    Mar 2012
    Posts
    1

    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

  2. #2
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center