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