Jump to content
Search Community

AIRTweener

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by AIRTweener

  1. Hi Jack,

     

    I was in holliday the last weeks, so my answer is late:

     

    1. no, sorry this does not work...(copied and pasted the function)

     

    2. There is no logical problem, because there is no need for a firstFadeIn. Its an endless loop, so when the timeline ends the first picture/object is shown - still when the timeline begins.

    The timeline is build correctly with my function, but it is not starting to play with the first picture, but with the last (not the last tween!). The last picture is shown for the whole timeline duration with no tween. After that the timeline plays in correctly.

     

    Thats not what we need, because the timeline can have a duration of 1 hour. Nobody wants to wait 1 hour to see the first tween/the next picture.

     

    I am using Flash Professional CS6 and Flashbuilder 4.6 (yes, a legal registered copy).

    I tried it both with swc import and source path definition.

     

     

    Thanks!!!

    Daniel

     

    Heres my function:

            private function buildTL2(objects:Array,duration:Number, blendDuration:Number):TimelineMax
            {
                var tll:TimelineMax=new TimelineMax({repeat:-1});
                
                for (var i:uint=0; i<objects.length; ++i)
                {
                    if(i>0)
                        tll.append(TweenMax.fromTo(objects[i],blendDuration,{autoAlpha:0, immediateRender:true},{autoAlpha:1, immediateRender:true}),-blendDuration);
                    
                    tll.append(TweenMax.fromTo(objects[i],blendDuration,{autoAlpha:1, immediateRender:true},{autoAlpha:0, immediateRender:true}),duration);
                    
                }
    
                tll.append(TweenMax.fromTo(objects[0],blendDuration,{autoAlpha:0, immediateRender:true},{autoAlpha:1, immediateRender:true}),-blendDuration);
                
                
                return tll;
            }
    
  2. Hi Carl,

     

    I am compiling inside Flash Professional CS6 - and its compiling very well on 3 different systems. You just need to hit <ctrl><enter> (PC). Or just build your own AIR-Project and c/paste the buildTL2()-function.

     

    TweenMax.Version=12.0.11

     

    the first tween is not the tween you marked as first tween.

    This the one:
     

    tll.append(TweenMax.fromTo(objects[i],blendDuration,{autoAlpha:1, immediateRender:true},{autoAlpha:0, immediateRender:true}),duration);

    The first tween has a positive starttime (duration = 5s).

    The timeline shoud start with the first sprite showing it for 5s and then blend over to the next.

     

    The one you marked is the last tween: object[0] is blending in, so the loop is endless.

     

    Any other is described above:

    ...the timeline is built, but isn't playing in a right way; Its starting with the last picture then you have to wait numberOf(objects)*duration befor its blinking once and playing in the expected way.

  3. Hi,

     

    thank you very much for your reply!

     

    The missing files error is a runtime-error not an compile-error and is caused by the missing images in the defined imageFolder in the line:

    var fd:File=new File("C:\\TimelineTest_27-09-2013\\Bilder");

    Duplicate variable definition is a warning not an error. You can compile that fla by ignoring all warnings. Just put some images (jpg) into the folder defined above.

     

    The timeline-build is happening in the function buildTL2() (see code below and the attached fla)

     

    I'm not splicing an array anywhere. The array is built after all Images in the folder are loaded and is consisting of the rawcontent of all successfully loaded loader (imageLoader when only jpgs are in the defined folder).

     

    Also, as you can see in the code below, the first tween starts at 0 in the timeline, because of the IF(i>0)-Statement in the loop.

            private function buildTL2(objects:Array,duration:Number, blendDuration:Number):TimelineMax
            {
                var tll:TimelineMax=new TimelineMax({repeat:-1});
                
                //var animArr:Array=new Array();
                var td:Number=0;
                
                for (var i:uint=0; i<objects.length; ++i)
                {
                    if(i>0)
                        tll.append(TweenMax.fromTo(objects[i],blendDuration,{autoAlpha:0, immediateRender:true},{autoAlpha:1, immediateRender:true}),-blendDuration);
                    
                    tll.append(TweenMax.fromTo(objects[i],blendDuration,{autoAlpha:1, immediateRender:true},{autoAlpha:0, immediateRender:true}),duration);
                    
                }
                tll.append(TweenMax.fromTo(objects[0],blendDuration,{autoAlpha:0, immediateRender:true},{autoAlpha:1, immediateRender:true}),-blendDuration);
                
                
                return tll;
            }
    

    So unfortunately you answer does not clear anything up :rolleyes:

    I commented out all unneeded code in the TLTestMain.as

     

    After compiling you should see output like this:

    dir loaded.
    extension: jpg
    extension: jpg
    extension: jpg
    extension: jpg
    extension: mp4
    extension: jpg
    extension: jpg
    extension: jpg
    extension: swf
    extension: jpg
    progress: 0.0019732022538030795
    progress: 0.003946404507606159
    progress: 0.005190645583326561
    progress: 0.007163847837129641
    progress: 0.00913705009093272
    progress: 0.010899461497279817
    progress: 0.012872663751082897
    progress: 0.014845866004885976
    progress: 0.016819068258689056
    progress: 0.018792270512492135
    progress: 0.020765472766295215
    progress: 0.022806539977985138
    progress: 0.024779742231788218
    progress: 0.026752944485591297
    progress: 0.9702562421353415
    progress: 0.9722108514519288
    progress: 0.9741654607685162
    progress: 0.974546176526668
    progress: 0.9765007858432553
    progress: 0.9784553951598426
    progress: 0.9804100044764299
    progress: 0.9810125881957953
    progress: 0.9829671975123827
    progress: 0.98492180682897
    progress: 0.9856573502702187
    [SWF] C:\Entwicklung\TimelineTest_27-09-2013\Bilder\TestSWF.swf - 192779 Byte nach Dekomprimierung
    progress: 0.9857042947749841
    progress: 0.9950806637048359
    progress: 0.9970538659586391
    progress: 0.9990270682124421
    progress: 1
    LoaderMax 'mainQueue' is complete!
    

    TimelineTest_27-09-2013.zip

  4. Hi Greensock Support,

     

    i think this is the right topic, because i´m trying to get a simple endless-loop Sequence to run:

    		
    private function buildTL2(objects:Array,duration:Number, blendDuration:Number):TimelineMax
    		{
    			var tll:TimelineMax=new TimelineMax({repeat:-1, paused:true});
    			
    			//var animArr:Array=new Array();
    			var td:Number=0;
    			
    			for (var i:uint=0; i<objects.length; ++i)
    			{
    				if(i>0)
    					tll.append(TweenMax.fromTo(objects[i],blendDuration,{autoAlpha:0, immediateRender:true},{autoAlpha:1, immediateRender:true}),-blendDuration);
    				
    				tll.append(TweenMax.fromTo(objects[i],blendDuration,{autoAlpha:1, immediateRender:true},{autoAlpha:0, immediateRender:true}),duration);
    				
    				td=1;
    					
    					
    				//tll.append(this.animINOUT(objects[i],duration,blendDuration),-blendDuration);
    				
    				//animArr.push(this.animINOUT(objects[i],duration,blendDuration));
    			}
    			tll.append(TweenMax.fromTo(objects[0],blendDuration,{autoAlpha:0, immediateRender:true},{autoAlpha:1, immediateRender:true}),-blendDuration);
    			
    			//tll.append(TweenMax.fromTo(objects[i],blendDuration,{autoAlpha:1, immediateRender:true},{autoAlpha:0, immediateRender:true}),duration);
    			//tll.appendMultiple(animArr, 0, "normal", -blendDuration);
    			
    			return tll;
    		}

    No way to get this work: the timeline is built, but isn't playing in a right way; Its starting with the last picture then you have to wait numberOf(objects)*duration befor its blinking once and playing in the expected way. Tryied with play(0), restart(), gotoAndPlay(0), gotoAndStop(9) and play(), etc.

     

    In Flash its working, in AIR 3.2-3.8 not. Why???

    
    
    
    

    In the attached .fla you can find several ways to build the timeline:
    - tl.append(TweenMax)

    - tl.appendMultiple(Array(TimelineMax))

    - tl.appendMultiple(Array(Animation))

    TimelineTest_27-09-2013.zip

×
×
  • Create New...