Share Posted August 23, 2010 So recently I had to build a banner campaign that would be running on google's ad network among others. Typically I use greensock for all my tweening needs, but I ran into a security problem with Google. They returned my banners citing the use of the Math.random() code was a violation of their security requirements, citing that that code is used to call malicious content and URLs. I didn't have any Math.random() in my code, so I scanned through the green sock .as documents to find the Math.random() code and see if I could omit it without destroying the whole engine. I looked through the plugins I was using and couldn't fine it. After digging around I realized that TweenMax automatically uses a majority of the greensock plugins, so even plugins you don't use will be included. To fix this problem, open up the TweenMax.as file, and scroll down to where the plugins are listed. //ACTIVATE (OR DEACTIVATE) PLUGINS HERE... It's well commented so you shouldn't have trouble finding it. Once there, just comment out the plugins you aren't using, especially the frameLabel() plugin if working with Google's ad network. This has the added benefit of reducing your file size (which makes using TweenMax eve more attractive!). This is probably documented, and this tip is really for the flash monkeys who approach things from the designer side, with little programming background. Flash (and Sock) on! Link to comment Share on other sites More sharing options...
Share Posted August 24, 2010 Yep, feel free to remove the activation code if you want. Although I'm a little confused - where was the Math.random() call? I don't think that was in the tweening classes, right? Link to comment Share on other sites More sharing options...
Author Share Posted August 31, 2010 Forgot to check up on this post, the Math.random was in the Frame Label plugin I believe. Link to comment Share on other sites More sharing options...
Share Posted August 31, 2010 Nope, there was no Math.random() in the FrameLabelPlugin. Never has been. Link to comment Share on other sites More sharing options...
Author Share Posted January 12, 2011 I did a search and did not in fact find any Math.random() anywhere. I assumed it was in the said plugin because when I commented it out, our ads passed their security test. Since your code is solid, I question the ad networks. As it is most of them don't allow AS3, and that has been out for what? 4 years? Link to comment Share on other sites More sharing options...
Share Posted February 3, 2011 Same situation here, and evidently there is a Math.random() call in the FrameLabelPlugin (as2 version). Link to comment Share on other sites More sharing options...
Share Posted February 3, 2011 Aha! You found it - thank you for pointing that out. It wasn't there in the AS3 version and I so rarely work in AS2 that I it slipped my mind to check there too. Anyway, it is fixed in the latest version. My apologies for the confusion/hassle. http://www.greensock.com/tweenlite/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now