flashclicktag

Flash ClickTAG and clickTarget


I am new to flash and JavaScript, and currently try to insert a clickTAG to the FLA and passing the destination URL from outside to clickTAG in order to provide dynamic destination...

I had insert clickTAG like below:

on (release) {
  if (_root.clickTAG.substr(0,5) == "http:") {
    getURL(_root.clickTAG, _root.clickTARGET);
  }
}

While I pass the following URL to clickTAG, everything fine https://stackoverflow.com/

However, when I pass the URL (with variable) to clickTAG, it Trim my variables

http://example.com/abcpage?var1=123&var2=223&var3=224

and become

http://example.com/abcpage?var1=123

My javascript below (partly):

<embed allowScriptAccess="always" wmode="transparent" 
src="http://abcpage/A.swf" 
flashvars="clickTAG=http://example.com/abcpage?var1=123&var2=223&var3=224&clickTARGET=_blank" />

Solution

  • Your problem is that &is used to separate multiple flashvars variables. So, your flash get 4 values instead of 2. The solution is to urlencode your url. It would give you the following embed :

    <embed allowScriptAccess="always" wmode="transparent" 
    src="http://abcpage/A.swf" 
    flashvars="clickTAG=http%3A%2F%2Fexample.com%2Fabcpage%3Fvar1%3D123%26var2%3D223%26var3%3D224&clickTARGET=_blank" />
    

    And that's all !