dcak
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by dcak
-
-
Hi.
I have a GSAP animation that runs fine in all browsers (FF, IE, Chrome, Safari on Windows & Mac), but when I try to load the HTML page containing the animation from within Flash (using the HTMLLoader), TweenMax.js throws the following error:
TypeError: Result of expression 'rect.style' [null] is not an object.
at app:/lipide/gsap/src/uncompressed/TweenMax.js : 3408
at app:/lipide/gsap/src/uncompressed/TweenMax.js : 3414
at app:/lipide/gsap/src/uncompressed/TweenMax.js : 5414
at app:/lipide/gsap/src/uncompressed/TweenMax.js : 5430
at app:/lipide/gsap/src/uncompressed/TweenMax.js : 5435
at app:/lipide/gsap/src/uncompressed/TweenMax.js : 4754
at app:/lipide/gsap/src/uncompressed/TweenMax.js : 7091and, of course, the animation doesn't run (in fact the whole JS engine is stopped)
any ideas welcome...
TypeError when loading GSAP in Flash HTMLLoader
in GSAP
Posted
I think I figured it out.
The underlying reason for the error seemed to be line 3390 of TweenMax.js:
_createSVG = function(type, container, attributes) {
var element = _doc.createElementNS("http://www.w3.org/2000/svg",type),
This apparently was interpreted as cross-site scripting and therefore prohibited by the Flash HTMLLoader.
When changed to
var element = _doc.createElement(type),
the error disappeared, and everything worked fine - TweenMax.js loading, animations running...
...apparently without side-effects (did not explicitly try any SVG though).