Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
ronpetty-designer

Alternative to the Constructor Call

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I know this might sound like a dumb question but is there an alternative to calling TimelineLite or TimelineMax without the constructor method. Some of our clients have strict vendors that serve their advertisements and won't allow constructor methods.

 

So this essentially means we can't use GSAP because to invoke it means using var tl = new TimelineLite( ); and for whatever reason these systems don't like it. Any suggestions perhaps using Object.create( ) ?

 

It's not a huge deal if there isn't an alternative but I prefer to use GSAP it makes banner development a breeze and we aren't allowed to use jQuery either so GSAP is the perfect solution.

 

Thank you

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums.

 

Wow, that seems like a really odd request from your vendors. Can you share who they are? We wouldn't mind reaching out to them.

Seems like they are really shooting themselves in the foot by preventing you and everyone else from using a powerful and proven animation solution. My suggestion is to advise your clients to work with someone else. I'd recommend DoubleClick, PointRoll (now cofactor), Sizmek, FlashTalking and anyone else on the chart on this page: http://greensock.com/html5-banners. 

 

They are all proving to take the charge with GSAP.

 

I understand in your current situation you may not have that flexibility. Unfortunately, I do not have a workaround to avoid the constructor. 

if anyone else does, I welcome the input. 

  • Like 3
Link to comment
Share on other sites

It's not the ad server we use DoubleClick it's these hosters I think one of them off the top of my head is OwnerIQ. What my thinking is, and just by looking at some of their specs, is that they have some legacy stuff and there is some sort of issue there. I wouldn't call the situation typical, in fact very rare, but I thought it would be worth a shot to ask.

 

I use GSAP for all my HTML5 stuff because it's so conducive to the vanilla JavaScript I write for banners.

 

Thanks Carl huge thumbs up for the reply.

Link to comment
Share on other sites

That is indeed extremely odd. I've never heard of this sort of thing before. I'd be curious to hear their reasoning for disallowing constructors. Have they given you specific reasons that make sense? 

  • Like 2
Link to comment
Share on other sites

No Jack they have not. It's only been on this one host and we don't deal with them very often. One of our Solutions Architects believes there might be a combination of things with this particular ad host. One is they're linting the files we send and have the strictest settings. Which makes sense since Crockford's JSLint throws warnings about using the constructor format. The second is that they aren't doing enough to keep the ad serve iframe isolated from the page it's on.

 

We're delving deeper into this and perhaps we can help get them streamlined with a more favorable serve of their ads.

Link to comment
Share on other sites

With some further research we found that they have been serving ads and not using the DART iframe wrapper provided by Google. They mistakenly thought they could just use certain JavaScript restrictions to keep the ads in check. Our solutions architect says if they are going to falsely place these restrictions and not use the proper set-up we're going to just give them static jpegs. So issue is solved thank you Carl and Jack for the help.

 

I consider this issue solved.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×