Copy link to clipboard
Copied
Hi guys,
has anyone of you created dynamic HTML5 banners in Animate CC for Google's DoubleClick? Since my knowledge of JS is veeeery basic, I do not understand how I can bind dynamic variables from the feed to a specific element in Animate CC.
In my case, I want to dynamic text to be displayed in a dynamic text field in Animate CC.
This is how a standard feed looks like from DoubleClick:
<!-- DynamicContent Start: HTML5 invocation code. -->
// Dynamic Content variables and sample values
Enabler.setProfileId(12345);
var devDynamicContent = {};
devDynamicContent.SampleElement = [{}];
devDynamicContent.SampleElement[0]._id = 0;
devDynamicContent.SampleElement[0].headline = "Some headline";
devDynamicContent.SampleElement[0].image_url = {};
devDynamicContent.SampleElement[0].image_url.Url =
"http://yourServer/sample.jpg";
devDynamicContent.SampleElement[0].landing_url = {};
devDynamicContent.SampleElement[0].landing_url.Url =
Enabler.setDevDynamicContent(devDynamicContent);
<!--
* You may access the variables in the following manner
* AFTER the Studio Enabler is initialized:
* var price = dynamicContent.Product[0].price;
* Note: be sure to use "dynamicContent", not "devDynamicContent"
-->
So let's say I named the instance of the dynamic text field "headline", how do I get the headline text ("Some headline") from the feed displayed? And where do I need to add the code? In the HTML file, create an action for the document or create an action for the element?
Also if you could point me to some tutorial, article on dynamic banner creation with Animate CC, I'd be really happy. I could hardly find anything.
Thanks,
Luke
Just in case anyone has the same problem, I solved it like that:
Create an action for the dynamic text element (which I called "mytext" here) and add the following code:
this.mytext.text = dynamicContent.SampleElement[0].headline (or whichever element contains the text). Notice that you should use "dynamicContent" and not devDynamicContent".
That is all and it should work now.
Copy link to clipboard
Copied
Just in case anyone has the same problem, I solved it like that:
Create an action for the dynamic text element (which I called "mytext" here) and add the following code:
this.mytext.text = dynamicContent.SampleElement[0].headline (or whichever element contains the text). Notice that you should use "dynamicContent" and not devDynamicContent".
That is all and it should work now.
Copy link to clipboard
Copied
Hello,
Please help me ! 🙂
I have to create dynamic banners for google studio and after long research, I more or less understood what I have to do but I can not understand the links I need to perform in animateCC with sheets .xls
Would it be possible for you to provide a .fla sample?
Thanks for your help !
Copy link to clipboard
Copied
Hi Luke,
did you really solved the problem? I'm still working on this...but I can't figure it out.
Copy link to clipboard
Copied
Did you also succes to get it work?
while google studio has a notice that is doesn't work yet with adobe animate
maybe you have een simple doc with the content, so i can see how it works?
Copy link to clipboard
Copied
Hey. Any news about that issue?
Copy link to clipboard
Copied
I don't know..still working in hype tumult
Copy link to clipboard
Copied
I managed to fix this, you need to use Enabler.js
Copy link to clipboard
Copied
Do you have an example?
Copy link to clipboard
Copied
Yuo can find about enabler in google studio help. Then I put in fla this:
getDynamic = function(){
Enabler.setProfileId(..........);
var devDynamicContent = {};
(...)
devDynamicContent.Copy_of_test3_Sheet1[0].headline1 = "Some text"
(...)
Enabler.setDevDynamicContent(devDynamicContent);
}
getDynamic();
var c1 = dynamicContent.Copy_of_test3_Sheet1[0].headline1;
Copy link to clipboard
Copied
Oké thanks...