Skip to content

Instantly share code, notes, and snippets.

@dz0ny
Created March 18, 2011 13:48
Show Gist options
  • Select an option

  • Save dz0ny/876089 to your computer and use it in GitHub Desktop.

Select an option

Save dz0ny/876089 to your computer and use it in GitHub Desktop.
Primer kode za oglas v AS2
//AS2 primer kode
on (release) {
if ((_root.clickTAG != "") && (_root.clickTAG != null)) {
geturl (_root.clickTAG, "_blank");
} else if ((_root.clickthru != "") && (_root.clickthru != null)) {
geturl (_root.clickthru, "_blank");
} else if ((_root.url != "") && (_root.url != null)) {
geturl (_root.url, "_blank");
} else {
geturl ("http://www.mojaspletnastran.si", "_blank");
}
}
//AS3 primer kode
javni_objekt_v_flasho_kolju.addEventListener(MouseEvent.CLICK,function(){
var clickTAG:* = root.loaderInfo.parameters.clickTAG;
var clickthru:* = root.loaderInfo.parameters.clickthru;
if(clickTAG != undefined && clickTAG.substr(0, 5) == "http:"){
navigateToURL(new URLRequest(clickTAG));
}
else if(clickthru != undefined && clickthru.substr(0, 5) == "http:"){
navigateToURL(new URLRequest(clickthru));
}else {
navigateToURL(new URLRequest("http://www.mojaspletnastran.si"));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment