Highlighted

Add Exit Function to my adobe animate CC banner advert so it can be uploaded to Google Ad Manger?

New Here ,
Sep 09, 2020

Copy link to clipboard

Copied

Hi, I have created a simple banner advert in adobe animate. I have added a 'go to website' actionscript to the timeline. The published advert workes fine in any internet browser however after emailing the zipped file to the advertisers website to be uploaded to Google Ad Manger, they reply saying that the html5 file cannot be uploaded as there is no 'exit function'. I Have very little coding experience and i'm really at a loss of what to do. Can anyone help?

Thanks Ryan

TOPICS
ActionScript, Ad development, Code, Error, How to, Import and export, Other

Views

54

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Add Exit Function to my adobe animate CC banner advert so it can be uploaded to Google Ad Manger?

New Here ,
Sep 09, 2020

Copy link to clipboard

Copied

Hi, I have created a simple banner advert in adobe animate. I have added a 'go to website' actionscript to the timeline. The published advert workes fine in any internet browser however after emailing the zipped file to the advertisers website to be uploaded to Google Ad Manger, they reply saying that the html5 file cannot be uploaded as there is no 'exit function'. I Have very little coding experience and i'm really at a loss of what to do. Can anyone help?

Thanks Ryan

TOPICS
ActionScript, Ad development, Code, Error, How to, Import and export, Other

Views

55

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 09, 2020 0
Adobe Community Professional ,
Sep 09, 2020

Copy link to clipboard

Copied

you shouldn't be using actionscript.  you should be using javascript.

 

assuming that was a typo on your part, recheck you go to website coding (and show here if you need more help) because according to google support (https://support.google.com/richmedia/answer/2672517?hl=en😞  "An exit is an area of the ad that when clicked, leads you to an advertiser's website."

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 09, 2020 0
New Here ,
Sep 09, 2020

Copy link to clipboard

Copied

Hi Kglad, thanks for your reply. Yes actionscript was an error sorry! I am using an html5 canvas and meant I had added 'go to website' in the code snipets. The coding for the advert is as follows (thanks for taking a look):

 

(function (cjs, an) {
var p; // shortcut to reference prototypes
var lib={};var ss={};var img={};
lib.ssMetadata = [
  {name:"300x250 Agriland sept 2020_HTML5 Canvas V2_atlas_1", frames: [[0,0,300,250],[0,252,300,250],[0,504,300,250],[0,756,300,250]]}
];

(lib.AnMovieClip = function(){
 this.actionFrames = [];
 this.gotoAndPlay = function(positionOrLabel){
  cjs.MovieClip.prototype.gotoAndPlay.call(this,positionOrLabel);
 }
 this.play = function(){
  cjs.MovieClip.prototype.play.call(this);
 }
 this.gotoAndStop = function(positionOrLabel){
  cjs.MovieClip.prototype.gotoAndStop.call(this,positionOrLabel);
 }
 this.stop = function(){
  cjs.MovieClip.prototype.stop.call(this);
 }
}).prototype = p = new cjs.MovieClip();
// symbols:
 
(lib.AgrilandMRec300x250Sept20201 = function() {
 this.initialize(ss["300x250 Agriland sept 2020_HTML5 Canvas V2_atlas_1"]);
 this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite();
 
(lib.AgrilandMRec300x250Sept20202 = function() {
 this.initialize(ss["300x250 Agriland sept 2020_HTML5 Canvas V2_atlas_1"]);
 this.gotoAndStop(1);
}).prototype = p = new cjs.Sprite();
 
(lib.AgrilandMRec300x250Sept20203 = function() {
 this.initialize(ss["300x250 Agriland sept 2020_HTML5 Canvas V2_atlas_1"]);
 this.gotoAndStop(2);
}).prototype = p = new cjs.Sprite();
 
(lib.AgrilandMRec300x250Sept20204 = function() {
 this.initialize(ss["300x250 Agriland sept 2020_HTML5 Canvas V2_atlas_1"]);
 this.gotoAndStop(3);
}).prototype = p = new cjs.Sprite();
 
(lib.Tween8 = function(mode,startPosition,loop,reversed) {
if (loop == null) { loop = true; }
if (reversed == null) { reversed = false; }
 var props = new Object();
 props.mode = mode;
 props.startPosition = startPosition;
 props.labels = {};
 props.loop = loop;
 props.reversed = reversed;
 cjs.MovieClip.apply(this,[props]);
 // Layer_1
 this.instance = new lib.AgrilandMRec300x250Sept20204();
 this.instance.setTransform(-150,-125);
 this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));
 this._renderFirstFrame();
}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-150,-125,300,250);

(lib.Tween7 = function(mode,startPosition,loop,reversed) {
if (loop == null) { loop = true; }
if (reversed == null) { reversed = false; }
 var props = new Object();
 props.mode = mode;
 props.startPosition = startPosition;
 props.labels = {};
 props.loop = loop;
 props.reversed = reversed;
 cjs.MovieClip.apply(this,[props]);
 // Layer_1
 this.instance = new lib.AgrilandMRec300x250Sept20204();
 this.instance.setTransform(-150,-125);
 this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));
 this._renderFirstFrame();
}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-150,-125,300,250);

(lib.Tween6 = function(mode,startPosition,loop,reversed) {
if (loop == null) { loop = true; }
if (reversed == null) { reversed = false; }
 var props = new Object();
 props.mode = mode;
 props.startPosition = startPosition;
 props.labels = {};
 props.loop = loop;
 props.reversed = reversed;
 cjs.MovieClip.apply(this,[props]);
 // Layer_1
 this.instance = new lib.AgrilandMRec300x250Sept20203();
 this.instance.setTransform(-150,-125);
 this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));
 this._renderFirstFrame();
}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-150,-125,300,250);

(lib.Tween5 = function(mode,startPosition,loop,reversed) {
if (loop == null) { loop = true; }
if (reversed == null) { reversed = false; }
 var props = new Object();
 props.mode = mode;
 props.startPosition = startPosition;
 props.labels = {};
 props.loop = loop;
 props.reversed = reversed;
 cjs.MovieClip.apply(this,[props]);
 // Layer_1
 this.instance = new lib.AgrilandMRec300x250Sept20203();
 this.instance.setTransform(-150,-125);
 this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));
 this._renderFirstFrame();
}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-150,-125,300,250);

(lib.Tween4 = function(mode,startPosition,loop,reversed) {
if (loop == null) { loop = true; }
if (reversed == null) { reversed = false; }
 var props = new Object();
 props.mode = mode;
 props.startPosition = startPosition;
 props.labels = {};
 props.loop = loop;
 props.reversed = reversed;
 cjs.MovieClip.apply(this,[props]);
 // Layer_1
 this.instance = new lib.AgrilandMRec300x250Sept20202();
 this.instance.setTransform(-150,-125);
 this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));
 this._renderFirstFrame();
}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-150,-125,300,250);

(lib.Tween3 = function(mode,startPosition,loop,reversed) {
if (loop == null) { loop = true; }
if (reversed == null) { reversed = false; }
 var props = new Object();
 props.mode = mode;
 props.startPosition = startPosition;
 props.labels = {};
 props.loop = loop;
 props.reversed = reversed;
 cjs.MovieClip.apply(this,[props]);
 // Layer_1
 this.instance = new lib.AgrilandMRec300x250Sept20202();
 this.instance.setTransform(-150,-125);
 this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));
 this._renderFirstFrame();
}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-150,-125,300,250);

(lib.Tween2 = function(mode,startPosition,loop,reversed) {
if (loop == null) { loop = true; }
if (reversed == null) { reversed = false; }
 var props = new Object();
 props.mode = mode;
 props.startPosition = startPosition;
 props.labels = {};
 props.loop = loop;
 props.reversed = reversed;
 cjs.MovieClip.apply(this,[props]);
 // Layer_1
 this.instance = new lib.AgrilandMRec300x250Sept20201();
 this.instance.setTransform(-150,-125);
 this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));
 this._renderFirstFrame();
}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-150,-125,300,250);

(lib.Tween1 = function(mode,startPosition,loop,reversed) {
if (loop == null) { loop = true; }
if (reversed == null) { reversed = false; }
 var props = new Object();
 props.mode = mode;
 props.startPosition = startPosition;
 props.labels = {};
 props.loop = loop;
 props.reversed = reversed;
 cjs.MovieClip.apply(this,[props]);
 // Layer_1
 this.instance = new lib.AgrilandMRec300x250Sept20201();
 this.instance.setTransform(-150,-125);
 this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));
 this._renderFirstFrame();
}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-150,-125,300,250);

(lib.button = function(mode,startPosition,loop,reversed) {
if (loop == null) { loop = true; }
if (reversed == null) { reversed = false; }
 var props = new Object();
 props.mode = mode;
 props.startPosition = startPosition;
 props.labels = {};
 props.loop = loop;
 props.reversed = reversed;
 cjs.MovieClip.apply(this,[props]);
 // Layer_1
 this.shape = new cjs.Shape();
 this.shape.graphics.f("rgba(102,255,51,0.498)").s().p("A3bTiMAAAgnDMAu3AAAMAAAAnDg");
 this.shape.setTransform(150,125);
 this.shape._off = true;
 this.timeline.addTween(cjs.Tween.get(this.shape).wait(3).to({_off:false},0).wait(1));
 this._renderFirstFrame();
}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,0,300,250);

// stage content:
(lib._300x250Agrilandsept2020_HTML5CanvasV2 = function(mode,startPosition,loop,reversed) {
if (loop == null) { loop = true; }
if (reversed == null) { reversed = false; }
 var props = new Object();
 props.mode = mode;
 props.startPosition = startPosition;
 props.labels = {};
 props.loop = loop;
 props.reversed = reversed;
 cjs.MovieClip.apply(this,[props]);
 this.actionFrames = [0];
 // timeline functions:
 this.frame_0 = function() {
  /* Click to Go to Web Page
  Clicking on the specified symbol instance loads the URL in a new browser window.
  
  Instructions:
  1. Replace http://www.adobe.com with the desired URL address.
     Keep the quotation marks ("").
  */
  
  this.button_link.addEventListener("click", fl_ClickToGoToWebPage);
  
  function fl_ClickToGoToWebPage() {
   window.open("http://www.caltech-crystalyx.co.uk", "_blank");
  }
 }
 // actions tween:
 this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(360));
 // button
 this.button_link = new lib.button();
 this.button_link.name = "button_link";
 this.button_link.setTransform(150,125,1,1,0,0,0,150,125);
 new cjs.ButtonHelper(this.button_link, 0, 1, 2, false, new lib.button(), 3);
 this.timeline.addTween(cjs.Tween.get(this.button_link).wait(360));
 // ehe
 this.instance = new lib.Tween1("synched",0);
 this.instance.setTransform(150,125);
 this.instance_1 = new lib.Tween2("synched",0);
 this.instance_1.setTransform(150,125);
 this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance}]}).to({state:[{t:this.instance_1}]},89).to({state:[]},1).wait(270));
 this.timeline.addTween(cjs.Tween.get(this.instance).to({_off:true},89).wait(271));
 // cb
 this.instance_2 = new lib.Tween3("synched",0);
 this.instance_2.setTransform(150,125);
 this.instance_2._off = true;
 this.instance_3 = new lib.Tween4("synched",0);
 this.instance_3.setTransform(150,125);
 this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.instance_2}]},89).to({state:[{t:this.instance_3}]},90).to({state:[]},1).wait(180));
 this.timeline.addTween(cjs.Tween.get(this.instance_2).wait(89).to({_off:false},0).to({_off:true},90).wait(181));
 // pc
 this.instance_4 = new lib.Tween5("synched",0);
 this.instance_4.setTransform(150,125);
 this.instance_4._off = true;
 this.instance_5 = new lib.Tween6("synched",0);
 this.instance_5.setTransform(150,125);
 this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.instance_4}]},179).to({state:[{t:this.instance_5}]},90).to({state:[]},1).wait(90));
 this.timeline.addTween(cjs.Tween.get(this.instance_4).wait(179).to({_off:false},0).to({_off:true},90).wait(91));
 // eb
 this.instance_6 = new lib.Tween7("synched",0);
 this.instance_6.setTransform(150,125);
 this.instance_6._off = true;
 this.instance_7 = new lib.Tween8("synched",0);
 this.instance_7.setTransform(150,125);
 this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.instance_6}]},269).to({state:[{t:this.instance_7}]},90).wait(1));
 this.timeline.addTween(cjs.Tween.get(this.instance_6).wait(269).to({_off:false},0).to({_off:true},90).wait(1));
 this._renderFirstFrame();
}).prototype = p = new lib.AnMovieClip();
p.nominalBounds = new cjs.Rectangle(150,125,150,125);
// library properties:
lib.properties = {
 id: 'C039C976967F7046A58646E1CF2704B8',
 width: 300,
 height: 250,
 fps: 30,
 color: "#FFFFFF",
 opacity: 1.00,
 manifest: [
  {src:"images/300x250 Agriland sept 2020_HTML5 Canvas V2_atlas_1.png", id:"300x250 Agriland sept 2020_HTML5 Canvas V2_atlas_1"}
 ],
 preloads: []
};
 
// bootstrap callback support:
(lib.Stage = function(canvas) {
 createjs.Stage.call(this, canvas);
}).prototype = p = new createjs.Stage();
p.setAutoPlay = function(autoPlay) {
 this.tickEnabled = autoPlay;
}
p.play = function() { this.tickEnabled = true; this.getChildAt(0).gotoAndPlay(this.getTimelinePosition()) }
p.stop = function(ms) { if(ms) this.seek(ms); this.tickEnabled = false; }
p.seek = function(ms) { this.tickEnabled = true; this.getChildAt(0).gotoAndStop(lib.properties.fps * ms / 1000); }
p.getDuration = function() { return this.getChildAt(0).totalFrames / lib.properties.fps * 1000; }
p.getTimelinePosition = function() { return this.getChildAt(0).currentFrame / lib.properties.fps * 1000; }
an.bootcompsLoaded = an.bootcompsLoaded || [];
if(!an.bootstrapListeners) {
 an.bootstrapListeners=[];
}
an.bootstrapCallback=function(fnCallback) {
 an.bootstrapListeners.push(fnCallback);
 if(an.bootcompsLoaded.length > 0) {
  for(var i=0; i<an.bootcompsLoaded.length; ++i) {
   fnCallback(an.bootcompsLoaded[i]);
  }
 }
};
an.compositions = an.compositions || {};
an.compositions['C039C976967F7046A58646E1CF2704B8'] = {
 getStage: function() { return exportRoot.stage; },
 getLibrary: function() { return lib; },
 getSpriteSheet: function() { return ss; },
 getImages: function() { return img; }
};
an.compositionLoaded = function(id) {
 an.bootcompsLoaded.push(id);
 for(var j=0; j<an.bootstrapListeners.length; j++) {
  an.bootstrapListeners[j](id);
 }
}
an.getComposition = function(id) {
 return an.compositions[id];
}

an.makeResponsive = function(isResp, respDim, isScale, scaleType, domContainers) {  
 var lastW, lastH, lastS=1;  
 window.addEventListener('resize', resizeCanvas);  
 resizeCanvas();  
 function resizeCanvas() {   
  var w = lib.properties.width, h = lib.properties.height;   
  var iw = window.innerWidth, ih=window.innerHeight;   
  var pRatio = window.devicePixelRatio || 1, xRatio=iw/w, yRatio=ih/h, sRatio=1;   
  if(isResp) {               
   if((respDim=='width'&&lastW==iw) || (respDim=='height'&&lastH==ih)) {                   
    sRatio = lastS;               
   }    
   else if(!isScale) {     
    if(iw<w || ih<h)      
     sRatio = Math.min(xRatio, yRatio);    
   }    
   else if(scaleType==1) {     
    sRatio = Math.min(xRatio, yRatio);    
   }    
   else if(scaleType==2) {     
    sRatio = Math.max(xRatio, yRatio);    
   }   
  }
  domContainers[0].width = w * pRatio * sRatio;   
  domContainers[0].height = h * pRatio * sRatio;
  domContainers.forEach(function(container) {    
   container.style.width = w * sRatio + 'px';    
   container.style.height = h * sRatio + 'px';   
  });
  stage.scaleX = pRatio*sRatio;   
  stage.scaleY = pRatio*sRatio;
  lastW = iw; lastH = ih; lastS = sRatio;           
  stage.tickOnUpdate = false;           
  stage.update();           
  stage.tickOnUpdate = true;  
 }
}
an.handleSoundStreamOnTick = function(event) {
 if(!event.paused){
  var stageChild = stage.getChildAt(0);
  if(!stageChild.paused){
   stageChild.syncStreamSounds();
  }
 }
}

})(createjs = createjs||{}, AdobeAn = AdobeAn||{});
var createjs, AdobeAn;

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 09, 2020 0
Adobe Community Professional ,
Sep 09, 2020

Copy link to clipboard

Copied

for future posts, this is all that you should have posted:

 

 this.button_link.addEventListener("click", fl_ClickToGoToWebPage);
  
  function fl_ClickToGoToWebPage() {
   window.open("http://www.caltech-crystalyx.co.uk", "_blank");
  }

 

///////////////////////////////////////////

that code is correct, but does your code work when testing?

 

if yes, either check the other requirements that google has for exit functions and make sure you're complying.  if you think you are, ask google for an explanation.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 09, 2020 0
New Here ,
Sep 09, 2020

Copy link to clipboard

Copied

No problem, I will bare this in mind for next time! thanks

Ok, so the code does work when I test it and the html5 ad runs fine in browsers and does click through to the website.

I've been looking online most of the day and can't really find anything relating to an exit function requirement for html5 that I can apply when in adobe animate. The last option, as you say, might be to ask google support for some help, however not being a coder i'm not sure i'd understand. I just hoped this might be an easy thing to remedy within the animate software.

Thanks 🙂 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 09, 2020 0
kglad LATEST
Adobe Community Professional ,
Sep 09, 2020

Copy link to clipboard

Copied

what requirements are needed? (maybe we can help you apply them to animate.)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 09, 2020 0