Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

TommyD

BusinessGreen
  • Posts

    3
  • Joined

  • Last visited

About TommyD

TommyD's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. TommyD

    Multiple TweenMax

    Wow, thank you very very much!! Tom
  2. TommyD

    Multiple TweenMax

    Hi and thank for your answer. Yes, I'm sorry, Globals was misspelled but it's not the cause of my issue. my_gs is used by the other developers. Their code, which is executed before mine, is the following: var oldgs = window.GreenSockGlobals; var oldgs_queue = window._gsQueue; var my_gs = window.GreenSockGlobals = {}; // your library here.. try{ // They misspelled Globals!!!!!!!!!!!! // But I don't think that this is the cause window.GreenSockGobals = null; window._gsQueue = null; delete(window.GreenSockGlobals); delete(window._gsQueue); } catch(e) {} try{ window.GreenSockGlobals = oldgs; window._gsQueue = oldgs_queue; } catch(e) {} Then I tried to use your code. This is included after the above one. Here is my code var oldgs = window.GreenSockGlobals; var oldgs_queue = window._gsQueue; var wpppgs = window.GreenSockGlobals = {}; // your library here.. try{ window.GreenSockGlobals = null; window._gsQueue = null; delete(window.GreenSockGlobals); delete(window._gsQueue); } catch(e) {} try{ window.GreenSockGlobals = oldgs; window._gsQueue = oldgs_queue; } catch(e) {} What happens here is that when this code is executed I get the following error: Uncaught TypeError: Cannot read property 'greensock' of undefined and if I try to call TweenMax in this way plugin.timeline = new wpppgs.TimelineMax(tlObj); // or also plugin.timeline = new TimelineMax(tlObj); it returns Uncaught ReferenceError: TimelineMax is not defined If I force the other plugin to be executed after mine, the two works correctly. But, of course, I can have control over it and there could be other plugins producing the same issue. So I would need to find a way that allow my plugin to work together with any other using TweenMax, whether it's fired before mine or not. Thanks! Thomas
  3. TommyD

    Multiple TweenMax

    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
×