-
1. Re: how do I add a clicktag and loop 3 times to a banner done with flash cc2014 html5 canvas?
kglad Nov 4, 2014 7:06 AM (in response to rodrigo2x)the js needed is the same as the as except you don't type the variables and you prefix them with 'this',
last frame of loop:
if(!this.alreadyExecuted){
this.alreadyExecuted=true;
this.loopNum=1;
} else {
this.loopNum++;
if(this.loopNum==3){
this.stop();
}
}
-
2. Re: how do I add a clicktag and loop 3 times to a banner done with flash cc2014 html5 canvas?
rodrigo2x Nov 4, 2014 7:19 AM (in response to kglad)Thanks, works great for loops. Any ideas on adding a clicktag on Javascript?
-
3. Re: how do I add a clicktag and loop 3 times to a banner done with flash cc2014 html5 canvas?
kglad Nov 4, 2014 8:11 AM (in response to rodrigo2x)i don't remember what clicktag is. what's it look it in actionscript?
-
4. Re: how do I add a clicktag and loop 3 times to a banner done with flash cc2014 html5 canvas?
rodrigo2x Nov 4, 2014 8:14 AM (in response to kglad)AS3
import flash.events.MouseEvent;
import flash.net.URLRequest;
import flash.net.navigateToURL;
click_btn.addEventListener(MouseEvent.MOUSE_UP, onClick);
function onClick(e:MouseEvent):void {
var click_url:String = root.loaderInfo.parameters.clickTAG;
if(click_url) {
navigateToURL(new URLRequest(click_url), '_blank');
}
}
AS2
click_btn_name.onRelease = function(){
getURL(_root.clickTAG, '_blank');
}
-
5. Re: how do I add a clicktag and loop 3 times to a banner done with flash cc2014 html5 canvas?
kglad Nov 4, 2014 12:34 PM (in response to rodrigo2x)js:
this.click_btn.addEventListener('click', onClick);
function onClick() {
click_url = MovieClip(root).loaderInfo.parameters.clickTAG;
if(click_url) {
window.location=click_url;
}
}
-
6. Re: how do I add a clicktag and loop 3 times to a banner done with flash cc2014 html5 canvas?
rodrigo2x Nov 4, 2014 9:31 PM (in response to kglad)Thanks very much, will try it out. Does the click event on Flash works good for touch devices?
-
7. Re: how do I add a clicktag and loop 3 times to a banner done with flash cc2014 html5 canvas?
kglad Nov 5, 2014 7:35 AM (in response to rodrigo2x)i use the 'mousedown' event. it's more reliable with touch:
this.click_btn.addEventListener('mousedown', f);


