Jump to content
Search Community

giannosfor

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by giannosfor

  1. No nothing changed still deforms the movieclips,here is the link with the fla file and the class http://www.mediafire.com/?r2ii9icxdgy27jg

    I have commented the addlistener if you remove the comments or change the easing type you will see the deform.

     

    I have an other question.

    package Scripts
    {
    import flash.display.MovieClip;
    import flash.display.*;
    import flash.events.Event;
    import flash.events.MouseEvent; 
    import flash.text.*;
    import fl.transitions.easing.*;
    
    import com.greensock.*;
    import com.greensock.events.*;
    
    public class Part extends MovieClip {
    
    	private static var flag : Boolean = true;
    	private var tween : TweenMax;
    
    	public function Part( )		
    	{	
    		tween = new TweenMax( this , 2 , {  scaleX : 1.25 ,scaleY : 1.25
    						, x : 400 , y : 300  , rotationY : 360 , rotationX : 360 
    								, ease : Regular.easeOut } );
    		tween.pause( );
    		this.buttonMode = true;	
    		addEventListener( MouseEvent.CLICK , doAnimate );
    	}
    	private function doAnimate( ev : MouseEvent )
    	{
    		if ( flag ) {			
    			parent.setChildIndex(this , 3);
    			tween.restart( );
    		} else {
    				tween.reverse( );
    			}	
    		flag = !flag;
    	}
    }
    }
    

    Is this the only way to create one tween and don't make it start instantly?

  2. Makes perfect sense I'll try it and see if I have any results.I know you don't get the desirable results when you double or triple click the movieclip,I was trying to fix first the above issue that I mentioned and then come up a solution for this.But maybe the answer is same for both.

    I'll try it and see.

    Just to mention in my fla file the only thing that I got is 4 squares which I convert them to movieclips and attached them with thie above base class.

  3. I wrote this piece of code,if I click a movieclip with base class the below,it zooms and flips concurrently.The code works perfect but when i remove the easing or add a listener to it etc if I chance something that has to do with the tween,at reverse the movieclip deforms the height

    package Scripts 
    {
    import flash.display.MovieClip;
    import flash.display.*;
    import flash.events.Event;
    import flash.events.MouseEvent; 
    import flash.text.*;
    import fl.transitions.easing.*;
    
    import com.greensock.*;
    
    public class Part extends MovieClip {
    
    	private static var flag : Boolean = true;
    	private var tween : TweenMax;
    
    	public function Part( )		
    	{
    		this.buttonMode = true;	
    		addEventListener( MouseEvent.CLICK , doAnimate );
    	}
    	private function doAnimate( ev : MouseEvent )
    	{
    		if ( flag ) {
    			parent.setChildIndex(this , 3);
    			tween = new TweenMax( this , 2 , {  scaleX : 1.25 ,scaleY : 1.25
    						, x : 400 , y : 300  , rotationY : 360 , rotationX : 360 
    								, ease : Regular.easeOut } ); <-- When i remove the ease or use None.easeOut the mv deform
    		} else {
    				tween.reverse( );
    			}
    
    		flag = !flag;
    	}
    }
    }

  4. Thanks that really help.The repeat is by users interaction,i just added the repeatDelay property.

    Yes create a new timeline would be much more efficient.Greensock's response gave me the answer,just address the timeline tweens to an array and

    treat them the way you want.

  5. I have made a MovieClip and attached it to the below code.When i test the movie and i have already placed the object on stage it works fine.When i instantiate the object through code and add it to the stage when i click it disappears.

     

    package {
    
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import fl.transitions.easing.*;
    
    import com.greensock.*; 
    
    public class Card6 extends MovieClip {
    
    	public function Card6( )		{
    		addEventListener(MouseEvent.CLICK, Enter);
    	}
    	private function Enter( ev : MouseEvent ) {
    		TweenMax.to(this, 0.25,  { rotationY: 180 }  );
    	}
    }
    }
    

    This is the code where i instantiate the MovieClip from the library,Card6 is the base Class.

    		var photo: MovieClip = new PhotoB( );
    		photo.x = 100;
    		photo.y = 300;
    		stage.addChild(photo);

  6. Is there a way to change the tween order after you append them in a Timeline,or play them in a different order?To be more specific in my example i animate an object,i rotate it and then moving it to x direction.I want when i reverse it to rotate first and then move back,no the other way around.Also another question,if i want to apply a delay on the timeline at the beginning a simply add as parameter,but how can i have also delay when i reverse it?

    package {
    
    import flash.display.MovieClip;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import fl.transitions.TweenEvent;
    
    import com.greensock.*;
    import com.greensock.easing.*;
    
    public class Document10 extends MovieClip {
    	private var timeline:TimelineMax;
    	private var flag : Boolean = true;
    
    	public function Document10( )		{
    		right.addEventListener(MouseEvent.CLICK, backState);
    	}
    	private function moveState (  )
    	{	
    		flag = false;
    		timeline = new TimelineMax( ); 
    		timeline.insertMultiple([ new TweenLite(right, 0.5, {rotation : 180 }), new TweenLite(right, 1, {x :15, ease:None.easeOut }) ], 0 , TweenAlign.SEQUENCE );
    	}
    	private function backState (  ev : MouseEvent )
    	{	
    		if (! flag )
    			doneState( );
    		else
    			moveState( );
    	}
    	private function doneState (  )
    	{	
    		flag = true;
    		timeline.reverse( );
    	}
    
    }
    }

×
×
  • Create New...