Dynamic HTML Text... Hyperlink Triggers Function?

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);
}

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?

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