The Google Web Designer Community Forum is a resource that our customers use to ask questions, provide answers and reach out to our team directly. If you haven’t visited the community forum yet, feel free to check it out. It contains lots of useful information, tips, questions, etc. from users like yourself.
In this blog post, we’ll highlight some of our frequently asked questions from the forum.
How do I make an asset appear at a specific time during my animation?
For example, let’s say we have the following file, a simple animation spanning two keyframes where a yellow DIV animates from left to right:
When this animation finishes, we want to display another asset, say a blue DIV. Many users will often add the blue DIV at the last keyframe and be unpleasantly surprised that this new DIV appears in the first keyframe as well.
Any time you add a new element to a document, it's present in the document at all times, however, we can control when the element “appears” by setting its display, visibility, or opacity styles. Of these styles, only opacity is animatable, so let’s cover that first. We’ll also cover using the display or visibility styles to achieve this effect a bit later.
Approach 1 - Animating opacity from 0 to 1 between two keyframes
First, let’s select the element in the first keyframe and use the Properties panel to set its opacity to 0.
The element should now be invisible throughout the entire animation.
Now we’ll Insert a new keyframe at the end and change the duration between the last keyframe and the keyframe right before it to 0.01 seconds.
So far, the element has opacity 0 throughout the animation.
Select the element in the last keyframe and use the Properties panel to set its opacity to 1.
The blue DIV’s opacity is now animating from a value of 0 at the first keyframe to a value of 1 at the last keyframe. The middle keyframe has an interpolated value for its opacity.
Next, select the blue DIV in middle keyframe and use the Properties panel to set the opacity to 0 there as well.
If we preview the resulting animation in the browser, we can see the blue DIV’s opacity is now animating from a value of 0 at the first keyframe to a value of 0 still at the middle keyframe. The animation duration between the first and middle keyframes is 0.5 seconds. The blue DIV’s opacity then quickly animates from 0 to 1 because the duration between the middle and last keyframes is 0.01 seconds, making it seem like the blue DIV appears after 0.5 seconds.
Let’s recap the steps on how to make an element appear at a specific point in time in an existing animation:
Select the first keyframe/thumbnail in the animation.
Add the new element at the first keyframe/thumbnail.
Select the element at the first keyframe/thumbnail and use the Properties panel to set its opacity to 0.
Add a keyframe at the time you want the element to “appear’ (let’s call it time t ). Its opacity will still be 0 at time t .
Add another keyframe right before time t (let’s call it time t’) and set the duration between t’ and t to 0.01s.
Select the element at time t and set its opacity to 1.
Select the element at time t’ and set its opacity to 0.
Download timeline_animate_opacity.zip to see the final result.
Approach 2 - Using Timeline Event Markers, CSS Panel, and the Events panel to show the element at the desired time
As an alternative, you can also achieve the same results by using display or visibility styles:
Select the blue DIV and use the Properties panel to give it an id (let’s use ‘bluediv’ for the id in the example below).
Select ‘bluediv’ in the first keyframe and open the CSS panel.
Add the style:
visibility: hidden
Switch the Timeline to Advanced mode.
Move the Timeline’s playhead to the time you want the element to be visible and add a new Timeline event marker by clicking on the diamond icon in the Timeline panel’s Events row.
Double-click on the newly added diamond event marker to bring up the Events dialog and add the following action for that event.
Action: CSS -> Set styles -> ID of the element -> ‘+’ button to add the CSS style visibility: visible.
We can now preview to view the resulting animation in the browser.
Download timeline_css_event.zip to see the final result.
Can I use external JavaScript libraries in Google Web Designer?
Yes, you can! In fact, external JavaScript files are often used in ads. You can verify this by creating a new banner file and viewing the folder that you created the file in. In the example below, we’ve named a file ‘using_external_js’ and then browsed to its location. You will see some JavaScript files next to the HTML file, something like:
If we switch to Code view and look at the document’s head element, we’ll see script tags with their ‘src’ attributes set to these JavaScript file:
You can also add references to your own external JavaScript files in the head element after these script tags. The references can be relative paths from your HTML file, such as gwdpage_min.js in the example above, or they can be absolute paths to JavaScript libraries on the web, such as the link to DoubleClick studio’s Enabler library in the example above.
When you publish your ad, you have the option to include your JavaScript files directly in your HTML file rather than referencing them by selecting "Inline local files" in the publish dialog:
You may find commonly used JavaScript libraries on a CDN hosted by your publisher, similar to Enabler.js in the example above. For example, DoubleClick hosts common JavaScript libraries such as the popular Greensock animation libraries . Let’s use one of these libraries to add some interactivity to our ad.
In Code view we’ll add a script element to reference the library we want to use. For this example, we’ll add the following script element to the list of script elements in the head. <script type="text/javascript" src=" https://s0.2mdn.net/ads/studio/cached_libs/tweenlite_1.18.0_56fa823cfbbef1c2f4d4346f0f0e6c3c_min.js "></script>
Now let’s switch back to Design view and add a DIV element using the Tag tool.
We’ll then use the Properties panel to set a background color on it, in this example let’s use blue.
Once the color is set, we’ll also use the Properties panel to set the id to ‘bluediv’.
Next, Right-click on the element and select “Add event…” to bring up the Events dialog.
We can set up the event as follows:
Event: Mouse->click
Action: select Custom, and click on ‘+ Add custom action’ to bring up the Custom code section
In the ‘Custom code’ dialog, enter a name for the function (let’s name it ‘rotateDiv’) and add the following custom code:
TweenLite.to('#bluediv', 1, {rotation: '+=360'});
Now, preview your file in the browser and click on the blue DIV. You'll notice on each click the blue DIV will rotate one full turn using Greensock’s TweenLite library.
Download using_external_js.zip to see the final result.
Closing Thoughts
Learning how to customize animation and utilize popular JavaScript libraries can be powerful tools in creating amazing, interactive content. Let us know what you create with Google Web Designer and please continue to provide feedback and comments in our Community Forum !
Posted by Nivesh, UX Engineer
Joker168
ReplyDeleteDaftar 918kiss
Joker128
Joker388
Joker888
Joker688
I think that on https://eduessayhelper.org/blog/compare-contrast-essay-topics you can read really useful info about Compare and Contrast Essay Structure. It will help you to get a high grade
ReplyDeleteContent Marketing is one of the most popular marketing techniques to improve your online visiblity & business branding fast. Small Business SEO, Organic SEO, SEO Expert, Social Media Optimization, Web & Graphic Design, Search Engine Optimization, SEO Consultant
ReplyDeleteNice Article, I have bookmarked your site for future posts. Blogger, WordPress, Medium, YouTube, Vimeo, Blog
ReplyDeleteIt’s very easy to find out any matter on web as compared to textbooks, as I found this piece of writing on this site.
ReplyDeleteweb design
website design
web design philippines
website development company
website design philippines
web development company manila
web design company manila
web design agency philippines
web design manila
web development company philippines
web development philippines
website design company
Thumbs Up for the useful information!
ReplyDeleteweb design
website design
web design agency singapore
web development company singapore
web design company
eCommerce web development singapore
eCommerce website design company Singapore
eCommerce web design singapore
ecommerce developer singapore
magento web design company
magento website development
It’s very easy to find out any matter on web as compared to textbooks, as I found this piece of writing on this site.
ReplyDeleteaccounting services singapore
accounting firms in singapore
audit firm in singapore
audit firm singapore
secretarial services singapore
outsourced accounting services singapore
business tax advisory
company incorporation singapore
corporate secretarial services singapore
transaction structuring advice
Thanks for the information. It's very useful. If any one is looking for cardiologist singapore or heart specialist sinapore, check out Dr. Lim Ing Haan, heart specialist clinic singapore best place for cholesterol test, check heart palpitation.
ReplyDeletecardiology clinic
cardiology clinic singapore
singapore cardiologist
singapore heart & vascular clinic
heart specialist
heart doctor singapore
interventional cardiologist singapore
interventional cardiology singapore
heart specialist clinic
I love this article, it is so helpful to me, thanks for sharing!
ReplyDeleteTwin Cities Web Design
Cool article!
ReplyDeleteCheck the best corporate transportation in Wayne NJ
ReplyDeleteVery Helpful Article. แทงบอล It might help you. แทงบอล Thanks For Sharing
แทงบอล Thank you very much.
ReplyDeleteThis Is Really Useful And Nice Information. แทงบอล
This are such great articles. แทงบอล This articles can help you to make some new ideas.
https://sakukrub98.hatenablog.com/entry/2020/08/04/131932?_ga=2.66731565.2071274699.1596422357-1286484823.1596077192 I appreciate for reading my blogs.
ReplyDeleteThis are new articles style for you. https://sakukrub1.wixsite.com/mysite/post/snag-a-subaru-brz-asap-because-it-s-apparently-dead-for-2021 You can find some new idea on this. https://our-mrs-saku-love.tumblr.com/post/625491180458803200/snag-a-subaru-brz-asap-because-its-apparently It might help you to write or think some new idea.
http://site-2272261-6860-7525.mystrikingly.com/blog/ev-maker-lordstown-motors-plans-ipo-merging-with-blank-check-firm Thanks for sharing such a wonderful post.
https://5e43ec86db9aa.site123.me/blog/ev-maker-lordstown-motors-plans-ipo-merging-with-blank-check-firm I am very glad for reading my articles.
Get first page rankings in Google – We offer guaranteed SEO services that boost your website's organic rankings, visibility & traffic.
ReplyDeleteFrequently Asked Questions about Web Design. What is Web Design, and why is it important to learn? Web Design is ...
ReplyDeleteweb design company Washington dc
Escort service in Lucknow
ReplyDeleteEscort services in Lucknow
Escorts in Lucknow
Escort service in Jaipur | Escort services in Jaipur | Jaipur call girls | Call girls in Jaipur | Jaipur escorts | Escorts in Jaipur |
ReplyDeleteJaipur hotel escorts
ReplyDeleteEscorts in Jaipur
Jaipur escorts
Jaipur call girls
Call girls in Jaipur
Call girl services in Jaipur
Escort services in Jaipur
Escort services in Jaipur
ReplyDeleteCall girls in Jaipur
Jaipur call girls
Jaipur escorts
Escorts in Jaipur
Escort services in Jaipur
Escort service in Lucknow
ReplyDeleteEscort services in Lucknow
Escorts in Lucknow
Hello, This is a Nitu roy very interesting blog. this content is written very well This is an amazing
ReplyDeletepost, keep blogging.thanks for sharing.Anyways I am here now and could just like to say thank
for a tremendous post and a all round entertaining website.
Call Girl Service in Guwahati
Guwahati escort service
However you are more likely to book disconnected than in such a manner, you can change your
ReplyDeletepropensity since this Delhi Escorts Service has brought the online offices which are giving
the favourable position to the escort-locator to see the pictures of accessibility on this page.
Guwahati Escort Service
Guwahati Escorts
There is no convincing motivation to miss the things of your adulthood when you will interface
ReplyDeletewith Guwahati Escorts.The call girls are reliable specialists and they are constantly offering
worthy quality services to customers.You can start making your life hotter and cuter with the
organization of Guwahati Call Girls.
Call girl in Guwahati
Guwahati call girls
Guwahati Escorts or call girls in Guwahati are those call girl who are rocking and
ReplyDeleteamazing in terms of better-quality sexual performance for the customer.
Guwahati Call Girls
Guwahati Call Girl
You can book call girl in Guwahati or escort Service in Guwahati for incall facility or
ReplyDeleteoutcall Facility as and when required.To book Guwahati call girls you
can visit the following links
Guwahati Call Girls
Guwahati Escort Service
Guwahati Escorts or call girls in Guwahati are those call girl who are rocking and
ReplyDeleteamazing in terms of better-quality sexual performance for the customer.
Guwahati escort service
Call Girl service in Guwahati
manali call girls##
ReplyDeletemanali call girl##