First of all I want to say hello since I am new here and to thank you for providing such a great tool.
What I am trying to do:
I have a navigation system made after the tutorial here and adapted to my needs.
When I append tweens to the timeline to make the animation in, for the values of the tween properties I use some formulas that are calculated depending on the browser window's size.
Example:
mainTimeline.addLabel("account_in", mainTimeline.duration);
mainTimeline.append(TweenMax.to(contentBg, 0, {alpha:1, immediateRender:false, onStart:setSection, onStartParams:["account"]}));
mainTimeline.append(TweenMax.to(bg_mask, 0, {alpha:1, immediateRender:false}));
mainTimeline.append(TweenMax.to(contentBg, 1, {y:((stgHeight/2)*1.4)/1.5, ease:Quad.easeIn}));
mainTimeline.append(TweenMax.to(bg_mask, 0, {alpha:0, immediateRender:false}));
mainTimeline.append(TweenMax.to(contentBg, 1, {x:stgWidth/2 + separWidth/2, y:stgHeight/2.5, width:(stgWidth - separWidth)/1.35, height:stgHeight/1.6, ease:Quad.easeIn}));
mainTimeline.append(TweenMax.to(loginPan, 0, {alpha:1, immediateRender:false}));
mainTimeline.append(TweenMax.from(loginPan, 1, {scaleX:0, scaleY:0, ease:Back.easeOut, onComplete:finishedAnimating}));
mainTimeline.addLabel("account_complete", mainTimeline.duration);
mainTimeline.append(TweenMax.to(contentBg, .5, {alpha:0}));
mainTimeline.append(TweenMax.to(loginPan, .5, {alpha:0}));
What is the problem:
If i resize the browser's window, the MovieClips are tweened using static values that were calculated when the mainTimeline was populated.
What i want to achieve is for the tweens to update the values used for tweening after the formulas passed.
What i tryed:
I tryed invalidate() -ing the mainTimeline or clear() -ing and repopulateing the mainTimeline when the browser's window was resized. Funny things happened.