Jump to content
Search Community

burn

Members
  • Posts

    18
  • Joined

  • Last visited

Posts posted by burn

  1. Hello.

    I have a basic question about LoaderMax.

    It´s great to load all kind of data (img,XML,sf...) with LoaderMax.

     

    I have a fla with an animation. Can I work with LoaderMax inside this fla to preload this animation?

     

    I know I can load the compiled swf with the anmiation in a other "main" swf (SWFLoader)but I dont wont to use 2 swf files.

     

    Any Idea or hint for me?

  2. Hey,

    I have some basic questions.

     

    How did I have to setup my code for in the following case:

    Backroundimage should be visible immediately wit an round progressbar an textfield vor loading.

    All other assets should load via LoaderMax, most cases pictures (jpgs).

     

    That I have to put my assets in the LoaderMax is clear. But how did I set the backgroundimage and loaderbar the smartest way?

  3. Im loading some images via ImageLoader into its own Sprite.

    Know I will put all these Sprites into one (container, instancename:box) like this:

    box.addChild(bg_container).

    But it doesn´t work.

    Any Idear why the Sprits in the container not visible or maybe not loaded.

     

    Here my code:

    package {
    import com.greensock.TweenLite;
    
    import flash.display.MovieClip;
    import flash.display.StageScaleMode;
    import flash.display.StageAlign;
    
    import com.greensock.loading.ImageLoader;
    
    import flash.display.Sprite;
    
    import com.greensock.plugins.TweenPlugin;
    import com.greensock.plugins.DropShadowFilterPlugin;
    
    TweenPlugin.activate([DropShadowFilterPlugin]);
    
    public class Main extends Sprite {
    	private var wall : ImageLoader;
    	private var burn : ImageLoader;
    	private var till : ImageLoader;
    	private var bg_container : Sprite = new Sprite();
    	private var burn_container : Sprite = new Sprite();
    	private var till_container : Sprite = new Sprite();
    	private var box : Sprite = new Sprite();
    
    	public function Main() {
    		stage.align = StageAlign.TOP_LEFT;
    		stage.scaleMode = StageScaleMode.NO_SCALE;
    
    		box.width = 1000;
    		box.height = 800;
    		addChild(box);
    
    		wall = new ImageLoader("bg.jpg", {width:800, height:600, z:0, container:bg_container});
    		wall.load();
    		box.addChild(bg_container);///did not work
    
    		burn = new ImageLoader("Burn.png", {x:(stage.width / 2) + 200, y:(stage.height / 2) + 70, z:100, centerRegistration:true, container:burn_container});
    		burn.load();
    		box.addChild(burn_container);
    
    		till = new ImageLoader("Till.png", {x:(stage.width / 2) - 100, y:(stage.height / 2) + 50, z:50, centerRegistration:true, container:till_container});
    		till.load();
    		box.addChild(till_container);
    
    		TweenLite.to(till_container, 0, {dropShadowFilter:{blurX:50, blurY:50, distance:50, angle: 350, alpha:0.6}});
    		TweenLite.to(burn_container, 0, {dropShadowFilter:{blurX:20, blurY:20, distance:20, angle:320, alpha:0.8}});
    	}
    }
    }
    
    

  4. Hey Carl.

    Thank you so much to make the effort with the custom fla.

    By the way, I´m a beginner using the greenSock engine and with this one line of code you gave me a free lesson ;-)

    I definitely have to studdy the whole "Learning Resource" to make my animations pro.

     

    But back to my case.

    I´ve checked youre advice, but I think the jitter comes more from the short distance and the duration of 2 seconds I use.

    In this case I can live with that ;-)

    http://www.drat-music.com

  5. Hey mr empty,

    here is an tesfile of my animation.

    http://burn4ever.de/temp/

    At the End of it I´ve created an y-wiggle with this code:

    import com.greensock.*;
    import com.greensock.easing.*;
    
    
    var animation:TimelineLite = new TimelineLite({delay:5});
    animation.append( new TweenLite(drat,2,{alpha:0.1}));
    animation.append( TweenLite.from(text1,3,{alpha:0}));
    animation.append( new TweenLite(text1,2,{alpha:0, delay:2}));
    animation.append( TweenLite.from(text2,3,{alpha:0}));
    animation.append( new TweenLite(text2,2, {alpha:0, delay:2}));
    animation.append( new TweenLite(drat,2, {alpha:0, delay:-2}));
    animation.append(TweenLite.from(paket1,0.5,{alpha:0, scaleX:0, scaleY:0,onComplete:wiggle1}));
    animation.append(TweenLite.from(paket2,0.5,{alpha:0, scaleX:0, scaleY:0, delay:-0.2,onComplete:wiggle2}));
    animation.append(TweenLite.from(plus,0.5,{alpha:0, scaleX:0, scaleY:0,delay:-0.2}));
    animation.append(TweenLite.from(cd,0.5,{alpha:0, scaleX:0, scaleY:0,delay:-0.2,onComplete:wiggle4}));
    animation.append(TweenLite.from(stoerer,0.5,{alpha:0, scaleX:0, scaleY:0,delay:-0.2}));
    animation.append(TweenLite.from(shoplink,1,{alpha:0}));
    
    
    
    function wiggle1(){
    var smooth:TimelineLite = new TimelineLite();
    smooth.append( new TweenLite(paket1,1.5,{y:110,ease:Sine.easeOut}));
    smooth.append( new TweenLite(paket1,1.5,{y:100,ease:Sine.easeOut,onComplete:wiggle1}));
    }
    function wiggle2(){
    var smooth:TimelineLite = new TimelineLite();
    smooth.append( new TweenLite(paket2,2.2,{y:117,ease:Sine.easeOut}));
    smooth.append( new TweenLite(paket2,2.2,{y:110,ease:Sine.easeOut, onComplete:wiggle2}));
    
    }
    
    function wiggle3(){
    var smooth:TimelineLite = new TimelineLite();
    smooth.append( new TweenLite(plus,2,{y:136,ease:Sine.easeOut}));
    smooth.append( new TweenLite(plus,2,{y:126,ease:Sine.easeOut, onComplete:wiggle3}));
    
    }
    function wiggle4(){
    var smooth:TimelineLite = new TimelineLite();
    smooth.append( new TweenLite(cd,2,{y:140,ease:Sine.easeOut}));
    smooth.append( new TweenLite(cd,2,{y:130,ease:Sine.easeOut, onComplete:wiggle4}));
    
    }

    But I don´t realy like it. It´s stuttering and I want make the tween slower and smoother but don´t know how.

    If I´m giving more time for every single tween, it´s stuttering more.

  6. Technical It works. Thanks.

    But it´s more a jitter than a smooth animation.

    I´ve checked som easing but it´s jittering also?!

    function wiggle(){
    TweenLite.to(paket1, 0.8, {x:93+Math.random()*4,  y :100+Math.random()*8,ease:Back.easeOut, onComplete:wiggle});
    }
    

  7. You can acheive this with 2 tweens:

     

    TweenMax.to(mc, 2, {x:400, ease:Back.easeOut, easeParams:[4] } );
    TweenMax.to(mc, 4, {x:0, ease:Back.easeOut ,delay:2} );

     

    The first tween uses a large ease parameter and tweens in 2 seconds, the second tween goes at a slower pace, 4 seconds, and uses the default ease value.

    .

     

    Thanks X10,

    thats what I´m looking for.

     

    Easy, hee ;-)

  8. Hey Fellas.

    Here Is my code of an TimelineLite animation:

    import com.greensock.*;
    
    var animation:TimelineLite = new TimelineLite({delay:5});
    animation.append( new TweenLite(drat,2,{alpha:0.1}));
    animation.append( TweenLite.from(text1,3,{alpha:0}));
    animation.append( new TweenLite(text1,2,{alpha:0, delay:2}));
    animation.append( TweenLite.from(text2,3,{alpha:0}));
    animation.append( new TweenLite(text2,3, {alpha:0, delay:2}));
    animation.append( new TweenLite(drat,2, {alpha:0, delay:-3}));
    animation.append(TweenLite.from(paket1,1,{alpha:0, scaleX:0, scaleY:0}));
    animation.append(TweenLite.from(paket2,1,{alpha:0, scaleX:0, scaleY:0, delay:-0.5}));
    animation.append( TweenLite.from(text3,1,{alpha:0}));
    animation.append( TweenLite.from(text4,1,{alpha:0}));
    animation.append( TweenLite.from(text5,1,{alpha:0}));
    animation.append( TweenLite.from(text6,1,{alpha:0, delay:1}));
    animation.append( TweenLite.from(text7,1,{alpha:0, delay:-1}));
    animation.append( TweenLite.from(text8,1,{alpha:0, delay:1, onComplete:gop}));
    

     

    As you can the after the last Tween I´m starting a function which starts my wiggle. This wiggle is realy primitiv :

    function go(){
    timer.start();
    }
    
    var timer:Timer = new Timer(100, 0);
    timer.addEventListener(TimerEvent.TIMER, wiggle);
    
    function wiggle(evt:TimerEvent) {
    paket1.x =95+Math.random()*6;
    paket1.y =110+Math.random()*5;
    
    }
    

    Does anybody know how I can create an smooth wiggle? Maybe with TweenLite or TweenMax?!

  9. Hey fellas,

    I know my question is more global but anyway.

    Are there published some books about starting and using the greensock engine?

     

    I know here are some nice tutorials but maybe someone of you can give me some nice hints?!

×
×
  • Create New...