Jump to content
Search Community

Gabriel last won the day on July 14 2013

Gabriel had the most liked content!

Gabriel

Members
  • Posts

    54
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Gabriel

  1. OK, I guess the intention of my question was lost. That is not "unneccessary code". Like I said before, it's currently behaving correctly. I don't want to just replace the shadow, I want it to continually animate the glow. I'd really like to "NOT" have two tweens on the same object. I'm looking for the "most efficient" way to do what my example does. I only posted my code to show the effect I'm looking for, and to explain whenever I condense it to a single tween object, it doesn't seem to overwrite the boxShadow glow correctly and I get a colored halo effect, which is not what I want. My example is working though (it just seems a bad way to do it). @rhernando, that code is the same as mine, although without doing seek(0), the pre-existing boxShadow from the other tween will still be visible if the code is triggered while the shadow is fully expanded, also creating the halo. If I'm already doing it the most efficient way, then so be it. It just seems that with such a robust platform, that I should be able to just create a single repeating tween, and then just modify the color property with a single line, right?
  2. This hardly seems like the most efficient or even correct way to do something simple like this, but it's the only way I've been able to get to actually work. Just a simple color change boxShadow animation whenever you click anywhere in the window. I haven't changed the autowrite method, so it should default to auto. Yet whenever I try to overwrite these tweens, the boxShadow gets a halo of the other color. Also I have to pause and seek back to the begining or I also see a halo. It has these problems whether I'm using a single tween or two. It doesn't seem right that I should have to create two tweens, pause one, then to change it I have to pause the active, seek it, then resume the other. What's going on here? Here's the only working example I've found, testing in Firefox: var status = $('#tablet-status') var clickStatus = TweenMax.to(status,1,{boxShadow:'0px 0px 1px 1px green', paused:true, yoyo:true, repeat:-1}) var unclickStatus = TweenMax.to(status,1,{boxShadow:'0px 0px 1px 1px blue', yoyo:true, repeat:-1}) $(window).mousedown(function(){ status.css('background-color','green') unclickStatus.pause() .seek(0) clickStatus.resume() }) $(window).mouseup(function(){ status.css('background-color','blue') clickStatus.pause() .seek(0) unclickStatus.resume() })
  3. Oh wow, that was way easier than I expected. Very simple and concise in my mind. Thank you very much. exportRoot, while not part of what I was looking for, is a very interesting function nonetheless. I had read about it in the docs several times, but still wasn't sure about it's purpose. I thought it was to transfer tweens from one timeline to another, which seemed of little use. A note in this function's documentation about all tweens and timelines being added to a master document-wide timeline would clear this up for others like me. This is the most helpful forum I've ever seen, and is much appreciated
  4. I was looking for a way to get all the DOM objects animated in a timeline to feed into additional tweens or a selector engine. From the entire timeline, and/or currently being animated at a specific time index. I appreciate any help given
×
×
  • Create New...