3 Replies Latest reply on Dec 18, 2014 7:22 AM by rezun8

    clicktag not read

    EvaMartin

      Hello !

      I think my problem may be simple, but this gives me headache ...

      I've done several banners and want to add a simple clicTAG in it.

      in working on AS3, with flah CC.

       

      I've done a transparent object called "button", and converted it as a ...button.

      i tried several pieces of codes, but nothing worked well. The webmasters that should embed the SWF files gave me that :

      button.addEventListener(MouseEvent.CLICK, clickTagLaunch); function clickTagLaunch(e:MouseEvent) {           if(root.loaderInfo.parameters.clickTag != null)        {               navigateToURL(new URLRequest(root.loaderInfo.parameters.clickTag), "_blank");        } }

       

      But when I test the file, it always appears that no  clicktag is found (tested on Adops Tools | Home and test.adform.com)

      i'm exporting my swf on flash player 10.3

       

      I can't find any error in this code, do you people see anything ? If it's not the code, then i must have a publishing setting problem, or something like that, but I can't find what ... Please help !

      Thank you

        • 1. Re: clicktag not read
          rezun8 Level 4

          Hello Platypus

           

          try this code for AS3.0

           

          //######################################################################################## ############//

          //CLICK TAG

          //######################################################################################## ############//

          function handleClick(mouseEvent:MouseEvent):void {

              var interactiveObject:InteractiveObject = mouseEvent.target as InteractiveObject;

              var li:LoaderInfo = LoaderInfo(interactiveObject.root.loaderInfo);

              var url:String = li.parameters.clickTag;

              if (url) {

                  if (ExternalInterface.available) {

                      var userAgent:String = ExternalInterface.call('function(){ return navigator.userAgent; }');

           

           

                      if (userAgent.indexOf("MSIE") >= 0) {

                          ExternalInterface.call('window.open', url, '_blank');

                      } else {

                          navigateToURL(new URLRequest(url), '_blank');

                      }

                  } else {

                      navigateToURL(new URLRequest(url), '_blank');

                  }

              }

          }

          clickTag_btn.addEventListener(MouseEvent.MOUSE_UP,handleClick);

          //######################################################################################## ############//

          1 person found this helpful
          • 2. Re: clicktag not read
            EvaMartin Level 1

            Mmmmh, i tried, thank you rezun, but it still does'nt seem to work.

            I've tried several codes, incuding this one (but I tried again, who knows )

            I Replaced at the last line "clickTag_btn" by my button name.

            Maybe the problem is on the publishing parameters ? here are mine :

             

            or maybe the button should not be a simple button ? Maybe there is something else to do but converting it as a symbol ?

             

             

            Capture.JPG

            • 3. Re: clicktag not read
              rezun8 Level 4

              go ahead and PM me the file and i'll take a quick look at it, My thoughts are that the naming of the buttons might not be correct.

              send it on over

               

              Thx

              R