Jump to content
GreenSock

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

donJao

Members
  • Posts

    11
  • Joined

  • Last visited

donJao's Achievements

0

Reputation

  1. Thank you GreenSock. That nails it. And yes, the staggerFromTo is what I initially used, but then realised I'd rather add some randomness to it. Rodrigo, thank you very much for the effort. Really appreciate that. Topic is now resolved.
  2. Hey Rodrigo. Thanks for the reply. I will check the code, but the problem is that 'stagger' property isn't documented in the api: And:
  3. For now I'm using a workaround with manual delay attribute, which does work as expected: function getButtonsInAnimation(callback) { var i, spots, spot, tweens = []; for(i in spots = shuffle(hotspots)) { spot = spots[i]; tweens.push(TweenLite.fromTo(spot, 0.3, {scale:0, alpha:0, left:200, top:100}, {scale:1, alpha:1, left:parseInt(spot.css('left')), top:parseInt(spot.css('top')), ease:Expo.easeOut, delay:0.05 + 0.2 * Math.random()} )); } return new TimelineLite({paused: true, onComplete: callback, tweens: tweens}); }
  4. Just tried another approach: function getButtonsInAnimation(callback) { var i, spots, spot, tweens = []; for(i in spots = shuffle(hotspots)) { spot = spots[i]; tweens.push(TweenLite.fromTo(spot, 0.3, {scale:0, alpha:0, left:290, top:168}, {scale:1, alpha:1, left:parseInt(spot.css('left')), top:parseInt(spot.css('top')), ease:Expo.easeOut} )); } return new TweenLite({paused: true, onComplete: callback, tweens: tweens, stagger: 0.3}); } And all Tweens are executed immediately. Hm.
  5. Hello. Thanks for the priceless GSAP. However, not sure why stagger isn't honoured with this code: function getButtonsInAnimation(callback) { var i, spots, spot, tween = new TimelineLite({paused: true, onComplete: callback}); for(i in spots = shuffle(hotspots)) { spot = spots[i]; tween.add(TweenLite.fromTo(spot, 0.3, {scale:0, alpha:0, left:290, top:168}, {scale:1, alpha:1, left:parseInt(spot.css('left')), top:parseInt(spot.css('top')), ease:Expo.easeOut} ), undefined, 'start', 0.05); } return tween; } As you can see, I'm adding new TweenLite object with TimelineLite.add() method. But it executes added tweens in sequence, ignoring the stagger value. Also tried to pass stagger value to the TimelineLite constructor. Same result. As of position property of TimelineLite.add() method, I also tried values, without any luck: '+=0', 0, false. Is there something I misunderstand?
  6. Well. Nothing obvious I suppose. I'll just tell you what I'm trying to achieve. I'm working on a class, that will dynamically change the framerate of the stage. For such reason I made a static variable, that holds total amount of currently active tweens inside SWF. All of my transitions have onStart and onComplete methods. onStart adds 1 to total amount of tweens, onComplete - substracts 1. Setter for that static variable checks the end value, if it's 0 - that means there is not active tweens and we're ok to set up Stage's frameRate to say 5. If it's more than 0 - setter sets frameRate to high value. There's one problem though - tweens are likely to be overwritten, and onComplete does not substract that tween. So that's why I asked if it's possible to fire onOverwrite, so I could also decrease 1 tween. Maybe I'm missing something, but i'm using TweenLite for - couple of days only.
  7. Hello. Trying to call a function when overwrite occurs, is it possible? Thanks.
  8. Thanks. I wonder why I didn't figure it out myself? So simple and yet a grate solution! Why? Well, I would like to dynamically change the frame rate of a swf. Like that: private function set transitions( value:int ):void { m_transitionsTotal = value; stage.frameRate = m_transitionsTotal == 0 ? 1 : 30; } private function get transitions():int { return m_transitionsTotal; } public function addTranstion():void { transitions++; } public function remTranstion():void { transitions--; } So every Tween could just run addTransition() at the beginning and remTransition at the end. Anyway, thanks for help! Much appreciative!
  9. Hello. I was wondering if there's a way to assign functions for onStart and onComplete stats for every Tween? I prefer to use static initialization method: TweenLite.to(...); Thanks in advance.
  10. Hey! Thanks for the quick reply! Yes, the object is a TextField instance. And I found a solution myself, which is: TweenPlugin.activate([TintPlugin,RemoveTintPlugin]); Now everything works flawlessly. P.S. sorry for dumb post, but it's 3rd sleepless night, 2:25 AM and i have to deliver the project by 12:00 AM So, I'm kinda broken. Anyway thanks for help! Really appreciated.
  11. Hello everyone. I'm getting a problem that I cannot get rid of on my own. ERROR: Property removeTint not found I've activated the plugin in the constructor: TweenPlugin.activate([TintPlugin]); I've successfully applied tint to the TextField: TweenLite.to(m_letter, 0.3, {tint: Config.GAME_ANSWER_FONT_COLOR_OVER}); But I cannot remove tint: TweenLite.to(m_letter, 0.5, {removeTint: true}); That code does NOT do the job for me. Throws an error. Using FDT with Flex 3.4 SDK, building FP9 app. Thanks in advance.
×