Jump to content
Search Community

X10

Members
  • Posts

    94
  • Joined

  • Last visited

Everything posted by X10

  1. Hi temeraire. If you have 2 movie clips you want to animate at the same time you need to use the offset parameter on your timeline when you append the tweens, like so: myTimeline.append(TweenLite.to (mc1, 1, {y:"100"})); myTimeline.append(TweenLite.to (mc2, 1, {y:"100"}),-1); This tells the second tween to start -1 second from the end of the current point in the timeline, as the 1st tween takes 1 second also, these 2 tweens would start at the same time. There are plenty of tutorials on how to use Timeline Lite/Max, the best place to start would be the Intro to TimelineLite and then perhaps Carl Schoof's Excellent 6 part series on TimelineLite. There is also the really useful documentation provided by Jack (although it can be a bit daunting on the first few scan-throughs if you're new to Greensock!) I hope this helps You can check out
  2. Hi SyntaxMind, Maybe I'm not understanding you correctly but you have 2 functions, one when you mouse over, the other when you mouse out: private function onOverHandler(e:MouseEvent):void { TweenMax.to(e.target, 1, {y:720, ease:Back.easeOut}); } private function onOutHandler(e:MouseEvent):void { TweenMax.to(e.target, 1, {y:737, ease:Back.easeOut}); } If you want the menu item that you are hovering over to not go down again when you hover away from it you simply have to remove "MouseEvent.ROLL_OUT, onOutHandler" for all your menu items. Is this what you're asking? Presumeably however, if you then were to mouse over any other button, you would want the previously 'raised' button to go down? This would involve a bit more code to do correctly. Have I understood you correctly? X10
  3. I concur with Carl, those boxes float like butter on a hot knife on my systems.
  4. Glad to hear you got the other bits sorted! The bike thing does sound like a timing issue and something you'll have to work out with a bit of trial and error. I tried opening your file but I get an "Unexpected File Format" Error. I have Flash CS4, what version is your FLA saved to? X10
  5. To answer your last query, TimelineLite/Max has an appendMultiple method into which you can parse an array of tweens. You could use it like this: timeline.appendMultiple([ TweenLite.to(mc1, 1, {alpha:0}), TweenLite.to(mc2, 1, {alpha:0}), TweenLite.to(mc3, 1, {alpha:0}), ], 5, TweenAlign.START, 0); This places 3 tweens into an array for the appendMultiple method and START's them all at the same time. There is an offset of 5 seconds, so it won't start until 5 seconds after the last tween. Carl Schoof's TimeilneLite tutorial on Active Tuts has a brilliant interactive visualiser that you can use to experiment with this if you're feeling up to it, try it out! X10
  6. Hi cracknell, Welcome to the Greensock forums! Glad to see you're getting stuck in and troubleshooting your code. Using delay's is the correct way to 'pause' as you say between tweens, however, TimelineLite has it's own method for delays which might help you slightly. tl.append( TweenLite.to(image_mc, 1, {_x:-300, _y:0, ease:Quint.easeIn}),3); tl.append( TweenLite.to(lafrom_mc, 1, {_x:20, _y:33, ease:Quint.easeIn}),-1); tl.append( TweenLite.to(lafrom_mc, 1, {_x:-300, _y:33, ease:Quint.easeIn}),3); tl.append( TweenLite.to(logos_mc, 1, {_x:110, _y:185, ease:Quint.easeIn}),-5); tl.append( TweenLite.to(toFind_mc, 1, {_x:20, _y:33, ease:Quint.easeIn}),-1); tl.append( TweenLite.to(toFind_mc, 1, {_x:-300, _y:33, ease:Quint.easeIn}),3); tl.append( TweenLite.to(logos_mc, 1, {_x:-280, _y:185, ease:Quint.easeIn}),-1); tl.append( TweenLite.to(image2_mc, 1, {_x:0, _y:0, ease:Quint.easeIn}),-1); Note how the 'delay' values are outside the tween. This value essentially tells the timeline how many seconds after the previous tween to append itself. So if you leave it blank, the tween will happen directly after the previous tween has finished. One thing that might make things easier in the future should you wish to update the timings is that the logos_mc has a delay of -5, which actually starts it off before the second lafrom_mc, so might be worth switching those around. I'm not sure how much you have read or coded with Greensock and TimelineLite/Max so apologies if I'm covering old ground for you, however Jack has provided some excellent Documentation on TimelineLite and Carl Schoof has recently created a fantastic 4 part series on the basics of TimelineLite, you should check it out. I hope that helps? X10
  7. Hi cbum7210, Glad you've managed to solve some of your issues. The code is almost correct: BAD tl.append(TweenMax.to(harleyR, 1, {y:281, scaleX = -1 }),1); GOOD tl.append(TweenMax.to(harleyR, 1, {y:281, scaleX: -1 }),1); All values in the tween are preceeded by a colon.
  8. X10

    smooth wiggle

    Also, have you ticked "Allow Smoothing" for the image options in the Library? I do concur with the frame rate comment by mrEmpty also. D.
  9. Hi dcarrick, Your code seems sound, so there must be an issue elsewhere, could you post a really simple FLA so we can take a look? X10
  10. X10

    easeback to x=0

    Hello again burn4ever, I just had a re-read over your post, and I think this is what you're after: TweenMax.to(mc, 1, {x:400, ease:Quad.easeOut} ); TweenMax.to(mc, 3, {x:0, ease:Quad.easeIn,delay:1} ); Let us know. X10
  11. X10

    easeback to x=0

    Hi burn4ever, Glad to see you're taking advantage of Carl's excellent tutorials. I'm not sure exactly what you're asking. Are you saying that you tween an mc from an x of 0 to somewhere on the stage with a large easeParam like in Carl's tutorial, but then you want to tween it back to 0 using a different speed? You can acheive this with 2 tweens: TweenMax.to(mc, 2, {x:400, ease:Back.easeOut, easeParams:[4] } ); TweenMax.to(mc, 4, {x:0, ease:Back.easeOut ,delay:2} ); The first tween uses a large ease parameter and tweens in 2 seconds, the second tween goes at a slower pace, 4 seconds, and uses the default ease value. Is this what you're asking? Perhaps a bit more detail is required if not.
  12. Hi mrEmpty, Yes Greensock's TweenMax has a method calledisTweening which you can use on your mc. If I've understood you correctly you can use it like this as a basic example: if (!TweenMax.isTweening(mc)) {TweenLite.to(mc,1,{x:"100"});} You could even put it inside the function you call from your EventListener. function move100(e:MouseEvent):void{ if (!TweenMax.isTweening(e.currentTarget)){ TweenLite.to(e.currentTarget,1,{x:"100"});} };
  13. Ah yes, typo on my part there!! I will proof read my responses better next time. Of course it should work if the var is defined outside the function - completely missed that, hence the typo I guess! Thanks Carl!
  14. Hi Ben, Hmm, that is odd, are you setting stage height & width dynamically in your Child SWF's? What happens if you try this in the Parent SWFLoader constructor (replace "MySWF.swf", "x" & "y" with your values.: swfs.append(new SWFLoader("MySWF.swf", {container:container_mc, width: x, height: y,scaleMode:"none"})); As to the sound playing, yes that has stumped me too, perhaps Jack will be able to give a better explanation. It might be easier if you had a simplified version of your problem attached as a zipped fla (cs4) to your next post so we could try it ourselves - it's difficult sometimes to visualise exactly how a piece of code is working. X10
  15. Hi Idans, I'm not entirely sure why that doesn't work, I'm sure Jack or Carl or someone a little more versed can explain, however try this code instead for your MOUSE_OUT function: function myOutReaction (e:MouseEvent):void{ TweenMax(e.currentTarget, 1, {tint:null}); }
  16. Hi Dave, It sounds like it would be much easier in the long run to convert the animation to TimelineLite/Max to achieve what you want. However, I do have a question as you say the animation is built with TweenMax, however later you mention resetting them back to the beggining of the frame - so is it a timeline based animation or purely TweenMax? If it's built entirely in TweenMax with delayed calls, then one way to do it is to put all your tweens into a function, then call that function with your button. You may also need to create a 'reset' function that would put all the tweens back to their original values first. I hope that helps, I don't have time at the moment to write some example code, but if you run into problems post back. Jack or Carl may be able to provide more insight though. X10
  17. Hi Ben, Thanks for pointing me in the right direction, that's great! Thanks also to Carl for posting another really useful example. Ben, I may be able to help with the issues: 1) Have you set a height and width on the content display? If so the default scaleMode is stretch, which might be the issue. If so you just need to set scaleMode:"none" in the SWFLoader Vars 2) I am wondering if this is to do with controlling the TimelineMax of the Child SWF's. What I noticed is that Carl's examples both have {paused:true} in the Child SWF TimelineMax constructor. If you don't set this, or use a repeat, then you have overlapping issues. I'm trying to figure out if there's a way to override these settings in the Child SWF's when loading them into the Parent, otherwise I'd have to go back to the Child SWF's code and edit them and re-publish - there seems like there should be a better way to do it. X10
  18. Thanks Jack! I didn't think it was a Greensock related issue, so I was being a bit cheeky, but very glad that you pointed me in the right direction, I searched for ages but clearly there's no standard terminology for this 'effect' X10
  19. Hi Carl, Thanks for popping back into an old thread! I tried a bunch of things and spent a couple of hours deleting elements and turning my Child SWF as small as possible and nothing worked. In the end I downloaded the latest Greensock code, re-published the child SWF and it worked. But I wonder why that is?! There is no difference in the AS3 or the stage instances of the published file, only the greensock code of the parent and child are now the same. Anyway, now that I can load a SWF using your second example, I am going to try to see how I can apply that to LoaderMax to load multiple TimelineMax based SWF's and play them in sequence on repeat. X10
  20. HI all, Did anyone get their loading to work with LoaderMax and multiple TimelineMax based SWF's? I'm trying to use Carl's very helpful "loadAndControlTimelineLite" example but it doesn't even like the 1 SWF that I'm loading, I get the following error: I suspect that the "Variable RolloverButton_29" is because there is a button_mc on the stage that is using the timeline to play an animation, so I removed it from the stage and that ReferenceError went away, but I don't know what the other 2 problems relate to. Anyone got their SWF's loaded and working? Any help appreciated. X10
  21. Okay, so I have 2 buttons on stage, left and right. Both have event listeners attached to enlarge and reduce with a ROLL_OVER and ROLL_OUT respectively. The Left button works fine, the Right button however keeps starting and stopping when I hover over it. I've never had this problem with buttons before :S I tried removing the Left button and just having the Right button on stage and the same error happened - what am I doing wrong? I've tried searching elsewhere on ROLL_OVER, MOUSE_OVER, setMouseChildren, scale and other things without any luck. I have attached a CS4 FLA and the SWF so you can see what's happening. Any advice welcomed! X10
  22. Hi Carl, Thanks for your response. I realised the onStart and onRepeat issue a little after I posted! It would be good to know the technicalities of what exactly is going on with the values of the tweens such that the balloon y tween does not happen on the repeat. I will try as you suggest and have the balloon being tweened in it's own timeline and see how I get on. It just seems like a long way round of doing such a simple thing. X10
  23. That's a really odd one! The only things that I can think of would be: 1) Does the greensock folder in com still have all it's files 2) Check Publish Settings->Flash->Settings are the correct paths in there (should only need "." though with that folder setup) If that's not it then hopefully someone more knowledeable will have some better advice. X10
  24. Hey guys, I'm hoping you can help, I've spent ages trying to figure out what I'm donig wrong but I just cant figure it out. I've attached the FLA so you can see what's going on but, to describe: I have a timeline that plays, in this timeline I want a balloon to go across the screen, while it goes across the screen is should be rotating backwards and forwards (I have acheived this through a TweenMax yoyo). When the balloon reaches the end of it's tween the rotation should stop and it should hover up and down (again done through TweenMax yoyo). After some other tweens happen the balloon should then shoot vertically off stage. Some more tweens happen and then the timeline repeats. When the timeline repeats, I want that all to start again, however, there are 2 issues: 1) The initial rotation of the balloon I set up does not happen on repeat; 2) The vertical shooting up does not happen, although if I attach an onComplete to this tween this function works. I'm going a bit loopy trying to figure out what I'm doing wrong so any assistance is appreciated. X10
  25. Hi All, I know you can tween any numeric property with the Greensock platform, but can you tween the format of text field? For example if I wanted to tween some text from normal to bold, can that be done with TweenLite/Max? I had a look on the forums already and there doesn't seem to be an obvious answer. I'm sure there's a simple answer & solution, but I just can't get my hands on it at the moment! All help appreciated, thanks! X10
×
×
  • Create New...