[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 377
  • Last Modified:

Using XML to create a hyperlink in flash

Okay here is a seemingly dumb qustion...how do I create a link in a dynamic text box using XML?
0
frankybones
Asked:
frankybones
  • 2
  • 2
1 Solution
 
MontoyaProcess Improvement MgrCommented:
use this tutorial:

http://www.kirupa.com/developer/actionscript/xmldataflash.htm

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


myvar="http:/www.experts-exchange.com";

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

my_btn.onRelease=function(){
getURL(myvar,"_blank");
}

And that's all there is to it.



0
 
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?

FB
0
 
frankybonesAuthor Commented:
/\ did I just make this more complicated than it need be?
0
 
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?

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now