Results 1 to 3 of 3

Thread: A moving resizing MC with tween

  1. #1
    Join Date
    Jun 2008
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default A moving resizing MC with tween

    Hello everybody,

    I've been struggling to find out how can I create a resizeing tween of different elements on the stage. This is a perfect example:

    http://as-i-am.amica.bg/

    Pay attention to the elements after it loads and when you resize the window... it perfect!


    I've managed to use the ZigoEngine to create something similar.. I managed to do the elements to change places with ease when resized the window... but I couldn't figure out how to create those tweening elements to be rescaling in the meantime as well...

    I hope you understand me...if not just take a look at the example I sent you.


    So ANY help would be greatly appreciated! Any ideas how to create this tweening movement with resize? Is there other better solutions than the Zigo Engine? If not where should I change something to do what I want to?


    Thank you!
    niksan878

  2. #2
    Join Date
    Jun 2008
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I finally did it ! There's the code if somebody needs it sometime



    Code:
    Stage.scaleMode = "noScale";
    Stage.align = "TL";
    import com.mosesSupposes.fuse.*;
    ZigoEngine.simpleSetup(Shortcuts, PennerEasing, Fuse, FuseFMP);
    
    
    
    
    attachMovie("fullScreen","fullScreen",this.getNextHighestDepth());
    fullScreen._x = 0;
    fullScreen._y = Math.floor(Stage.height-Stage.height/10);
    
    fullScreen._xscale = fullScreen._yscale
    fullScreen._width = Stage.width/16;
    fullScreen._height = Stage.height/10;
    
    
    
    var myListener:Object = new Object();
    myListener.onResize = function() {
    	
    	
    	ZigoEngine.doTween(fullScreen,"_x,_y",[0, Math.floor(Stage.height-Stage.height/10)],2,"easeOutExpo",0.5);
    	ZigoEngine.doTween(fullScreen, "_xscale,_yscale",[Math.floor(Stage.height/2.4)],2,"easeOutExpo",0.5);
    	
    	
    	
    
    };
    Stage.addListener(myListener);

  3. #3
    Join Date
    Jun 2008
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello again,

    I have a last question:
    PHP Code:
    ZigoEngine.doTween(fullScreen"_xscale,_yscale",[Math.floor(Stage.height/2.4)],2,"easeOutExpo",0.5); 
    In this code I tell the object to scale respecting the height of the stage. However if I make another command like this one with respecting the width of the stage.. it ignores the first one and it resizes respecting the width.

    My question is how can I make the resizing respecting both width and height of the stage, keeping the _xscale=_yscale proportions..

    thank you!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •