# Dynamic HTML Text... Hyperlink Triggers Function?

**URL:** <https://forum.kirupa.com/t/dynamic-html-text-hyperlink-triggers-function/58454>\
**Category:** flash\
**Created:** [July 22, 2004, 4:40pm UTC](https://forum.kirupa.com/t/dynamic-html-text-hyperlink-triggers-function/58454 "2004-07-22T16:40:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vids](https://avatars.discourse-cdn.com/v4/letter/v/7ba0ec/32.png) [@vids](https://forum.kirupa.com/u/vids)\
**Post date:** [July 22, 2004, 4:40pm UTC](https://forum.kirupa.com/t/dynamic-html-text-hyperlink-triggers-function/58454/1 "2004-07-22T16:40:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 22, 2004, 8:08pm UTC](https://forum.kirupa.com/t/dynamic-html-text-hyperlink-triggers-function/58454/2 "2004-07-22T20:08:21Z")

</div>

> [@vids](#):
>
> 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);  
}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 22, 2004, 9:20pm UTC](https://forum.kirupa.com/t/dynamic-html-text-hyperlink-triggers-function/58454/3 "2004-07-22T21:20:06Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 23, 2004, 1:20am UTC](https://forum.kirupa.com/t/dynamic-html-text-hyperlink-triggers-function/58454/4 "2004-07-23T01:20:27Z")

</div>

I’ve found it. [http://www.kirupaforum.com/forums/showthread.php?s=&threadid=42654&](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
