how do I make a text link to a page/url in my flash movie?
Do I have to make a button out of each word that is a link?
EG if I have a long text in my movie and I want one word of that text to be a link to another page?
Printable View
how do I make a text link to a page/url in my flash movie?
Do I have to make a button out of each word that is a link?
EG if I have a long text in my movie and I want one word of that text to be a link to another page?
This will show you how to create a array of links in your text file and flash.
1. Create a Dynamic Text
2. assign an Instance Name (Example: mylinks)
3. set to "render as HTML (Look for "<>" in the Properties window)
4. Set your lines to Multiline (in the Properties window)
5. create a text file with your links Example below
link0=<a href="http://www.wattsupnow.com/" target="_blank"> Wattsupnow Designs</a>&link1=<a href="http://www.flashkit.com" target="_blank"> Flashkit</a>&
6. put your text file in the same directory as your .swf
7. Add the actionscript to your .swf
Actionscript on first frame or where needed
Code:txtLoad = new LoadVars ();
txtLoad.load ("mylinks.txt");
linkfile = new Array ();
txtLoad.onLoad = function (success) {
if (success){
for (p = 0; ; p++){
if (this["link" + p] != undefined){
mylinks.htmlText = mylinks.htmlText+this["link" + p] + newline;
}else{
break;
}
}
}
};
stop ();