Jump to content
Search Community

worked

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by worked

  1. Excellent! Sorry for the sloppy code, i should have looked at it more closely before posting that. Appreciate your help though! Thanks!
  2. 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!
  3. 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(); } }
  4. 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!
  5. 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.
  6. A working example (interactive demo) of each Tween can be found here: http://blog.greensock.com/tweenmaxas3/ Use the dropdown menu and select the tween you want, then click TWEEN.
  7. Try the scrollRect first. Indeed, but also to note, scrollRect only allows for a 4 sided shape with 90 degree angles. So if every you needed a different shape, you would need to use a mask... for whatever that's worth.
  8. 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!
  9. If the tweens are stored in an array, just query this array for the final items, using a conditional to determine those that are not currently active.
  10. Rotate your back item at the start, then when your item flips at the delay point, your back will flip the correct way. box_mc.back_mc.rotationY = 360;
  11. 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.
  12. 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}); }
  13. Here's a simple "drop-up" menu and sequencing animation done with TweenLite/Max and TimelineLite, loading via lazyBulkLoader. Thanks again for the excellent tweening classes, you've made creating amazingly smooth animations a reality! http://76.12.158.115/ed/UnitedWay/UWMA_Banner.html
  14. Here's an AS3 version by Brimlow at gotoandlearn.com: http://www.gotoandlearn.com/play?id=71 Although it's as3, the equation to scroll the mc will be the same for as2.
  15. Don't type the variable, for instance: var animType = Elastic.easeInOut; // assign a variable for the easing type
  16. Thanks for responding... So, I'm a member of club greensock... am I eligible for this latest version with all the goodies?
  17. 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}); }
  18. 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});
  19. 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...
  20. 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!
  21. 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);
×
×
  • Create New...