Google Web Designer API

It happens very often, that some actions are easier to implement directly as custom code than to click through the events panel, especially, when you need to add some code.

As some of the functions are really hard to remember, I’ve created a basic GWD API Overview, which you can also download (and you can bet, I’m more often on this page, than I should ;-o)

For a full view of the GWD API, have a look in the official Google Web Designer Component API.

Functions Overview

 

Change Content

Textfield gwd.actions.events.getElementById(textFieldId:String).textContent =  content:String;
Image gwd.actions.events.getElementById(imageId:String).setAttribute(„source“, imageUrl:String);
Video Player gwd.actions.events.getElementById(videoId:String).setAttribute(„sources“, videoUrls:String);
YouTube Player gwd.actions.gwdYoutube.setYouTubeId(ytPlayerId:String, ytId:String, cueOnly:Boolean);
Exit gwd.actions.events.getElementById(tapAreaId:String).setAttribute(„data-exit-url“, url:String);
CSS gwd.actions.events.setInlineStyle(objectId:String, cssCode:String);

Pages & Timeline

Timeline gwd.actions.timeline.play(objectId:String);

gwd.actions.timeline.pause(objectId:String);

gwd.actions.timeline.togglePlay(objectId:String);

gwd.actions.timeline.gotoAndPlay(objectId:String, labelName:String);

gwd.actions.timeline.gotoAndPause(objectId:String, labelName:String);

Page Deck gwd.actions.gwdPagedeck.goToPage(‚gwd-ad‘, pageId:String, transitionStyle:String, duration:Number,
                                          transitionTiming:String, direction:String)
Google Ad gwd.actions.gwdDoubleclick.initAd(‚gwd-ad‘);

gwd.actions.gwdDoubleclick.goToPage(‚gwd-ad‘, pageId:String, transitionStyle:String, duration:Number,
                                             transitionTiming:String, direction:String);

gwd.actions.gwdDoubleclick.exit(‚gwd-ad‘, exitName:String, url:String, collapse:Boolean, pauseMedia:Boolean);

gwd.actions.gwdDoubleclick.exitOverride(‚gwd-ad‘, exitName:String, url:String, collapse:Boolean,
                                                 pauseMedia:Boolean);

gwd.actions.gwdDoubleclick.incrementCounter(‚gwd-ad‘, counterName:String, isCumulative:Boolean);

gwd.actions.gwdDoubleclick.startTimer(‚gwd-ad‘, timerName:String);

gwd.actions.gwdDoubleclick.stopTimer(‚gwd-ad‘, timerName:String);

gwd.actions.gwdDoubleclick.reportManualClose(‚gwd-ad‘);

Components

Tap Area gwd.actions.events.getElementById(tapAreaId:String).setAttribute(„data-exit-url“, url:String)
Iframe gwd.actions.gwdIframe.setUrl(iframeId:String, url:String)
Swipable Gallery gwd.actions.gwdSwipegallery.goToFrame(galleryId:String, frameNumber:Number, transitionStyle:String);

gwd.actions.gwdSwipegallery.goForwards(galleryId:String);

gwd.actions.gwdSwipegallery.goBackwards(galleryId:String);

gwd.actions.gwdSwipegallery.rotateOnce(galleryId:String, duration:Number, direction:String);

gwd.actions.gwdSwipegallery.stopRotation(galleryId:String);

Carousel Gallery gwd.actions.gwdCarouselgallery.goToFrame(galleryId:String, frameNumber:Number, transitionStyle:String);

gwd.actions.gwdCarouselgallery.goForwards(galleryId:String);

gwd.actions.gwdCarouselgallery.goBackwards(galleryId:String);

gwd.actions.gwdCarouselgallery.rotateOnce(galleryId:String, duration:Number, direction:String);

gwd.actions.gwdCarouselgallery.stopRotation(galleryId:String);

360° Gallery gwd.actions.gwd360gallery.goToFrame(galleryId:String, frameNumber:Number, transitionStyle:String,
                                   direction:String);
gwd.actions.gwd360gallery.goForwards(galleryId:String);gwd.actions.gwd360gallery.goBackwards(galleryId:String);
gwd.actions.gwd360gallery.rotateOnce(galleryId:String, duration:Number, direction:String);

Rich Media

Audio Player gwd.actions.gwdAudio.play(audioPlayerId:String);

gwd.actions.gwdAudio.pause(audioPlayerId:String);

gwd.actions.gwdAudio.mute(audioPlayerId:String);

gwd.actions.gwdAudio.replay(audioPlayerId:String);

gwd.actions.gwdAudio.seek(audioPlayerId:String, time:Number);

Video Player gwd.actions.gwdVideo.play(videoPlayerId:String);

gwd.actions.gwdVideo.pause(videoPlayerId:String);

gwd.actions.gwdVideo.mute(videoPlayerId:String);

gwd.actions.gwdVideo.replay(videoPlayerId:String);

gwd.actions.gwdVideo.seek(videoPlayerId:String, time:Number);

YouTube Player gwd.actions.gwdYoutube.play(ytPlayerId:String);

gwd.actions.gwdYoutube.pause(ytPlayerId:String);

gwd.actions.gwdYoutube.toggleMute(ytPlayerId:String);

gwd.actions.gwdYoutube.replay(ytPlayerId:String);

gwd.actions.gwdYoutube.seek(ytPlayerId:String, time:Number);

gwd.actions.gwdYoutube.setYouTubeId(ytPlayerId:String, ytId:String, cueOnly:Boolean);



Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.