Using XML to create a hyperlink in flash

Okay here is a seemingly dumb do I create a link in a dynamic text box using XML?
Who is Participating?
MontoyaProcess Improvement MgrCommented:
use this tutorial:

load the data from xml as in the info above. Then, of course, your data will include a URL as in:


You will place that in your button by doing something like:


And that's all there is to it.

frankybonesAuthor Commented:
Hey Iammontoya,

Thanks for taking a look, you are always really helpful.

I am familiar with loading text from an XML, and thats what that tutorial shows, so I am confident I understand that part.  I was think there would be some way to designate it so what you are saying is that I am going to have to create a button and designate the number of buttons via XML and just implement the XML inside of the button and load that into the MC in place of the dynamic text box huh?

frankybonesAuthor Commented:
/\ did I just make this more complicated than it need be?
MontoyaProcess Improvement MgrCommented:
Well, the only way to link a button to getURL is through the code (yes, and the property panel).
With that in mind, you'd have to generate the code and have some sort of assignment to a variable in your code to the button.

Now, if you wanted, you could create all those variables and such at runtime, but I think that actually complicates things.

However, you dont have to load the xml inside each button. Load the xml once. You will load the xml values into the values of your variables. Your buttons will use the variables to get the URL.

You know how this goes, Frankybones. There are many ways to skin a cat, and this is no exception. YOu could load all your values from XMl into an array, and then use the array index to assign values to the button getURL, so and so forth. You follow?

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.