Jump to content
Search Community

farmazone

Members
  • Posts

    6
  • Joined

  • Last visited

Contact Methods

Profile Information

  • Location
    Poland

farmazone's Achievements

0

Reputation

  1. Thank You Carl for commitment I thought that TweenMax.delayedCall(0,show); would allow me to do both: fire some functions (like addChild etc) and append Tweens to sequence. But of course tal Timeline from onClick makes sequence sooner that I thought. My mistake. The reason I did such a strange piece of code is that I'd like to have something like this functionality in TweenMax: tl=new TimelineMax; tl.append(TweenMax.to(mc_1,1,{autoAlpha:1})); tl.append(TweenMax.to(mc_2,1,{autoAlpha:1})); tl.append(TweenMax.delayedCall(0,getData,seqWait:true)); tl.append(TweenMax.to(mc_3,1,{autoAlpha:1})); where getData contains async server call. I added seqWait param (marked in red) to show what I am thinking about. The sequence stops in that point and waits for ex TweenMax.goOn() which is fired from onResult handler and whole sequence resumes. I simulated this whit TweenMax.pause() in getData and TweenMax.resume in onResult but It seems to me not so elegant solution.
  2. Hello, I have such code: var tlIn:TimelineMax=new TimelineMax; var tlOut:TimelineMax=new TimelineMax; var spr:Sprite=new Sprite; public function show():void { tlIn.append(TweenMax.to(spr,1,{autoAlpha:1})); } public function hide():void { tlOut.append(TweenMax.to(spr,1,{autoAlpha:0})); } public function animateIn():TweenCore { tlIn=new TimelineMax; tlIn.append(TweenMax.delayedCall(0,show)); return tlIn; } public function animateOut():TweenCore { tlOut=new TimelineMax; tlOut.append(TweenMax.delayedCall(0,hide)); return tlOut; } private function onClick(event:MouseEvent):void { var tal:TimelineMax=new TimelineMax tal.append(animateOut()); tal.append(animateIn()); } I want to put all animation into show and hide functions( to extend some base class) , but the sequence should start when animateOut/In is fired. I thought that TweenMax.delayedCall could help but it doesn't wait in queue and fires when animateOut/In function is called so tweens from show/hide function overrides each other. Why? Shouldn't it act as normal TweenMax instance? Of course I can replace TweenMax.delayedCall with ex tlIn.append(TweenMax.to(spr,1,{autoAlpha:1})); and it will work but I want to know the logic. thank you.
  3. Ok during the preparation of sample working code I found what was wrong. in animatOut / animateIn function I had TimelineMax.complete() and TimelineMax.clear(). I have replaced them with new TimelineMax() and now it works as it should. I wanted to clean up unfinished tweens. Thank you for pointing me to a solution.
  4. Hello, I have animation: one page hides, then the other shows. I stuck on something that I don't understand: var tl:TimelineMax=new TimelineMax(); tl.append(currentPage.animateOut()) var tc:TweenCore=nextPage.animateIn(); tc.vars={onStart:adjustScrollBar} tl.append(tc) When this code runs the second time over the same page - I mean the page is shown again - adjustScrollBar is not invoked. Why? I know that I can pass additional parameters to animateIn function to complete this task but I think I miss something... something with TimelineMax references. Thanks
  5. thank you folks. this unexpected behavior came from default immediateRender value. I wasn't aware of this. Now it's clear.
  6. Hello I want some objects to disapear: var tl:TimelineMax=new TimelineMax(); for (var j:int = 0; j < 10; j++) { tl.append(TweenMax.to(item,0.1,{autoAlpha:0})); } it is ok but if I dont want to animate alpha and just sequentially hide items? I thought something like this would do the job (the second argument of append method): var tl:TimelineMax=new TimelineMax(); for (var j:int = 0; j < 10; j++) { tl.append(TweenMax.to(item,0,{autoAlpha:0}),0.1); } but it provides some strange results. why? It should add just 0.1 second delay between autoAlpha switches. Am I wrong or this is bug??
×
×
  • Create New...