Jump to content
GreenSock

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

zumajoe

Members
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

1 Newbie

About zumajoe

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hey Jack, That worked perfectly, totally awesome and this code will be very useful for many things. I'm trying to convert that to AS2, no errors- but nothing happens. Am I missing something? import com.greensock.*; var clips:Array = [mc1, mc2, mc3, mc4, mc5, mc6, mc7, mc8, mc9, mc10, mc11, mc12, mc13, mc14]; var timeline:TimelineLite = new TimelineLite(); var temp:Array = clips.slice(); var i:Number = temp.length; var index:Number; while (--i>-1) { index = Number(Math.random()*i); timeline.appendMultiple(TweenMax.allTo(temp[index], globalDuration, {_xscale:150, ease:Cubic.easeInOut}, 0.2)); temp.splice(index,1); }
  2. ... a GreenSock plugin for AE, could it ever happen? I read an online interview the other day, said that you used to use AE? If not plugin, what about expression library? Getting addicted here.
  3. This works perfectly, is there a way to make it so the tweens are random- but don't start until the last one finishes? ie: mc5 starts/finishes > mc2 starts/finishes > mc8 starts/finishes i guess it wouldn't be random start times, more like random selection of the animation order...
  4. I'm having issues with resize and keeping center alignment at the same time... not sure what i'm missing here. I have it set so it can only resize to a max of 1200. I tried mixing both Pin and Resize but i don't get good results. What I want is to just have the content ALWAYS stay centered. var ls:LiquidStage=new LiquidStage(this.stage,995,900,900,814,1200); var area:LiquidArea=new LiquidArea(this,50,130,890,356,0x313f19); area.pinCorners(ls.TOP_LEFT, ls.BOTTOM_RIGHT, false, 1.75, {ease:Quint.easeOut}); //ls.attach(contentHolder, ls.CENTER, false, true, 1.75, {ease:Quint.easeOut}); area.preview=true; area.attach(contentHolder);
  5. Problem solved! Was trying to initiliaze the LiquidStage too soon... updated code: package pages{ import com.gaiaframework.templates.AbstractPage; import com.gaiaframework.events.*; import com.gaiaframework.debug.*; import com.gaiaframework.api.*; import flash.display.*; import flash.events.*; import com.greensock.TweenMax; import com.greensock.layout.*; public class IndexPage extends AbstractPage { public var bg_clouds:MovieClip; public function IndexPage() { super(); alpha=0; } private function init():void { var ls:LiquidStage=new LiquidStage(this.stage,550,555,550,555); var area:LiquidArea=new LiquidArea(this,100,100,350,150,0x313f19); area.preview=true; area.attach(bg_clouds); } override public function transitionIn():void { super.transitionIn(); init(); TweenMax.to(this, 0.3, {alpha:1, onComplete:transitionInComplete}); } override public function transitionOut():void { super.transitionOut(); TweenMax.to(this, 0.3, {alpha:0, onComplete:transitionOutComplete}); } } }
  6. Hey there, Just became a club greensock member... excited to use liquid stage! I'm new to using classes, so could I get a little guidance with the following? I'm trying to implement LiquidStage into Gaia framework but i'm getting an error: Inside of the Indexpage.as class file, this is my code: package pages{ import com.gaiaframework.templates.AbstractPage; import com.gaiaframework.events.*; import com.gaiaframework.debug.*; import com.gaiaframework.api.*; import flash.display.*; import flash.events.*; import com.greensock.TweenMax; import com.greensock.layout.*; public class IndexPage extends AbstractPage { public var bg_clouds:MovieClip; public function IndexPage() { super(); alpha=0; trace("construct"); var ls:LiquidStage=new LiquidStage(this.stage,550,555,550,555); var area:LiquidArea=new LiquidArea(this,100,100,350,150,0x313f19); area.preview=true; area.attach(bg_clouds); //new Scaffold(this); } override public function transitionIn():void { super.transitionIn(); TweenMax.to(this, 0.3, {alpha:1, onComplete:transitionInComplete}); } override public function transitionOut():void { super.transitionOut(); TweenMax.to(this, 0.3, {alpha:0, onComplete:transitionOutComplete}); } } }
  7. Thanks for the tip, I played with the roughEase a bit- I think i will need more time to experiment with it because I found an easier solution that worked for me. However my only problem is that TweenMax seems to be sticking on the first time it runs the tween... (i have the function running from a button release). On the 2nd click it plays fine, lag/hang. Is there some sort of initializing I should be doing? A portion of my AS2 code: import com.greensock.*; import com.greensock.plugins.*; import com.greensock.easing.*; TweenPlugin.activate([TransformMatrixPlugin, ColorMatrixFilterPlugin, VisiblePlugin, EndArrayPlugin]); function invalidTween(item:MovieClip):Void { TweenMax.to(item,0.3,{colorTransform:{redMultiplier:3}, delay:0.1}); TweenMax.to(item,0.5,{colorTransform:{redMultiplier:1}, ease:Quad.easeInOut, delay:0.5}); TweenMax.to(item,0.1,{repeat:2, _y:item._y+(1+Math.random()*2), _x:item._x+(1+Math.random()*2), delay:0.1, ease:Expo.easeInOut}); TweenMax.to(item,0.1,{_y:item._y+(Math.random()*0), _x:item._x+(Math.random()*0), delay:0.3, onComplete:onFinishTween, ease:Expo.easeInOut}); if (TweenMax.isTweening(item)) { trace("HEY WE ARE TWEENING OK?"); search_mc.enabled = false; search_mc.gotoAndStop(1); } function onFinishTween() { trace("finished"); search_mc.enabled = true; } }
  8. I don't think i've ever seen anyone respond to posts as quickly.. without flaming us beginners for not knowing code not even related to GS. I do not donate everywhere, but will be donating here, not there.
  9. I had a friend give me the code below showing how to do this in AS3... but i'm struggling to figure it out in AS2 (i started learning only AS3). It makes sense to me, however I know that AS2 doesn't use "int"..so I have no clue how to get this to work. I want to declare an animation without a movieClip- and then whenever I wish to apply that animation to a certain MC i will tell it to do so. This is the AS3 version: import gs.TweenMax; tweenIt( box, 200, 150 ); function tweenIt( item:MovieClip, ex:int, why:int ) : void { TweenMax.to(item, .7, { x:ex, y:why }); }
  10. Hello, What would be the best way to do a quick Vibrating / Shake effect that eases into still? I can't figure it out- using AS2 or AS3? Thanks.
×