Jump to content

Carl last won the day on April 4 2019

Carl had the most liked content!


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Carl

  1. thanks. that file unzipped fine but I don't have cs5. let's try this. I've attached an fla with your code and the greensock classes. if working.fla does not export and animate a red box, then there is a real issue on your end. please try it and let me know carl
  2. are you 100% positive that your Movie Clip that you intend to tween has an INSTANCE name of mc? if you are still having problems, zip and upload a simplified fla, thanks. carl
  3. congrats on getting the count down to work. i don't know if you have changed it, but I thought your dust was controlled by an ENTER_FRAME event. if so, you will have to create that listener again, and possibly fade up the dustContainer_mc so you can see it. something like function restart():void { trace('Total timeline lasted'+myTimeline.duration); myTimeline.restart() addEventListener(Event.ENTER_FRAME,myEventHandler); //add a Tweenlite to fade up the dust }
  4. this one is great. http://www.republicofcode.com/tutorials ... s3masking/ stop reading when you get to the part about: import fl.transitions.Tween; import fl.transitions.easing.*; you will be better off using greensock code to handle the animation. -c
  5. yes, that can be achieved with masking. the way those images are revealed appears to be with morphing organic shapes which may be a bit of a challenge. its not just a simple circle or square mask.
  6. if you have your tlTwo defined outside any functions and paused, it might work. I haven't studied your code thoroughly. var tlTwo:TimelineLite = new TimelineLite({paused:true}); as for why is seems that your timeline is skipping to mid tween, read GreenSock's first response in this thread as I believe it pertains to your situation: viewtopic.php?f=1&t=3508&p=13627&hilit=rootTimeline#p13627 his second resonse here also seems express the same theory: viewtopic.php?f=1&t=2276&p=8541&hilit=rootTimeline#p8541 ----- as for your allTo issue. use onCompleteAll. onCompleteAll will fire after all the allTo tweens have finished.... very handy. http://www.greensock.com/as/docs/tween/ ... tml#allTo()
  7. hmm, I don't know what the larger scope of your project is but this is not a good use of ENTER_FRAME. ENTER_FRAME events fire at the rate of your swf's frames per second. Assuming your frame rate is 30fps, what you are doing is is creating a new Tween on the same object rectangle[1] 30 times every second. This is likely to cause many problems and should be rectified before trying to address any other issues. There is no problem using ENTER_FRAME in a project with TweenLite at all, but if you combine the 2 in this manner it is counter productive. if you pull the ENTER_FRAME stuff out and just do: function rect1():void { rectangle[1].x = 0; TweenMax.to(rectangle[1], 1, {rotationZ:-180, onComplete:rect2}); } function rect2() { rectangle[2].x = 50; TweenMax.to(rectangle[2], 1, {rotationZ:-180}); } rectangle[1] will tween and then rectangle[2] will tween as expected. Carl
  8. hi beno, this could be a simple syntax error. when using onComplete:someFunction... never put the () parenthesis after the function name. GOOD TweenLite.to(parent_container, 1, {x:130, onComplete:NextSlide}); BAD TweenLite.to(parent_container, 1, {x:130, onComplete:NextSlide()});
  9. the issue with the text not fading is that whey using dynamic text you need to embed the font. if the font isn't embedded, it won't fade. its a flash thing. to embed your font, select the textfield and in the properties panel click "embed" as for issue number 2 yes, I believe your enterframe is still running. you don't want the dust to stop moving until it is faded out correct? so do this on your fade tween: TweenLite.to(dustContainer_mc, 1, {alpha:0, onComplete:killDust}); then outside of any functions create a new function like this function killDust(){ removeEventListener(Event.ENTER_FRAME,myEventHandler); } ---- what I would do is put a trace("running") somewhere in myEventHandler() and then you will know if it is running once the objects fade out.
  10. i love it when a plan comes together. glad to help c
  11. I just ran a few tests at multiple framerates and tween durations and could not produce a flicker. if you post a simplified Flash CS4 fla which demonstrates this behavior I will take a look at it. Carl
  12. i slammed this var i:uint = this.numChildren; while (i--) { var target:DisplayObject = getChildAt(i); TweenLite.to(target, 1, {alpha: .5, onComplete: removeThis, onCompleteParams: [target]}); } function removeThis(target:DisplayObject) { removeChild(target); } directly into a flash cs4 fla with 3 MovieClips on the stage. it worked flawlessly. each clip faded to .5 and then got removed. There is nothing inherently wrong with the guts of what you are doing or with TweenLite. I'm a bit confused myself. Perhaps there is something wrong with your class structure, but I really have no idea. Hopefully someone else can chime in. If you happen to solve it, please let us know. oh... maybe a this.removeChild... Carl
  13. yeah, I think it is because completeParams: needs to be in the form of an array. right now you are passing in a displayObject. do this TweenLite.to(target, 2, {alpha: 0, onComplete: removeThis, onCompleteParams:[target]}); now you are passing an array with one item in it. the reason it expecting an array is because it allows you pass in multiple parameters when the need arises.
  14. this could be a bit involved but the best thing to do is put all your dust specks / lines into one container movieclip. select all the dust stuff on the stage > convert to symbol > name it something. in the properties panel give this new symbol the instance name dustContainer_mc now that all your dusts live in a new symbol, you need to modify the code everywhere in your enterframe function to read dustContainer_mc.dust1 dustContainer_mc.dust2 dustContainer_mc.dust3 etc. a short cut would be to just create new references (using the same names in your enterframe) to these movies in the top of your code outside any functions like: var dust1:MovieClip = dustContainer_mc.dust1 var dust2:MovieClip = dustContainer_mc.dust2 etc watch this if you need to: http://www.snorkl.tv/2011/01/fireside-c ... -addchild/ now the whole point of putting all the dusts into one clip is so that you can easily fade all dusts by just tweening the container and not all 3 or 4 dusts individually. to fade out the dustContainer use a basic TweenLite. 1: add import statements at the top of your code on frame 1 import com.greensock.*; import com.greensock.easing.*; 2: modify your counter code so that dust fades out function countdown() { counter--; countdown_txt.text=counter.toString(); if (counter==3){ clearInterval(intID); intID=setInterval(countdown,3000); else if (counter==0) { trace("countdown complete"); clearInterval(intID); //add this TweenLite.to(dustContainer_mc, 1, {alpha:0}); } } as for the counter 3, 2, 1 text. you can either have if else statement for 3 2 1 in your counter code and use a TweenLite to tween each TextField or you can build a TimelineLite that sequences all the numbers fading out. Please experiement and let us know where you get hung up. Carl
  15. Hello Ibanta, The GreenSock platform makes it very easy to perform complex animations, either pre-scripted or in response to user interaction. The platform also has many tools for loading and managing externally loaded assets. The limits are only restricted by the programmer's expertise and capabilities of Flash as a whole. Can a greensock application do this, and if so, which one? An application written to use the various features of GreenSock would definitely perform well. There is no GreenSock out of the box solution to build this app. Your programmer would have to have extensive knowledge of ActionScript and custom code many functions that could be enhanced by the capabilities of GreenSock and how would my programmer go about writing it? Unfortunately the purpose of these forums is to help people trouble-shoot specific implementations of the GreenSock code when they are having trouble not provide guidance on how to structure complex applications. you may have better luck in http://forums.adobe.com/community/flash or on www.actionscript.org You're best bet is to continue to do some research and hire an ActionScript developer who is familiar with the tools needed to fulfill the requirements of your product. Good luck with your app! Carl
  16. if you continue to use layer masks in Flash you are no doubt going to run into more problems when combining actionscript with your masked elements. this is totally beyond a greensock issue and is something inherently wrong with Flash. use ActionScript to mask instead http://www.republicofcode.com/tutorials ... s3masking/
  17. Hey a-ok, I pasted your code into a Flash CS4 project and it worked with no errors. In the documentation http://www.greensock.com/as/docs/tween/ ... lugin.html there is a reference to the containerClass when using Flex and some other stuff that can happen if you are using masks or 3D rotation in the Flash IDE. Check it out. After reading if you still have trouble please post back with more info on your environment and I'm sure someone will help you. Carl
  18. this is not a complete or tested solution but hopefully enough to get you going in the right direction. the problem is that at the top of your file you have: var _rock:rock=new rock ; probably should be var _rock:rock=new rock() ; //add parenthesis // this is a reference to only ONE rock though. You need to create multiple rocks. in your rocks() function when you do addChild(_rock) it is the same _rock you started with. I think you need something like this in your rocks() function: function rocks(...rest):void { //you need a new rock so create one var _rock:rock = new rock() //note class names should be capitalized // you can put the rock in your array to reference it or loop through all rocks later rockArray.push(_rock); addChild(_hero); addChild(_rock); _rock.x = stage.stageWidth; TweenLite.to(_rock, 7, {x:-10, ease:Linear.easeNone, onComplete:rocks,onUpdate:detectCollision, autoRemoveChildren:true}); }
  19. the Bounce ease is what it is. Back and Elastic take easeParams which allow you to tweak the overshoot / elasticity of the ease. here is more info on easeParams: http://www.snorkl.tv/2011/01/control-ho ... e-rubbery/ if you are a club greensock member you can make your own ease with http://www.greensock.com/customease/
  20. good news. glad it worked.
  21. hi, take a look at the interactive demo - tweening basics on this page http://www.greensock.com/tweenlite/ it will provide the code that you need for your eventListener. TweenLite.to(mc, 1, {x:0}); the code above will move a displayObject called mc to an x position of 0 from where ever it is. in your case start with your swf off to the right. It will really help you to read the getting started page http://www.greensock.com/get-started-tweening/ first and experiment with the greensock code before trying to solve a specific propblem.
  22. instead of tracing currentTime to track the insertion point use the timeline's duration with addLabel() tl.append( new TweenLite( target, 0.5, { vars } ) ); tl.addLabel("home", tl.duration) tl.append( new TweenLite( target, 0.5, { vars } ) ); tl.addLabel("about", tl.duration) this gives you a nice dynamic approach. grab some source files from here to see it in action: http://www.snorkl.tv/2011/01/navigate-a ... d-tweento/ your suggestion for a an appendLabel("label") that automatically does the above sounds cool to me. Carl
  23. i'm not familiar with this issue. i assume you've checked a bunch of times that the instance names are on the symbols in ALL keyframes that they reside. if you upload a cs4 or lower fla that is simplified to only illustrate this behavior, i'll take a look at it Carl
  24. Jack recently created steppedEase: viewtopic.php?f=1&t=4046&p=15991&hilit=steppedEase#p15991 I think it is what you are looking for. you can view the documentation for more http://www.greensock.com/as/docs/tween/ get the latest v11 files: http://www.greensock.com/tweenmax/ c