Jump to content
GreenSock

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

Owen Corso

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Owen Corso

  1. the following code only tweens the floating window and not the textFields, the text fields just snap visibility on and off. i tried using autoAlpha plugin but kept getting errors and couldn't find examples on how to "remove" the autoAlpha... what is wrong with my code? /** * Handles the over state of the Product Info button, * fades in the infoModule movieClip which is basically just 3 display objects * a floating window and 2 dynamic text fields * * @param e:MouseEvent.ROLL_OVER * */ private function infoOverHandler(e:MouseEvent):void{ trace("over"); if(infoModule.alpha!=0) infoModule.alpha = 0; infoModule.visible = true; TweenLite.to(infoModule, .5, {alpha:1, ease:Circ.easeIn}); } /** * Handles the out state of the Product Info button, * fades out a floating window containing the product description text * * @param e:MouseEvent.ROLL_OUT * */ private function infoOutHandler(e:MouseEvent):void{ trace("out"); var tweenObject:Object = {}; tweenObject.alpha = 0; tweenObject.ease = Circ.easeOut; tweenObject.onComplete = toggleInfoVis; TweenLite.to(infoModule, .5, tweenObject); }
  2. mess with = switch states quickly before the state is done with tweening objects into place to build the state (ie go back and forth to home>people>Our Story on jackandjasper.com). thanks for the tip on ROLL_OVER vs MOUSE_OVER,that definitely fixes one of the problems.
  3. as you can see above, i tried instantiating the tween as a class variable in an effort to protect it from being garbage collected but i'm still having the issue.
  4. hi, i love Greensock class packages! i use them exclusively now. i am having a problem lately with my tweens (i think 2 separate problems). they seem to get lost or mixed up or garbage collected or whatever 1) if you mess with them before they're finished, they screw up 2) the MouseEvents are not smoothly being listened to. like if you jiggle the mouse over the sprite, it will lose the over event. www.jackandjasper.com maybe you can tell if my techniques are wrong just by looking at this class: package com.jackandjasper.util { import flash.display.Sprite; import flash.events.MouseEvent; import flash.text.TextField; import gs.TweenLite; import gs.easing.Back; import lt.uza.utils.Global; public class SideNavBtn extends Sprite { private var global:Global; private var id:Number; private var spr:Sprite; private var tf:TextField; private const outColor:Number = 0xd0ccb5; private const overColor:Number = 0xFFFF66; private const textTint:Number = 0x966241; private var myOverTintTween:TweenLite; public function SideNavBtn(passedInID:Number, passedInLabel:String) { super(); global = Global.getInstance(); id = passedInID; var f:Fill = new Fill(); spr = f.doFill(outColor, 300, 40); tf = new TextField(); tf.x = tf. y = 10; tf.selectable = false; if(global.css){ tf.styleSheet = global.css; } tf.htmlText = " " + passedInLabel + ""; addChild(spr); addChild(tf); addEventListener(MouseEvent.MOUSE_OVER, over); addEventListener(MouseEvent.MOUSE_OUT, out); addEventListener(MouseEvent.CLICK, clicked); } private function over(e:MouseEvent=null):void{ myOverTintTween = TweenLite.to(spr, 1, {tint:overColor, ease:Back.easeOut}); TweenLite.to(tf, 1, {tint:textTint, scaleX:1.2, scaleY:1.2, x:20, ease:Back.easeOut}); }//end over private function out(e:MouseEvent):void{ myOverTintTween = TweenLite.to(spr, 1, {removeTint:true, ease:Back.easeOut}); TweenLite.to(tf, 1, {removeTint:true, scaleX:1, scaleY:1, x:10, ease:Back.easeOut}); }//end out private function clicked(e:MouseEvent):void{ global.id = id; }//end clicked }//end class SideNavBtn }//end package
  5. Hello there, First, TweenLite is the fastest tweener ever GREAT JOB! i use your delightful library exclusively. Thank you so much! Second, sometimes when using TweenLite, my onComplete functions fire immediately, ie: TweenLite.to(peopleContainer.peopleHdr, .5, {y: (peopleContainer.peopleHdr.y+75), alpha:1, overwrite:3, onComplete: toggleVisibility()}); this statement is unfortunately toggling the visibility before the tween even starts in reading the forums, it seems there is a scoping issue in Actionscript 2 but explicitly not so for AS3 and as this is AS3, i wanted to reach out and check with you. Thanks again for the great free fast code! ~Owen Corso ored.net
×