Jump to content
Search Community

ggalan

Members
  • Posts

    21
  • Joined

  • Last visited

Posts posted by ggalan

  1. hi, i recently saw this tip for loading

    LoaderMax.activate([imageLoader]);
    
    var images:Array = ["1.jpg","2.jpg","3.jpg"];
    
    var queue:LoaderMax = LoaderMax.parse(images, {onComplete:completeHandler}, {container:this, width:100, height:100});
    queue.load();
    
    function completeHandler(event:LoaderEvent):void {
       trace("all images loaded!");
    }
    

    how would i turn those images into a bitmap after they have been loaded?

  2. how would you apply timeline to an array? i have 5 mc's on stage called mc1~mc5 , then stagger them

     

    import com.greensock.*;
    import com.greensock.easing.*;
    
    var timeline:TimelineLite = new TimelineLite();
    var a:Array = [];
    for (var i:Number = 1; i <= 5; i++) 
    {
       a.push(this["mc" + i]);
    }
    timeline.insertMultiple( TweenMax.allTo([a], 1, {tint:0x90E500, scaleX:.2, scaleY:.2}, 0.3), timeline.duration);
    

  3. i have a looping set of instructions using onComplete. how could i kill this once startIt has been instantiated?

     

    stop();
    import com.greensock.*; 
    import com.greensock.easing.*;
    OverwriteManager.init(OverwriteManager.AUTO); 
    
    function nextSquare4(){TweenLite.to(square, 1, {x:722, onComplete:nextSquare1, overwrite:false});}
    function nextSquare3(){TweenLite.to(square, 1, {y:59, onComplete:nextSquare4, overwrite:false});}
    function nextSquare2(){TweenLite.to(square, 1, {x:163, onComplete:nextSquare3, overwrite:false});}
    function nextSquare1(){TweenLite.to(square, 1, {y:305, onComplete:nextSquare2, overwrite:false});}
    function startIt()
    {
    delete nextSquare1(); delete nextSquare2(); delete nextSquare3(); delete nextSquare4();
    square.x = 163; square:y = 59;
    TweenLite.to(square, 1, {x:722, overwrite:true, onComplete:nextSquare1}); 
    }
    

  4. nm, solved. the problem was that i didnt reset the value, i should have done some search

     

    import com.greensock.*; 
    
    function rotateXX ()
    {
    cube.rotationY = 0;
    TweenLite.to(cube, 1, { rotationX:360*1, onComplete:rotateYY } );
    }
    
    function rotateYY ()
    {
    cube.rotationX = 0;
    TweenLite.to(cube, 1, { rotationY:360*1, onComplete:rotateXX } );
    }
    
    rotateYY();

  5. im playing around w/ a papervision tutorial from gotoAndLearn where i wanted a continuous loop using tweenlite inside a class

    it seems to work 1x but then it doesnt go to the next onComplete

    any ideas???

    thanks

     

    function rotateXX ()
    {
    TweenLite.to(cube, 1, { rotationX:360*1, overwrite:0, onComplete:rotateYY } );
    }
    
    function rotateYY ()
    {
    TweenLite.to(cube, 1, { rotationY:360*1, overwrite:0, onComplete:rotateXX } );
    }
    
    rotateYY();
    

  6. my fault, i meant the timing on these three

    timeline.append( new TweenLite(box1, 1, {_x:"-100", ease:Elastic.easeOut}) );
    timeline.append( new TweenLite(box2, 1, {_rotation:360}) );
    timeline.append( new TweenLite(box3, 1, {_x:"100", ease:Elastic.easeOut}) );

     

    from this line of code

    timeline.insertMultiple( TweenMax.allTo([box1, box2, box3], 1, {tint:0x90E500, _xscale:20, _yscale:20}, .5), timeline.duration );

  7. these tweens start in series one followed after the completion of the previous. how could you control the timing so that the second one starts while the first box is in motion? i see the 0.3 added but it didnt do anything to my swf

     

    timeline.insertMultiple( TweenMax.allTo([box1, box2, box3], 1, {tint:0x90E500, _xscale:20, _yscale:20}, 0.3), timeline.duration);

  8. im using timlineLite w/ AS2, and want to control the trigger time of each of the box's action. currently the timeline is set to duration, can anyone help out with syntax on any other options please

     

    import com.greensock.*;
    import com.greensock.easing.*;
    
    var timeline:TimelineLite = new TimelineLite();
    timeline.append( new TweenLite(box1, 1, {_x:"-100", ease:Elastic.easeOut}) );
    timeline.append( new TweenLite(box2, 1, {_rotation:360}) );
    timeline.append( new TweenLite(box3, 1, {_x:"100", ease:Elastic.easeOut}) );
    
    timeline.insertMultiple( TweenMax.allTo([box1, box2, box3], 1, {tint:0x90E500, _xscale:20, _yscale:20}), timeline.duration);

  9. i see.

    i just thought that the simplicity of simple 3d was nice, also the way it worked with tweenlite. i know papervision can achieve something like this as well. how would you rotate with 3d perspective natively in flash 10?

     

    var my3DView = new Simple3D(mc, {precision:16, autoUpdate:true, rotationY:-45});

    TweenLite.to(my3DView, 2, {rotationY:0});

×
×
  • Create New...