Hi,
I'm developing a Wordpress plugin which make use of your great library. As you can imagine other developers do the same and this could generate conflicts using multiple installations of TweenMax. I've followed what you suggested here: http://greensock.com/forums/topic/9881-avoid-multiple-loaded-tweenmax-and-tweenlite/
But I keep having problems. There's another plugin which includes TweenMax in this way:
var oldgs = window.GreenSockGlobals;
var oldgs_queue = window._gsQueue;
var my_gs = window.GreenSockGlobals = {};
// your library here..
try{
window.GreenSockGobals = null;
window._gsQueue = null;
delete(window.GreenSockGlobals);
delete(window._gsQueue);
} catch(e) {}
try{
window.GreenSockGlobals = oldgs;
window._gsQueue = oldgs_queue;
} catch(e) {}
This code is executed before mine. I've tried to do the same without luck. Here is my code:
var another_gs = window.GreenSockGlobals = {};
// your library here
window.GreenSockGobals = window._gsQueue = null;
I get this error: Uncaught TypeError: Cannot read property 'greensock' of undefined
And when I try to use it in this way
another_gs.TweenMax.to(..
another_gs is undefined.
Could you please help me solving this issue?
Many Thanks
Thomas