Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamically generated buttons links

Status
Not open for further replies.

Flashoid

Technical User
Dec 11, 2002
163
US
Is there a way to generate the url link in the hit state of a button (an animated button, not a text link url) in a swf using a dynamically generated txt file?

For example in a swf I have an animated button with this code below in it so it loads page2.html. Is there a way to dynamically load the url path (page2.html) so if you needed to update the url you could open up the txt file and make the edit there rather then opening up each flash file to update/edit the url?


on (press) {
getURL("page2.html");
}


any help would be great.

thanks!
 
Any ideas how? I know how to create use dynamically generated text using txt files but no idea how to have it work with a button.
 
This is what I have currently that dynamically pulls and displays an html text link. I would like it pull a link for an animated button:

layer one code:

//declare a loadvars object for the text
theData = new LoadVars();
//the function to call once the text has been loaded
theData.onLoad = function(success){
if(success){
//data has loaded
//text file variable named input
theText.html = true;
theText.htmlText = theData.input;
}else{
//data did not load for whatever reason
theText.text = "Text file FAILED to load."
}
}
//text file to load
theData.load("load2.txt");
//attaching the scrollbar (optional)
bar.setScrollTarget(theText);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top