PDA

View Full Version : Dynamic HTML Text... Hyperlink Triggers Function?



vids
July 22nd, 2004, 12:40 PM
I have a flash movie with a dynamic loading textfield formatted in html. What I'm looking to do is format (using a tag?) the loaded html code to have a hyperlink (<a href?>) gotoAndPlay(2) or perform other functions. Anyone familiar with how to go about this?

Thanks
-Mike

stringy
July 22nd, 2004, 04:08 PM
I have a flash movie with a dynamic loading textfield formatted in html. What I'm looking to do is format (using a tag?) the loaded html code to have a hyperlink (<a href?>) gotoAndPlay(2) or perform other functions. Anyone familiar with how to go about this?

Thanks
-Mike

in the textfile href.txt
vars=<a href="asfunction:GOTO">click to Jump Frame </a>

in Flash

stop();
lv = new loadVars();
lv.onLoad = function() {
myText.htmlText = this.vars;
};
lv.load("href.txt");
function GOTO() {
_root.GotoAndPlay(5);
}

vids
July 22nd, 2004, 05:20 PM
Thanks, worked like a charm.

Do you know what syntax I need to pass a variable through the asfunction?

Say for example I want to go to the frame labelled "thankyou" and change the GOTO function to GOTO(theLabel).

The vars=<a href="asfunction:GOTO???... and scripting the html code for quotation marks to contain a variable ("thank you" ) would you use %22, '/, or other syntax?

vids
July 22nd, 2004, 09:20 PM
I've found it. http://www.kirupaforum.com/forums/showthread.php?s=&threadid=42654& a simple comma, such as asfunction:GOTO,thankyou will pass the value "thankyou" into the function's 'theLabel' parameter.

Thanks again.
-Mike