Creatives :

ActionScript 2.0 / ActionScript 3.0

The Flash banners that will be displayed in smartadserver, should relate to this turorial in order for it's link to be editable for modification without having to edit the flash banner itself.

Step 1: Create a new movie clip symbol(F8) : when you press the F8 button, the following window will appear. The symbol type should be set to Movie clip type.

Step 2: Give your Movie Clip (created previously) an instance name : in the text field intended for that matter, simply write: mvcClick. Se window below.

Step 3: Insert the following code in the action window : select the first frame of your timeline press "F9".

mvcClick.addEventListener(MouseEvent.CLICK,onClickTag);

function onClickTag(e:Event){
     var fcTg = ''; var fcTt = '_blank';
     var cTgM = 'clicktag'; var cTtM = 'clicktarget';
     var prop;

     for (prop in this.root.loaderInfo.parameters) {
          var p = prop.toLowerCase();
          if (p == cTgM && cFcTg(this.root.loaderInfo.parameters[prop]))
          fcTg = this.root.loaderInfo.parameters[prop];
          if (p == cTtM) fcTt = this.root.loaderInfo.parameters[prop];
     }
     if(fcTg == '' || fcTt == '_blank')
     for (prop in root.loaderInfo.parameters) {
          if (p == cTgM && cFcTg(root.loaderInfo.parameters[prop]) && fcTg == '') fcTg = root.loaderInfo.parameters[prop];
          if (p == cTtM && fcTt == '_blank') fcTt = root.loaderInfo.parameters[prop];
     }
     if (cFcTg(fcTg)) navigateToURL(new URLRequest(fcTg), fcTt);
     else navigateToURL(new URLRequest("http://noclicktagfound"), fcTt);
}

function cFcTg(t) {
     return (t.substr(0, 7) == 'http://' || t.substr(0, 8) == 'https://');
}


NOTE:It's important that you use the following code as is. (clickTAG, "_blank") and not a regular link (http://www...)

The Action window should look like this:

The "clicktag" variable can be modified and if there's more than one URL, you can create other buttons with the same method and modify the value of the variable but it's important to tell it to the operators.

coins ronds