Jump to content
Search Community

stenrap

Members
  • Posts

    15
  • Joined

  • Last visited

Recent Profile Visitors

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

stenrap's Achievements

0

Reputation

  1. Very cool! Thank you so much! Exactly what I was looking for!
  2. Wow, I'm a member and I had overlooked that class! I have the .as files, but is there any API documentation for it?
  3. When I tween a bitmap's rotationY property, the bitmap seems to stretch and jut out initially, then shrink back to size and jerk around. Overall it looks pretty damn crappy. As you can see, I'm using transformAroundCenter, but that doesn't fix the problem: TweenMax.to(smartCard, 1.0, {transformAroundCenter:{rotationY:180}, ease:Strong.easeOut}); How can I smoothly flip a bitmap around its center?
  4. Hi all, I just solved a weird problem so I thought I'd post the solution in case it helps anyone else. I was attempting to apply a mask to a sprite that was being tweened with glowFilter, but the mask wasn't being applied. The solution was to set cacheAsBitmap to true for both the Sprite and the mask. Here's some code that illustrates the problem (if you uncomment the two cacheAsBitmap lines, the problem goes away): package { import com.greensock.TweenMax; import flash.display.*; public class Graphics_TEST extends Sprite { private var verticalLine1:Sprite = new Sprite(); private var verticalLineMask1:Sprite = new Sprite(); public function Graphics_TEST() { verticalLine1.graphics.lineStyle(4, 0xFFFFFF, 1.0, false, LineScaleMode.NONE, CapsStyle.NONE); verticalLine1.graphics.lineTo(0, 256); verticalLine1.x = 50; //verticalLine1.cacheAsBitmap = true; verticalLineMask1.graphics.beginFill(0xFFFFFF, 1.0); verticalLineMask1.graphics.drawRect(0, 0, verticalLine1.width, verticalLine1.height); verticalLineMask1.graphics.endFill(); verticalLineMask1.x = 20; //verticalLineMask1.cacheAsBitmap = true; verticalLine1.mask = verticalLineMask1; addChild(verticalLine1); addChild(verticalLineMask1); TweenMax.to(verticalLine1, 0.75, {glowFilter:{color:0xFFFFFF, alpha:1, blurX:30, blurY:30, strength:4}}); } } } I'm not sure whether this is a GreenSock or Flash bug, but I'm leaning toward the latter based on the GreenSock documentation for the MotionBlurPlugin (although I'm using the Flex SDK to compile, not the Flash IDE): The strangest thing of all: horizontal lines don't suffer from this problem!
  5. Figured it out. The function called by onCompleteParams should not expect an array (even though that's what you're passing to onCompleteParams), it should declare and expect the individual parameters stored in the array passed to onCompleteParams.
  6. Hi all, This line of code... overAndOverTimeline.append(TweenMax.to(step01Bitmap, 0.5, {x:216, y:287, ease:Strong.easeOut, onComplete:shootLasers, onCompleteParams:[184, 0]}), -0.20); ...is leading to this error: Is there a known problem with onCompleteParams just plain not working? I get the same error if I instantiate an array prior to this line of code and pass it to onCompleteParams. Perhaps a better question: What am I doing wrong that I can't pass an array to onCompleteParams? Am I missing something obvious?
  7. I'm not sure about placing libraries into default directories and expecting Flash to detect them, but you can point Flash to your library once and Flash will remember it for future projects. I don't have a Mac, but here's how you do it in Windows (perhaps this will help you figure it out): [*:4znty2i5]Click the Edit menu, then click Preferences. [*:4znty2i5]For the Category (on the left side), click ActionScript. [*:4znty2i5]For the language (toward the bottom middle), click ActionScript 3.0 Settings [*:4znty2i5]In the Library Path row, click the plus (+) or folder and add the path. [*:4znty2i5]Click OK a couple times to save the changes.
  8. Hi all, When I simultaneously tween with physicsProps and transformAroundCenter in a timeline, the latter seems to override the former (the physicsProps tween simply stops). Following is a snippet of the code in question: setupTimeline.append(TweenMax.to(step10Bitmap, 0.72, {alpha:1.0, physicsProps:{x:{velocity:-552, acceleration:410}, y:{velocity:253, acceleration:460}}}), -0.15); setupTimeline.append(TweenMax.to(step10Bitmap, 0.72, {transformAroundCenter:{rotation:360}}), -0.72); I tried adding "overwrite:0" to the vars object of the first tween, but that doesn't make any difference. I also tried setting a higher value for the offset of the second tween so they wouldn't execute at exactly the same time, but the second tween still kills the first tween (it just takes a little longer). I'm just trying to cause an object to spin and fall at the same time, so I have two questions: 1. What's wrong the way I'm trying to do it above? 2. Is there some other/better way to accomplish a simultaneous spin/fall?
  9. No hassle at all. Thanks for fixing it so quickly--works like expected now.
  10. OK, I've attached a very simple FLA that demonstrates the problem (the code is on the first frame of Layer 1). I don't use the Flash IDE all that much, so I'm not sure whether the font asset in the library will travel with the FLA file (if not you'll need to embed the Verdana font). I think the problem is the fact that the timeline has a call to TweenMax.allFrom() right before the call to TweenMax.allTo(). If I comment line 36, the text fades away and stays invisible as expected.
  11. By the way, I can work around the problem by using autoAlpha instead of alpha... timeline.appendMultiple(TweenMax.allTo(split.textFields, 1.25, {autoAlpha:0.0, ease:Strong.easeOut}), 1.25, TweenAlign.START, 0.08); ...but I'd like to understand what's going on.
  12. Hi all, I'm instantiating a TimelineMax instance and tweening the alpha of a SplitTextField to zero by calling appendMultiple(). The tween works, and the SplitTextField fades to an alpha of zero, but as soon as the tween is done, the entire SplitTextField immediately reappears. Other items appended to the same timeline, such as Bitmaps, fade to an alpha of zero and then remain invisible (which is what I want). Here's the line of code in question. What am I doing wrong? timeline.appendMultiple(TweenMax.allTo(split.textFields, 1.25, {alpha:0.0, ease:Strong.easeOut}), 1.25, TweenAlign.START, 0.08);
  13. Got it sorted out. Since the append() method expects a single tween, you can't use it to tween an array of objects (such as an array of split textfields). Instead, you need to call appendMultiple(). I was thrown off by the fact that the output of the compiler error was wrapping to a new line, so it looked like the caret was pointing to the delay parameter: delay:0.5 ^
  14. It looks like you're tweening two different objects, but you've only got one TweenLite object and you're immediately overwriting it. Maybe you want to do this: import com.greensock.*; import com.greensock.plugins.*; import com.greensock.easing.*; var btns:Array = [btn1, btn2, btn3, btn4, btn5, btn6]; var activeTween1:TweenLite; var activeTween2:TweenLite; for (var i:int = 0; i < btns.length; i++) { btns[i].buttonMode = true; btns[i].addEventListener(MouseEvent.ROLL_OVER, over); btns[i].addEventListener(MouseEvent.ROLL_OUT, out); } function over(event:MouseEvent):void { activeTween1 = new TweenLite(event.currentTarget.board1, .25, {x:50}); activeTween2 = new TweenLite(event.currentTarget.board2, .25, {x:75}); } function out(event:MouseEvent):void { activeTween1.reverse(); activeTween2.reverse(); }
  15. Hi all, First post...just became a shockingly green member. I'm trying to add a TweenMax.allFrom() tween on a SplitTextField object to a TimelineMax, and I'm running into a compiler error. Here's my code: var welcomeToTextSplit:SplitTextField = new SplitTextField(welcomeToText); var welcomeTimeline:TimelineMax = new TimelineMax(); welcomeTimeline.append(TweenMax.allFrom(welcomeToTextSplit.textFields, 1.5, {transformAroundPoint:{point:new Point(ovidSetupBotText.x + ovidSetupBotText.width + 5, ovidSetupBotText.y), scale:0.0}, delay:0.5, ease:Strong.easeOut})); And here's the compiler error: Error: Implicit coercion of a value of type Array to an unrelated type com.greensock.core:TweenCore. welcomeTimeline.append(TweenMax.allFrom(welcomeToTextSplit.textFields, 1.5, {transformAroundPoint:{point:new Point(ovidSetupBotText.x + ovidSetupBotText.width + 5, ovidSetupBotText.y), scale:0.0}, delay:0.5, ease:Strong.easeOut})); ^ Any ideas what I'm doing wrong?
×
×
  • Create New...