Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

worked

Members
  • Posts

    21
  • Joined

  • Last visited

Posts posted by worked

  1. Hey there- Here's an add-on question for this post. What if I want to sequence the Array objects (to the same location)? For instance:

     

    var timeline:TimelineLite = new TimelineLite();
    var Letters:Array = [let1, let2, let3, let4];
    var i:Number= Letters.length;
    while (i--) {
       timeline.insertMulitple(TweenLite.allFrom(Letters[i], 3, {y:0}, 1, TweenAlign:SEQUENCE, 1);
    }
    

     

    This throws me a Type Coercion error. Can you tell me why? Thanks!

  2. Hey there- Ok so all I had to do was check whether or not the obj was in the current act of tweening, if not then set the tween. For instance:

     

             private var _t:TweenMax
             ... code truncated
             private function itemBtn(e:MouseEvent):void {
                if (!TweenMax.isTweening(e.currentTarget)) {
                   _t = new TweenMax(e.currentTarget, 1, {y:40, paused:true});
                }
                if (e.type=="mouseOver") {
                   _t.play();
                }
                if (e.type=="mouseOut") {
                   _t.reverse();
                }
             }
    
    

  3. Hi there- Quick question.

     

    I have a simple TweenMax instance that gets created whenever a button is moused over. This Tween is then played or reversed based on the event's current type, for instance:

     

    	private var _t:TweenMax
    	... code truncated
    	private function itemBtn(e:MouseEvent):void {
    		_t = new TweenMax(e.currentTarget, 1, {y:40, paused:true});
    		if (e.type=="mouseOver") {
    			_t.play();
    		}
    		if (e.type=="mouseOut") {
    			_t.reverse();
    		}
    	}
    

     

    This will play the animation but it seems to ignore the reverse method... can you tell me why? Also, it's imperative that I pass the currentTarget to the TweenMax instance as this currentTarget is the item I'm looking to tween. Thanks, any help is appreciated!

  4. Creating a working slideshow has more to with obtaining the ability to write actionscript, this is not a tween issue. Although, once you have the working base code in place, you can tween the items into view via a TweenLite/Max tween. Also to note, greensock offers a very powerful Timeline Tweening engine, which includes sequencing tweens at various times/positions. Look into TimelineLite and TimelineMax classes for more details.

  5. Check out "Dynamic Props" plugin in the TweenLite/Max Plugin Explorer. Although it's only available with a Club Greensock membership, it's worth every penny. I can contribute to that fact. Good Luck!

  6. What I might try is creating two separate image files (same file) layered on top of each other. One with no saturation(bottom) and the other full color(top). Then mask the top item and animate it (the mask that is). This will produce the effect. However, whether it be the ideal method is up for debate.

  7. Another example attached, but in as2, created in cs3. Is working just fine for me...

     

    import com.greensock.TweenLite;
    
    var pixArray:Array = [p_1,p_2,p_3,p_4,p_5,p_6,p_7,p_8,p_9,p_10,p_11,p_12,p_13,p_14,p_15];
    var pic:MovieClip;
    var index:Number = 0;
    
    //start with first item in array
    doFadeIn(pixArray[0]);
    
    function doFadeIn(mc:MovieClip) {
      TweenLite.to(mc,.1,{_alpha:100, onComplete:nextImage, onCompleteParams:[mc]});
    }
    
    function nextImage(mc:MovieClip) {
      doFadeOut(mc);
      index++;
      if (index > pixArray.length - 1) {
         //sets index back to 0 when finished, looping the animation
         index = 0;
      }
      doFadeIn(pixArray[index]);
    }
    
    function doFadeOut(mc:MovieClip) {
      TweenLite.to(mc,3,{_alpha:0});
    }
    

  8. Hey there- I've attached a working example. One thing i did notice is that you are using _alpha, which is as2, my example works in as3 as it uses alpha. For example:

     

    import gs.TweenLite;
    
    var pixArray:Array = [p_1,p_2,p_3,p_4,p_5,p_6,p_7,p_8,p_9,p_10,p_11,p_12,p_13,p_14,p_15];
    var pic:MovieClip;
    var index:Number = 0;
    
    //start with first item in array
    doFadeIn(pixArray[0]);
    
    function doFadeIn(mc:MovieClip):void {
    TweenLite.to(mc,.1,{alpha:1, onComplete:nextImage, onCompleteParams:[mc]});
    }
    
    function nextImage(mc:MovieClip):void {
    doFadeOut(mc);
    index++;
    if (index > pixArray.length - 1) {
    	//sets index back to 0 when finished, looping the animation
    	index = 0;
    }
    doFadeIn(pixArray[index]);
    }
    
    function doFadeOut(mc:MovieClip):void {
    TweenLite.to(mc,3,{alpha:0});
    }
    

  9. Hey there- I'm building a sequential animation with TimelineMax, but need the power of the from() method... is there a way to duplicate this procedure while utilizing TimelineMax/Lite? Thanks!

     

    var myTimeline:TimelineMax = new TimelineMax({tweens:[[mc, 3, {transformAroundPoint:{point:new Point(250,250), rotation:360},ease:Linear.easeNone}],[mc2, 1, {y:"100"}],[mc3, 1, {y:"100"}]], delay:0, align:TweenAlign.SEQUENCE, stagger:0, tweenClass:TweenMax, repeat:-1});
    

  10. Thanks for responding... After some trial and error, I discovered my Flash Player 10 install for IE was bad, reinstalled and is now working. So far I only have one issue left. In FF3 using SwfObject in static mode will not display the swf or the alt content. However it does work in dynamic mode (in all browsers). Thanks again!

     

    This is solved by the way...

  11. Got it. So I'm using swfObject in static mode, works well in IE but shows nothing in FF. Vice versa, if I publish the file in dynamic mode, it only displays the alternative content in IE (get flash player button), but works fine in FF. However, if I publish the file from flash I can view the content in both IE and FF. Would really like to use swfObject though, any suggestions? Thanks!

  12. Hey there- I've been working my way through the v11 beta tween classes, looking really good btw. So now I'm using the liquid stage class and I can't seem to get the most basic of examples to work. I publish the file and launch it in FF, but the objs do not change. I received the beta version with the additional classes from you could that be the issue. Any help would be appreciated.

     

    import gs.utils.LiquidStage;
    import gs.easing.Elastic;
    import flash.display.*;
    this.stage.align = StageAlign.TOP_LEFT;
    LiquidStage.init(this.stage, 550, 400, 550, 400);
    LiquidStage.pinObject(logo_mc, LiquidStage.BOTTOM_RIGHT);
    LiquidStage.stretchObject(bottomBar_mc, LiquidStage.BOTTOM_LEFT, LiquidStage.BOTTOM_RIGHT, null, true, 1.5, Elastic.easeOut);
    

×