Jump to content
GreenSock

charlesg99

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by charlesg99

  1. Oups sorry my mistake, you are right I meant reverse. I will edit my post. This is also great news to hear that tweenlite now supports reverse, I always wanted that For the overwrite manager, I thought that if you didn't initialize it it would automatically overwrite any overlapping tween. Anyway good info to hear that it wasn't the case. So it would mean that I could have probably solved my problem by initialising it?. I could send you my project if you want to see the behavior but it was the problem to be sure... since I change that for a timelineLite (a Tweenlite VERY soon ) the animation runs very smoothly and as it should. Thanks
  2. Ok here are my findings so it might help others. I have a button class which have it's own listeners applied to it so as soon as I add a button it is already set up. These events included a RollOver and a RollOut. The reason my little application was running slow is this (simplified code to make it simple): private function fadeIn(e:MouseEvent):void //RollOver listener { TweenLite.to(texte_mc.titre_mc, .2, {colorTransform:{tint:0xffffff}}); } private function fadeOut(e:MouseEvent):void //RollOut listener { TweenLite.to(texte_mc.titre_mc, .2, {colorTransform:{tintAmount:0}}); } It seems that when I was moving the mouse over the buttons very fast, the fact that the tweens were "going one over the other" (which I don't understand since I didn't init the overwrite manager) was completely bugging my app... To solve the problem I just did a timelineLite so even if the tween isn't complete it will just reverse from where it is. Like this: public var timeline:TimelineLite = new TimelineLite({paused:true}); timeline.append(TweenLite.to(texte_mc.titre_mc, .2, {colorTransform:{tint:0xffffff, tintAmount:1}})); private function fadeIn(e:MouseEvent):void //RollOver listener { timeline.play(); } private function fadeOut(e:MouseEvent):void //RollOut listener { timeline.reverse(); } Thanks again
  3. Yeah I'll have to do some test . I have 2 similar classes (both running timelineLite in loop) having instances running at the same time in my project. They're not in the same display object and one of them is working correctly (not choppy) and the other one (whis is a similar graphic with the same kind of timeline loop) is very choppy when mousing over the buttons. I did set my buttons so they would not bubbles but anyway the "problem animation" is nested deeper than the buttons that are listeners. They're is only a dozen of buttons. It probably is a silly issue but it's driving me nuts I don't think it's a tweenlite problem but every thought on what my problem could be will be appreciated.
  4. Hi, I'm having a weird issue, maybee it's normal but I have a tweenlite playing in loop (in a timelinelite) on my project. There is a lot of eventlisteners too on the stage and when I move the mouse quicly on the stage, the listeners are fired but it makes the looping tweenlite animation very choppy. This tweenlite animation is completely on it's own and is not affected by the listeners in any way... Anyone has a fix for this? Thanks
  5. Ok just to maybee help people having similar issue... It seems that even if a movieclip that is being animated by a timeline running in loop is set to visible=false (with autoAlpha:0) it still drains cpu usage. I added some functions to my listeners that stopped the timelines when the menu is iddle and it completely removed the cpu usage. Another thing that helped was to set a custom antialias (thickness:100 and sharpness:0) instead of antialias for animation. The only texts that needed to be alias for animation are set via as3 like this: myText_txt.antiAliasType= "advanced"; myText_txt.gridFitType = "subpixel"; I'm pretty pleased whit the results! 0 cpu usage instead of 10
  6. Yes it is antialiased for animation... If it's not this way the animation gets very choppy. Is it causing cpu usage even if it is iddle and nothing is happening? I also have a class that is applied to all my "button" and it contains a timelinelite animating it. I just did some test and it seems that if I remove it from all of the button and I only have one changing position as the mouse goes, it seems to cause less cpu activity... I thought that having symbols being set to visible=false wouldn't affect the cpu usage but it seems that I was wrong.
  7. Thanks for your answer It doesn't affect the performance at all in fact, I was just wondering why a static text would require cpu usage to render since nothing is happening. I also noticed that the percentage of used cpu is a lot higher in firefox compared to explorer... This is weird but it is probably browser related. You make it sound like this is completely normal so that will stop my worries I was also looking for good general "practices" as well since after lots of research I can't find very consistent information about code writing for efficiency. Like setting mouseEnabled=false on everything that doesn't interact with the mouse sounds like a spread idea on the web, do you have any more advice of this kind? Thanks again
  8. Hi guys, I designed a menu for a website using only tweenlite and timelinelite. When the menu is idle (no mouse over), It is completely inert and there is only some textfields inside of movieclips on it. To make everything invisible I'm using autoAlpha and when the menu is idle, everything is set to autoAlpha 0. In my menu there is only bitmaps, no vectors, no enterframes, everything except the actuals button is set to mouseEnabled=false and all my timelinelites are paused. What I cant't figure out is that even on idle, the menu shows me a cpu usage of about 10... I mean there is nothing moving or rendering... I can understand when the animation is happening that the cpu usage goes up but inert like that? I don't think that the tweenlite or the timelinelite are the problem but do you have a general idea how to make inert textfield use less cpu ?? I just don't see what could be causing this... it's kind of frustrating to invest lots of time on something that finally has little problems that prevent it from being exactly like you want it to be... Thanks a lot for your help,
  9. I solved my problem by reserching more... (it was well hidden thought) I just did set immediateRender:false in a separate tween at the exact time I wanted it (1 sec) like this: timeline.insert(TweenLite.to(m1b_mc, 0, {onComplete:textCol, immediateRender:false}), 1); thanks for such a great engine!
  10. Hi and thanks for your answer, yes I tried it but the problem is that the function needs to be called during the reverse of the timeline and not on complete... That is why I'm calling the function in a tweenlite onComplete which is inside the timeline. It does great when the timeline is going forward and it calls the function at the right moment but I would need it to call it again at the same time while it is going backwards, after reverse() has been called. I tested it with a trace() and the function isn't being called on reverse. Is it supposed to be so?, I mean the tween does happen and does complete even on reverse. I've seen addCallBack from timelineMax, I would really like to stick with timelineLite but would it solve my problem? Thanks
  11. Hum it seems that the problem is that the function isn't called when the timeline is going backwards... Is there a way to call it even if it is on reverse? Thanks for your help
  12. Hi guys, I'm having trouble to understand the "reversed" property in timelinelite... I am setting a timeline in a class that plays or reverses on a rollover/rollout. On one of my tweenlite inside the timelinelite I have a onComplete call to a function so the function is fired at the rigth moment. What I don't understand is that timeline.reversed always returns false since my function always does the same thing (if/else). Another thing might be that the function isn't called when the timelinelite is playing backward? here is some skimmed code so you see what might be my problem: var timeline:TimelineLite = new TimelineLite(); timeline.paused=true; //lots of other TweenLite timeline.insert(TweenLite.to(m1b_mc.texte_mc, .5, {colorTransform:{tint:0xFDFDFD}, onComplete:textCol}),.5); //lots of other TweenLite private function textCol() { if (timeline.reversed == false) { m1h_mc.texte_mc.titre_mc.titre_txt.textColor = 0x56AAFE; m1m_mc.texte_mc.titre_mc.titre_txt.textColor = 0x56AAFE; m1b_mc.texte_mc.titre_mc.titre_txt.textColor = 0x56AAFE; } else { m1h_mc.texte_mc.titre_mc.titre_txt.textColor = 0x7E7E7E; m1m_mc.texte_mc.titre_mc.titre_txt.textColor = 0x7E7E7E; m1b_mc.texte_mc.titre_mc.titre_txt.textColor = 0x7E7E7E; } } Everything works great except this. It turns my text to 0x56AAFE at the right moment on the first rollOver but it stays this color when I rollOut... The timeline reverses correctly though. I have a rollover on the movie that calls timeline.play() and on rollOut it calls timeline.reverse(). Any ideas? Thanks
  13. I'm not a Tweenlite god or anything but your code looks fine to me... At least if it is a complete mess, my code is too The only thing is I'm wondering why you're using TweenLite and TweenMax? I might be wrong but since you're already using TweenMax, the "damage is done" on the filesize so you could simply use it all the time for clarity... (also it saves one key press ) If that is because it conflicts with the one before, you could use the wonderfull TimelineLite to sequence you tweens (even if they're all having a time of 0). Cheers
×