First of all, your AJAX call has some errors in it. It needs to look like:
$.ajax({
url: reg.php,
cache: false,
type: "GET",
data: ID
});
( and ) needed to be added.
http://api.jquery.com/jQuery.ajax/
Second, what I would do is send the user to your own website and add a parameter to the url so you can record the url, and in the JavaScript (or even better, your PHP) function, send them off to the correct website.
So something like:
on (release) {
if (clickTAG.substr(0,5) == "http:") {
getURL('http://www.yourownurl.com/reg.php?url=' + clickTAG, "_blank");
}
}
And in your reg.php you do something to save the clickTag and use header('location:' . $_GET['url']) to send them to the correct website.
Update:
If you want to use ExternalInterface you can do the following:
on (release) {
if (clickTAG.substr(0,5) == "http:") {
ExternalInterface.call('regUserid', clickTAG);
}
}
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/ExternalInterface.html
That is assuming you want to send the data to your regUserid function. clickTag is the parameter in the function regUserid.
If you do this you still need to redirect your user to the right website. So something like document.location.href="http://www.example.com".