# Asfunction in \*.htmlText

**URL:** https://forum.kirupa.com/t/asfunction-in-htmltext/51854
**Category:** Uncategorized
**Created:** [May 17, 2004, 9:29pm UTC](https://forum.kirupa.com/t/asfunction-in-htmltext/51854 "2004-05-17T21:29:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Disco\_Stu1](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@Disco\_Stu1](https://forum.kirupa.com/u/Disco_Stu1)
#### Post date: [May 17, 2004, 9:29pm UTC](https://forum.kirupa.com/t/asfunction-in-htmltext/51854/1 "2004-05-17T21:29:10Z")

</div>

How do I have an actionscript loaded text piece execute a function? I figured this is how it should work, but its not working…

(scroll right until the red text)

```auto
step2.onPress = function() {
	_parent.stepText.htmlText = "This is the text for the 2nd step<br><br> - <font color='#0000FF'><a href='estimateform_blank.html'>Print up a blank Estimate Form</a></font><br><br> - <font color='#0000FF'[COLOR=Red]><a href='asfunction:_parent.estimateForm'>[/COLOR]Prepare an Estimate Form Online</a></font>";
	}

```

Everything displays fine, but the function doesn’t execute. Is this correct syntax?
