There is a clear difference between AS2 and AS3, maybe thats what is causing the problem.

If you trace the clickTag.substr(0,5) value, does it give you the "Http:" value?
I'm no pro, but what is the release on you on function?

These are only suggestions from a noob flasher