# Asfunction help please

**URL:** https://forum.kirupa.com/t/asfunction-help-please/277456
**Category:** Uncategorized
**Created:** [December 12, 2008, 5:52am UTC](https://forum.kirupa.com/t/asfunction-help-please/277456 "2008-12-12T05:52:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![newcoda](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@newcoda](https://forum.kirupa.com/u/newcoda)
#### Post date: [December 12, 2008, 5:52am UTC](https://forum.kirupa.com/t/asfunction-help-please/277456/1 "2008-12-12T05:52:30Z")

</div>

Im not sure this is even doable, but based on my limited knowledge I dont see why it isnt working. I am having asfunction passing a simple arg, a string, to a function. In that function I am trying to compare the arg to another var, to see if they are identical strings. It wont work… not real sure why, I am guessing a weakness in asfunction I am unaware of, or just a general weakness on my ability. I thought maybe eq instead of == but nothing. Anyone that can shed some light on this, or another way to accomplish this would be great, thanks.

```auto
var cat:String = "CLICK ME";
var rat:String = "test";
var dog:String = "test";
test_tf.htmlText += '<A HREF=\'asfunction:Test_Func,'+rat+' \'>'+cat+'</a>';
function Test_Func(arg:String) {
	trace(arg);
	trace(dog);
	if (dog == arg) {
		trace("success");
	}
}

```
