Jump to content
GreenSock

Applauz

Members
  • Posts

    80
  • Joined

  • Last visited

Everything posted by Applauz

  1. Yup .. I agree. I've made over 20 iOS and Android apps using this library in Flash CC / Animate CC. Works like a charm.
  2. Curious why it is labelled as archive? Are you not doing any further development of Greensock for Flash ? Flash now Animate CC is still a very viable tool for app development. I do both HTML5 and AIR apps for mobile. AIR is by far my favourite. Just curious why not just have 2 categories instead of giving so little presence to the Flash version? It makes it seem like you arent supporting it anymore... which would be a shame.
  3. The other thing I thought of that might work.. is onUpdate.. check if the fish has left the right side or left side of the screen and fix the position. function checkFish1Position():void{ if(fish1.x >= 1200){ fish1.scaleY = -1; } if(fish1.x <= -100){ fish1.scaleY = 1; } }
  4. I've noticed also .. when I use onComplete.. it fires the event at the right time... however.. is there a way for me to fire an event when it resets itself back to the left hand side of the screen ? Basically .. my bezier params tell the object to move from the left to the right of the screen and then calls the same function again. onComplete fires when it reaches the right side of the screen... but then an animation occurs to send the object back to the left of the screen. How can I know when that animation completed ?
  5. I've attached my file.. with everything stripped out. You will have to add your own com folder with greensock plugins. When you compile you will see the fish swims from left to right .. but when it finishes and starts to go back to the left.. its upside down. Sample.fla.zip
  6. Here is what I am using TweenMax.to(fish1, 20,{bezierThrough:{type:"cubic", values:[{x:-400, y:700}, {x:Math.random()*stage.stageWidth, y:Math.random()*stage.stageHeight}, {x:0, y:Math.random()*stage.stageHeight},{x:500, y:Math.random()*stage.stageHeight}, {x:Math.cos(angle) * radius + xCenter, y:Math.sin(angle) * radius + yCenter},{x:1200, y:Math.random()*stage.stageHeight},], autoRotate:["x","y","rotation",false]}, ease:Linear.easeNone,onComplete:tweenFish1}); It's weird... everything works fine when the fish is moving to the right.... when it gets to the end of the animation is when it flips upside down. So it happens when the onComplete is fired. Is there a better way to keep the fish swimming randomly without having to do a hard onComplete reset the animation ?
  7. So I've been playing with the bezierThrough plugin. It's awesome. I'm trying to make a fish animation. I need the fish to constantly be moving to random coordinates. It's working. However sometimes the fish goes upside down. Is there a way to prevent this from happening ? Appreciate any answers. Thanks.
  8. Take a look at this example... http://www.snorkl.tv/2011/04/tweenlite-meets-flash-drawing-api-for-animated-line-drawing-fun/ The advanced option at the bottom in yellow. I'm looking to do something very similar except instead of drawing the lines.. I want the lines to already be present and then adjust when the circles y value changes. Any ideas how I can keep the line attached to the circles when the circles perform their Tween animation ?
  9. Is it possible with greensock to transform a circle to a square with rounded corners ?
  10. Worked out perfectly .. thanks!
  11. I'm trying to set top and bottom limits on a scrolling / tweening movie clip and can't quite get it to work. Here is my current code. Any help would be appreciated. var destY:Number = activity_mc.y; function handleMouseWheel(e:MouseEvent):void { trace(activity_mc.y); trace(e.delta); var _delta:int = e.delta > 0 ? 1 : -1; destY += _delta * 200; TweenMax.to(activity_mc, .2, {y:destY}); }
  12. I'm trying to scroll the "social-stream" ID. <div class="streamContainer fadeout"> <div id="social-stream"></div> </div> tried with this .. but not working scrollToBottom(); function scrollToBottom(){ TweenLite.to(".social-stream", 10, {delay:3,backgroundColor:"#000000", scrollTop:200, ease:Linear.ease, onComplete:scrollToTop}); } function scrollToTop(){ TweenLite.to(".social-stream", 10, {delay:3,backgroundColor:"#000000", scrollTop:0, ease:Linear.ease, onComplete:scrollToBottom}); } });
  13. I have an HTML page that is pulling in various social posts. Wondering it its possible to use Greensock to animate the page from top to bottom ... vice versa ?
  14. Wondering how I could accomplish an effect in the JS version. Basically want to make a horizontal line with a circle (handle). Think of it as the way a volume scrubber looks. I want the ability to drag / throw it .. when it reaches the end of the line it will bounce and and start moving the opposite direction. I would also need a colored line to follow behind it. If that makes sense.
  15. it wont let me Tween the channel variable from inside a function. If I put var snd:Sound = new DoorOpenClose(); var channel:SoundChannel = snd.play(0); TweenLite.to(channel, 2, {volume:1}); This will work however I need it in the function.
  16. I've tried without the update option as well... Even this wont work var snd:Sound = new DoorOpenClose(); var channel:SoundChannel = snd.play(0); function checkDoorStatus():void{ if(doorLeft_mc.x < -300 && doorRight_mc.x > 750 && doorStatusNum == 1){ TweenLite.to(channel, 2, {volume:1}); TweenMax.to(doorLeft_mc, 4, {x:-554, ease:Expo.easeOut, onComplete:cleanUpDoors}); TweenMax.to(doorRight_mc, 4, {x:1024, ease:Expo.easeOut}); TweenMax.to(fade_mc, 2, {alpha:0, ease:Expo.easeOut}); TweenMax.to(doorFrame_mc, 1, {alpha:0, delay:0.2, ease:Expo.easeOut, onComplete:killFrame}); }
  17. This is driving me absolutely crazy. Trying to do a simple task of fading in a sound. I am able to do it when the TweenMax call is done outside of a function. However if the call is in a function it doesnt work. The following code does not work... even placing trace statements in the checkDoorStatus, etc to verify the function gets called. var introDoor:Sound = new DoorOpenClose(); var soundTrans:SoundTransform = new SoundTransform(0,0); var soundChannel:SoundChannel = introDoor.play(0,0,soundTrans); function checkDoorStatus():void{ if(doorLeft_mc.x < -300 && doorRight_mc.x > 750){ killAllDoorListeners(); TweenMax.to(doorLeft_mc, 4, {x:-554, ease:Expo.easeOut, onComplete:cleanUpDoors}); TweenMax.to(doorRight_mc, 4, {x:1024, ease:Expo.easeOut}); TweenMax.to(fade_mc, 2, {alpha:0, ease:Expo.easeOut}); TweenMax.to(doorFrame_mc, 1, {alpha:0, delay:0.2, ease:Expo.easeOut, onComplete:killFrame}); TweenMax.to(soundChannel, 2, { volume:1, ease:Strong.easeInOut, onUpdate:fadeDoorSound } ); } } function fadeDoorSound():void{ trace("SOUND SHOULD BE FADING"); var soundTrans : SoundTransform = new SoundTransform(soundChannel.soundTransform.volume, 0 ); soundChannel.soundTransform = soundTrans; } This however does work... but is no good to me as I need the TweenMax to get called inside the checkDoorStatus function. var introDoor:Sound = new DoorOpenClose(); var soundTrans:SoundTransform = new SoundTransform(0,0); var soundChannel:SoundChannel = introDoor.play(0,0,soundTrans); TweenMax.to(soundChannel, 2, { volume:1, ease:Strong.easeInOut, onUpdate:fadeDoorSound } ); function fadeDoorSound():void{ trace("SOUND SHOULD BE FADING"); var soundTrans : SoundTransform = new SoundTransform(soundChannel.soundTransform.volume, 0 ); soundChannel.soundTransform = soundTrans; } Any idea why this would be happening ?
  18. Quick question. Which license is needed if the project is an Events app for a conference. It's a free app in the app store ? Which license would the company I work for need to purchase for use in this type of app ?
  19. Hello, Would Greensock be able to handle the shooting of the basketball for a game like this ? I basically want to recreate this - http://gdgfiles.arkadium.com/games/3-point-shootout/game/3-point-shootout.swf Any help would be greatly appreciated.
  20. The problem is that on a retina iPad .. anything that blitmask captures is captured at non retina resolution and appears blurry. This happens because the raw dimensions of a file for example could be 1000 x 1000, however on the stage you resize that item to 500 x 500. Its only resized to 500x500 .. the image is actually still 1000x1000 under the hood. When you use blitMask on the image that youve scaled down to 500x500 .. it basically takes a photo of that image. So now you lose that the image is actually 1000 x 1000. You now have an image that is 500 x 500. This is why I was asking if theres a way for blitmask to first capture the image while its at 1000 x 1000 .. and then scaled that image back to 500 x 500 ?
  21. not at this point I dont think .. Unless you see an easy way to do this.. Here is my code var blitMask1:BlitMask = new BlitMask(strip1,strip1.x,strip1.y,strip1.width,300,true,true,0xffffff,true); var blitMask2:BlitMask = new BlitMask(strip2,strip2.x,strip2.y,strip2.width,300,true,true,0xffffff,true); var blitMask3:BlitMask = new BlitMask(strip3,strip3.x,strip3.y,strip3.width,300,true,true,0xffffff,true); var number1:int; var number2:int; var number3:int; var resultsOnce:int = 0; var score:int = 0; // SOUNDS var slotmachineRoll:slotMachineRoll = new slotMachineRoll(); var slotmachineHandle:slotMachineHandle = new slotMachineHandle(); var slotmachineWin:slotMachineWin = new slotMachineWin(); var slotmachineJackpot:slotMachineJackpot = new slotMachineJackpot(); var slotmachineGameOver:slotMachineGameOver = new slotMachineGameOver(); bg2_mc.visible = false; lights1_mc.visible = false; lights2_mc.visible = false; var credits:int = 5; credits_mc.gotoAndStop("credits"+credits); spin_btn.addEventListener(MouseEvent.CLICK, spin); function spin(event:MouseEvent):void { handleCredits(); resultsOnce = 0; slotmachineRoll.play(); resultsTXT.text = ""; dragBall_mc.mouseEnabled = false; dragBall_mc.mouseChildren = false; var i:int = 1; while (i <= 3) { var newNumber:Number = (randomNumber(0, 5) * 300)+14400; //tween to the relative value of newNumber TweenMax.to(this["strip" +i], 3.5 + (i*.8), {y:String(newNumber), onComplete:slotsLandedOn}); //blur to 40 and then back to 0. TweenMax.to(this["strip" +i], 2, {blurFilter:{blurY:40}, repeat:1, yoyo:true}); i++; } }
  22. The reason I want to resize the blitmask is because the movieclip I am capturing is an image thats actually 1000 x 1000 and scaled by 50% to 500x 500. The reason its scaled is so it is supported on retina devices. So what ends up happening is blitmask captures the 500 x 500 image What I want to happen is capture the 1000 x 1000 image and then scale the blitmask back by 50% Unless there is another way to handle this ?
  23. After capturing a blitmask is it possible to resize the bitmap that was captured ?
  24. Disregard... was using an older implementation of greensock. Works now
  25. Carl, I'm trying to disable bitmapmode when the animation comes to a stop. However when I do this in the onComplete function all the spinners disappear. Any idea why this would happen ?
×