Jump to content
Search Community

booglebop

Members
  • Posts

    38
  • Joined

  • Last visited

booglebop's Achievements

1

Reputation

  1. Extremely helpful. Yes, I"m new to AS3 and OOP. With the syntax, I feel like I'm learning english; just when I think I have it figured out, there's some kind of exception. Thanks to both of you!
  2. Is there a way to visualize a bezier curve? I know there is the plugin explorer but that doesn't really help when the dimensions of the fla being worked in are different. Right now, I'm basically putting in the destination values and through values but the curve often doesn't turn out the way I thought it would. Any helpful hints out there?
  3. Yup, I got it. Thank you. Can you point me in the right direction of simplifying this code? I'm not sure how to pass parameters to a tween of a tween. var segment01_TL:TimelineMax = new TimelineMax({paused:false}); var cycles:uint = 3; var spinDuration:Number = 1; var tag_TL1:TimelineMax = new TimelineMax(); var tag_TL2:TimelineMax = new TimelineMax(); var tag_TL3:TimelineMax = new TimelineMax(); var tag_TL4:TimelineMax = new TimelineMax(); var spinTweenTag1:TweenMax = TweenMax.from(tag1container.tag1, spinDuration * 0.5, {transformMatrix:{skewY:-180}, paused:true, repeat:cycles * 1 + 1, yoyo:true, ease:Linear.easeNone}); var spinTweenTag2:TweenMax = TweenMax.from(tag2container.tag2, spinDuration * 0.5, {transformMatrix:{skewY:-180}, paused:true, repeat:cycles * 1 + 1, yoyo:true, ease:Linear.easeNone}); var spinTweenTag3:TweenMax = TweenMax.from(tag3container.tag3, spinDuration * 0.5, {transformMatrix:{skewY:-180}, paused:true, repeat:cycles * 1 + 1, yoyo:true, ease:Linear.easeNone}); var spinTweenTag4:TweenMax = TweenMax.from(tag4container.tag4, spinDuration * 0.5, {transformMatrix:{skewY:-180}, paused:true, repeat:cycles * 1 + 1, yoyo:true, ease:Linear.easeNone}); tag_TL1.insert(TweenMax.to(spinTweenTag1, cycles * spinDuration, {totalTime:spinTweenTag1.totalDuration - spinDuration, ease:Back.easeOut})); tag_TL1.insert(TweenMax.from(tag1container, 1, {autoAlpha:0})); tag_TL2.insert(TweenMax.to(spinTweenTag2, cycles * spinDuration, {totalTime:spinTweenTag2.totalDuration - spinDuration, ease:Back.easeOut})); tag_TL1.insert(TweenMax.from(tag2container, 1, {autoAlpha:0})); tag_TL3.insert(TweenMax.to(spinTweenTag3, cycles * spinDuration, {totalTime:spinTweenTag3.totalDuration - spinDuration, ease:Back.easeOut})); tag_TL1.insert(TweenMax.from(tag3container, 1, {autoAlpha:0})); tag_TL4.insert(TweenMax.to(spinTweenTag4, cycles * spinDuration, {totalTime:spinTweenTag4.totalDuration - spinDuration, ease:Back.easeOut})); tag_TL1.insert(TweenMax.from(tag4container, 1, {autoAlpha:0})); segment01_TL.appendMultiple([tag_TL1,tag_TL2,tag_TL3,tag_TL4],0.15,-3.25); I've got a bunch more MCs I need to apply this basic "spin" animation to, but they have slightly different parameters etc... Please share you wisdom
  4. I've combed through the forums and tried to piece together what I can but I'm getting an error: "TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.greensock::TimelineLite/insert() at New_Car_Micrositer1_fla::introAnimation_1/frame1()" I'm lost. Here's the code: var main_TL:TimelineMax = new TimelineMax(); main_TL.insert(dollarSign_TL, -1); var dollarSign_TL:TimelineMax = new TimelineMax(); var cycles:uint = 3; var spinDuration:Number = 1; var spinTween:TweenMax = TweenMax.from(dollarSignContainer.dollarSign, spinDuration * 0.5, {transformMatrix:{skewY:-180}, paused:true, repeat:cycles * 3 + 1, yoyo:true, ease:Linear.easeNone}); dollarSign_TL.insert(TweenMax.to(spinTween, cycles * spinDuration, {totalTime:spinTween.totalDuration - spinDuration, ease:Back.easeOut})); dollarSign_TL.insert(TweenMax.from(dollarSignContainer, 1, {scaleX:0, scaleY:0, ease:Back.easeIn})); Also getting the same error when try something like this: main_TL.append(dollarSign_TL.reverse()); Any help is appreciated. Thanks!
  5. I'm not sure what I'm doing wrong. It seems like whenever I add "dollarSign" to the sprite "tweenContainer" then test movie, the stage is just blank. What am I missing? import com.greensock.*; import com.greensock.easing.*; import com.greensock.plugins.*; TweenPlugin.activate([TransformMatrixPlugin]); var tweenContainer = new Sprite(); tweenContainer.addChild(dollarSign); var researchIntroAnim:TimelineMax = new TimelineMax(); var cycles:uint = 3; var spinDuration:Number = 1; var spinTween:TweenMax = TweenMax.from(dollarSign, spinDuration * 0.5, {transformMatrix:{skewY:-180}, paused:true, repeat:cycles * 3 + 1, yoyo:true, ease:Linear.easeNone}); researchIntroAnim.insert(TweenMax.to(spinTween, cycles * spinDuration, {totalTime:spinTween.totalDuration - spinDuration, ease:Back.easeOut})); researchIntroAnim.insert(TweenMax.to(tweenContainer, 1, {scaleX:50, scaleY:50, ease:Back.easeOut}));
  6. I thought those were one in the same thing. I guess I'd like to know how to do both. I'm trying to learn ways to cut down on repetitive code.
  7. I would take a look at "autoAlpha." It will set the visibility at the end of the tween. Check out the documentation. Hope this helps.
  8. Thank you! You've been a lifesaver for me during this project I'm currently working on and in my early learning of AS and timelineMax/Lite. While we're on the subject, how could I pass MC_3 to myTimeline inside of myFunction? This way I would have myTimeline and myFunction created once and then be able to change the MC that I want to tween via another function. Hope that makes sense.
  9. I guess I'm confused on how to add something to a sprite
  10. Sounds like a good idea. In my limited knowledge of actionscript, my attempt is giving me an error: 1067: Implicit coercion of a value of type com.greensock:TimelineMax to an unrelated type flash.display:DisplayObject. Which I guess makes sense if "researchIntroAnim is not a display object. But then what do I add to the container sprite? var tweenContainer:Sprite = new Sprite(); var researchIntroAnim:TimelineMax = new TimelineMax(); var cycles:uint = 3; var spinDuration:Number = 1; var spinTween:TweenMax = TweenMax.from(dollarSign, spinDuration * 0.5, {transformMatrix:{skewY:-180}, paused:true, repeat:cycles * 3 + 1, yoyo:true, ease:Linear.easeNone}); researchIntroAnim.insert(TweenMax.to(spinTween, cycles * spinDuration, {totalTime:spinTween.totalDuration - spinDuration, ease:Back.easeOut})) tweenContainer.addChild(researchIntroAnim); TweenMax.from(tweenContainer, 1, {delay:0, scaleX:0, scaleY:0, ease:Back.easeOut});
  11. Thank you very much. You're example works, but it doesn't seem to be taking in my code. I've got to be close. Any ideas? import mx.utils.Delegate; import com.greensock.*; import com.greensock.easing.*; var myTimeline:TimelineMax = new TimelineMax({paused:true}); myTimeline.append(TweenMax.to(MC_1, 1, {_xscale:50, _yscale:50, ease:Expo.easeOut})); myTimeline.append(TweenMax.to(MC_2, 1, {_xscale:50, _yscale:50, ease:Expo.easeOut})); function myFunction() { myTimeline.play; } myButton.onRelease = Delegate.create(myTimeline, myFunction);
  12. Hi, I'm not sure why this doesn't work. If I put the entire "myTimeline" inside "myFunction" it seems to work, but that's not what I need. It's probably something simple I'm missing. FYI this is AS2. Also my code is a bit more complex, this is just to illustrate the concept I'm struggling with. Thanks! var myTimeline:TimelineMax = new TimelineMax({paused:true}); myTimeline.append(TweenMax.to(MC_1, 1, {_xscale:100, _yscale:100, ease:Expo.easeOut})); myTimeline.append(TweenMax.to(MC_2, 1, {_xscale:100, _yscale:100, ease:Expo.easeOut})); function myFunction() { myTimeline.play; } myButton.onRelease = myFunction;
  13. Ahh...found it. I actually watched that video before and must have forgotten. I understand how to offset with the append()/insert() methods but l want to offset an entire sequence of tweens. For example: timeline.appendMultiple(TweenMax.allFrom([MC_1, MC_2, MC_3], 0.25, {scaleX:0, scaleY:0, ease:Back.easeOut},0),1); Should scale MC_1,MC_2 and MC_3 to 100% respectively, (0.25 sec per tween) and staggering by 1 sec. Is that "0" (the second to last param) the offset param? Would that offset each one or would it offset the entire sequence? What are the advantages of using "offset" as opposed to "delay"? Yes, I usually just put the 0 delay as a placeholder as I am almost always changing it to try and overlap/align things in a certain way. I have really long TimeLines (30 objects) or so and many lines of code, including appendMultiple and insertMultiple, but still end up needing the delays. I know there should be an easier way but haven't found it yet. Perhaps, I need to explore the offset param more. Any organizational tips for looooooong TimelineMax/Lites?
×
×
  • Create New...