Jump to content
Search Community

TronicVolta

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by TronicVolta

  1. You need to pass the frame number in an array using onCompleteParams. So it would go: TweenLite.to(option_A, 1, {x:252, y:163, ease:Expo.easeOut, onComplete:gotoAndStop, onCompleteParams:[2]});
  2. I load fonts this exact way with LoaderMax all the time, and it's always worked perfectly. Make sure if you're calling loader.dispose(), you're not passing true as a parameter.
  3. Are you publishing to Flash Player 10 and using Actionscript 3?
  4. What happens when you enter the url to the php script in the browser? If it's working you'll see the xml.
  5. It's not a bug. Good TweenMax.to (mc, 1, {blurFilter:{blurX:45}, onComplete:myFunction, onCompleteParams:[e]}); Bad TweenMax.to (mc, 1, {blurFilter:{blurX:45}, onComplete:myFunction(e)});
  6. You're forgetting to import TweenLite. import com.greensock.TweenLite;
  7. If you haven't already, I recommend watching this video. --> Timeline Basics
  8. Are you activating the TintPlugin? import com.greensock.plugins.TintPlugin; import com.greensock.plugins.TweenPlugin; TweenPlugin.activate([TintPlugin]);
  9. Sure, you can use the special property runBackwards. var myTween:TweenLite = new TweenLite(mc, 1, { runBackwards:true, x:1000});
  10. I couldn't get it to crash, and I have Windows XP - FF 3.6.2 - Flash Player 10,1,51,95 Debug. Although, when you click on 5 Reasons to use Elluminate, the scrubber and CC are stop receiving mouse events. Also, if you move the scrubber back once it's reached the end, and then click on 5 Reasons to Elluminate quickly, it get's funky. Check out the image below.
  11. Did you import the motion blur class and activate the plugin? import com.greensock.plugins.MotionBlurPlugin; import com.greensock.plugins.TweenPlugin; TweenPlugin.activate([MotionBlurPlugin]);
  12. It's because TimelineLite by default sets align to "normal", not "sequence." var imageAni:TimelineLite = new TimelineLite(); imageAni.appendMultiple([TweenLite.to(wipe1_mc, 0.5, {y:324, delay:1.5}), TweenLite.to(pic1_mc, 0, {alpha:0})], 0, "sequence");
  13. Are you using the latest version of the plugin?
  14. It's because you have your alpha value in quotations, which means it's going to be relative to the current value.
  15. I would probably use the special property onStart and call a function that plays the sound at the start of each tween. TweenMax.to(bullet1, .25, {alpha:1, onStart:playSound});
  16. Incorrect Syntax: imagesOver.(TweenMax.to(images, 1, {rotationZ:0, scaleX:2, scaleY:2, x:-2.5, y:-1})); Since you're tweening an array you must use "allTo", in addition to adding it to the timeline. imagesOver.appendMultiple(TweenMax.allTo(images, 1, {rotationZ:0, scaleX:2, scaleY:2, x:-2.5, y:-1}));
  17. I just threw this together by converting the adobe transition to a plugin. Give it a try, and see if it works for what you need. /** * VERSION: 1.0 * DATE: 3/12/2010 * ACTIONSCRIPT VERSION: 3.0 * @author Marco Di Giuseppe, marco[at]designmarco.com * @link http://designmarco.com * UPDATES AND DOCUMENTATION AT: http://www.TweenMax.com **/ package com.greensock.plugins { import com.greensock.*; import flash.display.*; import flash.geom.*; /** * WipeEffectPlugin provides a Wiping Transition Effect. * * USAGE: * * import com.greensock.TweenLite; * import com.greensock.plugins.TweenPlugin; * import com.greensock.plugins.WipeEffectPlugin; * TweenPlugin.activate([WipeEffectPlugin]); //activation is permanent in the SWF, so this line only needs to be run once. * * //Value is Number preset from 1 to 9 that represents the starting point- * //Top Left:1; Top Center:2, Top Right:3; Left Center:4; Center:5; Right Center:6; Bottom Left:7; Bottom Center:8, Bottom Right:9. * TweenLite.to(mc, 1, {wipe:1}); * * * Copyright 2010, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership. * * @author Jack Doyle, jack@greensock.com */ public class WipeEffectPlugin extends TweenPlugin { /** @private **/ public static const API:Number = 1.0; /** @private **/ protected var _target:Object; protected var _mask:Sprite; protected var _innerMask:Shape; protected var _startPoint:uint; protected var _cornerMode:Boolean; protected var _innerBounds:Rectangle; /** @private **/ public function WipeEffectPlugin() { super(); this.propName = "wipe"; this.overwriteProps = []; } /** @private **/ override public function onInitTween(target:Object, value:*, tween:TweenLite):Boolean { if (!target is DisplayObject) { return false; } _target = target; _innerBounds = _target.getBounds(_target); _startPoint = value; initMask(); return true; } /** @private */ protected function initMask():void { _mask = new Sprite(); _mask.visible = false; _target.addChild(_mask); _innerMask = new Shape(); _mask.addChild(_innerMask); _innerMask.x = _innerMask.y = 50; _innerMask.graphics.beginFill(0xFF0000); drawBox(_innerMask, -50, -50, 100, 100); _innerMask.graphics.endFill(); switch (_startPoint) { case 3: case 2: _innerMask.rotation = 90; break; case 1: case 4: case 5: _innerMask.rotation = 0; break; case 9: case 6: _innerMask.rotation = 180; break; case 7: case 8: _innerMask.rotation = -90; break; default: break; } if (_startPoint % 2) { _cornerMode = true; } var ib:Rectangle = _innerBounds; _mask.x = ib.left; _mask.y = ib.top; _mask.width = ib.width; _mask.height = ib.height; _target.mask = _mask; } /** @private */ protected function drawSlant(mc:Shape, p:Number):void { mc.graphics.moveTo(-50, -50); if (p <= 0.5) { mc.graphics.lineTo(200 * (p - 0.25), -50); mc.graphics.lineTo(-50, 200 * (p - 0.25)); } else { mc.graphics.lineTo(50, -50); mc.graphics.lineTo(50, 200 * (p - 0.75)); mc.graphics.lineTo(200 * (p - 0.75), 50); mc.graphics.lineTo(-50, 50); } mc.graphics.lineTo(-50, -50); } /** @private */ protected function drawBox(mc:Shape, x:Number, y:Number, w:Number, h:Number):void { mc.graphics.moveTo(x, y); mc.graphics.lineTo(x + w, y); mc.graphics.lineTo(x + w, y + h); mc.graphics.lineTo(x, y + h); mc.graphics.lineTo(x, y); } /** @private **/ override public function set changeFactor(n:Number):void { _innerMask.graphics.clear(); _innerMask.graphics.beginFill(0xFF0000); if (_cornerMode) { drawSlant(_innerMask, n); } else { drawBox(_innerMask, -50, -50, n * 100, 100); } _innerMask.graphics.endFill(); } } }
  18. It's probably happening because you're listening for the MouseEvent.MOUSE_OVER event. Try using MouseEvent.ROLL_OVER instead.
  19. What's happening in your code is after you've called the tweenOutFromLeftSide function the alpha of "this" is 0. So when you call tweenInFromLeftSide, calling TweenMax.from won't change the alpha to 1, because you're already at 0. Think of TweenMax.from as if the tween was just running backwards from it's current value. In this particular situation, I would either use TweenMax.fromTo, or the startAt property. TweenMax.fromTo(this, 1, {alpha:0}, { alpha:1, ease:Strong.easeOut}); TweenMax.to(this, 1, { startAt:{alpha:0}, alpha:1});
  20. Look into using RoughEase, which was created for this exact purpose. ---> http://www.greensock.com/roughease/
  21. When all your opening tweens complete, unless tmLite is a local variable it remains stopped at end of it's playhead. The reason insertMultiple() does nothing for you is because the tween has already reached the end of it's timeline. I would either use tmLite.reverse(), or create a new tmLite instance, (i.e. tmLite = new TimelineLite()
  22. You're going to want to use appendMultiple which accepts an array, so your code would look like: import com.greensock.plugins.*; import fl.transitions.*; import fl.transitions.easing.*; import flash.geom.Point; TweenPlugin.activate([TransformAroundPointPlugin]); var trianlge_array:Array = [green_triangle,green_txt_mask,blue_triangle,blue_txt_mask]; var myTimeLine:TimelineMax = new TimelineMax(); myTimeLine.appendMultiple([TweenMax.allTo(trianlge_array, 1, {transformAroundPoint:{point:new Point(-420,2090), rotation:50},ease:Linear.easeNone})]);
  23. I would try taking out the nested function which is a bad idea anyway. See if this works for you: private function onResumeLoaded(e:Event):void { e.target.removeEventListener(Event.COMPLETE, onResumeLoaded); var loader:Loader = e.target.loader as Loader; loader.scaleX = .01; loader.scaleY = .01; loader.x = stage.stageWidth / 2 - loader.width / 2; loader.y = stage.stageHeight / 2 - loader.height / 2; var yTween:Object = new Object(); yTween.transformAroundCenter = new Object(); yTween.transformAroundCenter.scaleY = 1; yTween.onComplete = onTweenComplete; yTween.onCompleteParams = [loader]; TweenLite.to(loader, 0.5, yTween); } private function onTweenComplete(loader:Loader):void { var xTween:Object = new Object(); xTween.transformAroundCenter = new Object(); xTween.transformAroundCenter.scaleX = 1; TweenLite.to(loader, 0.5, xTween); }
  24. Where do you use a mask? I didn't see any.
  25. It's a little unclear of what you're trying to accomplish. According to your code you're trying to scale the box1 to 1 and 0.5 at the same time, but only after the second rollover. If you haven't already, I highly recommend checking out the video on TimelineLite/Max basics --> http://blog.greensock.com/timeline-basics/ Make sure you've read through the get started tweening page as well. It will definitely provide for you a much clearer picture on how everything works. --> http://blog.greensock.com/get-started-tweening/
×
×
  • Create New...