Jump to content
GreenSock

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

Velma

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Velma

  1. This worked great - thank you so much!  I had a slight snag, I think because I was tweening between class names rather than actual properties, where some information was left in the various elements' style attributes and blocked the next tween from having an effect, but that was straightforward to fix by clearing the style attributes at the start of each play function.  I'm looking forward to trying the next animations...!

  2. Oh, thanks guys!  Yeah - I see what you mean.  I hadn't realised the click events would keep overwriting themselves like that.  I'd tried to do something in the original project about switching them off at the right time, but it never really worked...  It would make sense if the problem I was having came from the event trying to be able to reverse all the different tweens it was storing up.  I'll have to move a bunch of stuff around, but I should be able to get it to work this way.  I'll let you know - but thanks so much in any case!

  3. Hi Carl - thanks for replying.  I'm certain it's my script at fault rather than the engine, but trying to work out what's going on has completely stumped me.  The actual project is a monster of nested objects, which doesn't help, but I think the basic structure approximates to this (thank you for the demo!):

     

    See the Pen FpiEw by Velma (@Velma) on CodePen

     

    Which works perfectly, although after more than one click it throws out far more alerts than it should...  I'll have to go back to my code, I think - the way I've applied my tween events isn't nearly as succinct or clear as your application here, so hopefully getting that straight might clarify things.

     

    Thanks again - and I do love the engine.

  4. Hi!  I hope someone can help me with this - I'm trying to build a UI for a text-based RPG I'm developing and I'm having some problems with mouseover tweens on the buttons.  When the function to build the UI is called, it works out which class the button element should tween to based on various properties of the object passed to the function - and this works fine the first time.  When the function gets called again, however (after a click event function which updates the object before it gets passed back to the UI), the new tween for the button seems to half-remember the transformation it applied before.  So rather than playing a smooth mouseover colour-change, it plays the old transformation the first time you mouseover, then the second time it plays the right transformation via the old one (turning one colour before it changes its mind and goes to the correct colour).

     

    I've set the tweens to overwrite: true, but that doesn't seem to affect the problem.  I've also tried removing the tweens in the updater function by using killTweensOf(), but that doesn't work either.  If anyone has any idea what might be happening, with or without a way to fix it, I'd be really grateful!  I think I'm unclear on whether tweens can/should be used dynamically like this, or whether I need to instantiate some with fixed values before the function decides which to call.

×