Jump to content
Search Community

vdubplate

Members
  • Posts

    49
  • Joined

  • Last visited

Everything posted by vdubplate

  1. I revisited this this morning and its still a no go. With either piece of this code there seems to be an ease out applied or at least thats what it looks like. The tween doesn't stay at a continuous velocity.
  2. You might be right. I might have to make a bigger hit state
  3. Nobody? I just need to get a seamless rotation on rollover
  4. Thansk for the quick response. That is almost the result im looking for. What the result of that is, is start stop start stop. How would I get the animation to continue spinning at steady rate?
  5. I have a question that should be easy to answer. I have a round wheel for example that I need to have rotate on repeat when the user mouses over. I checked the documentation and it says if you want something to tween on repeat that you add -1. For my example the code looks like this: [as] import com.greensock.*; import com.greensock.easing.*; import flash.events.Event; import flash.events.MouseEvent; b2.addEventListener(MouseEvent.ROLL_OVER, Expand); function Expand(e:MouseEvent):void { TweenMax.to(b2, -1, {rotation:360}); } [/as] THE PROBLEM: If you were to try my code nothing happens to the movieclip(b2). If you were to set it to 3 it will rotate. The hight you set the number the slower the rotation. THE QUESTION: How do i set the code up so that the rotation repeats at a specific speed and doesn't ease?
  6. This is an example of what I'm working with: import com.greensock.*; import com.greensock.easing.*; var open:Boolean = false; //just tracks whether or not it's open. button_state_btn.onRelease = function(){ if (open) { TweenMax.to(word_mark, 1, {_alpha:100, delay:2}); TweenMax.to(logo, 1, {_x:518, _alpha:100, delay: 2}); TweenMax.to(spots_container.spots3, 30, {_y:150, repeat:-1, ease:Linear.easeNone, _alpha:100}) TweenMax.to(spots_container.spots2, 30, {_y:150, repeat:-1, ease:Linear.easeNone, delay:9, _alpha:100}) TweenMax.to(spots_container.spots1, 28, {_y:150, repeat:-1, ease:Linear.easeNone, _alpha:100}) // Above tweens spots TweenMax.to(mask_mc, 1, {_y:0, _yscale:1501}); TweenMax.to(close_bar_btn, 1, {_y:0, delay: 1}); //trace("clicked"); open = false; } else { TweenMax.to(logo, 1, {_alpha:0, _x:563}); TweenMax.to(word_mark, 1, {_alpha:0}); TweenMax.to(mask_mc, 1, {_y:733, _yscale:0, delay: 1}); TweenMax.to(close_bar_btn, 1, {_y:-44, delay: 0}); //spots1._visible = false; spots2._visible = false; spots3._visible = false; TweenMax.to(spots1, 1, {_alpha:0}); TweenMax.to(spots2, 1, {_alpha:0}); TweenMax.to(spots3, 1, {_alpha:0}); //trace("clicked"); open = true; }
  7. the problem im having is I have a button tthat exposes an ad. If you click it it works great. If you click it half way through the animation it bugs out when parts of the animation "mask" have't finished
  8. is there something like this that works with TweenMax? myTween.onMotionFinished = function() { button.enabled = true;
  9. Hmm, I'm not sure if that is going to solve this problem because I need the button to be inactive for a period of time or even better would be to stop the button from interfering with the animation until it has stopped.
  10. Okay, sorry to blow up the forums but I have another problem I'm trying to work through. So I have my bar/ad and when I click a mask opens up and another tab on top of the flash file comes down. The problem I'm having is that when I double click on the tab for testing purposes parts of the tween are turned on and off while other parts with a delay appear once the rest of the animation as already moved back to its previous state. So my question is, is there an option that will kill those other animations on the users first click? Thanks for all your help
  11. I actually figured out how to solve this with the second option you gave me thanks so much.
  12. Ok, so I'm still having issues with this working. I have 2 questions with the second option you showed me. can i do something like this? So that i can add more than one tween to reverse? var openTween:TweenMax = new TweenMax (mask_mc, 1, {_y:0, _yscale:0, paused:true}); TweenMax.to(close_bar_btn, 1, {_y:0, delay: 1}); button_state_btn.onPress = function():Void { if (openTween.reversed) { openTween.play(); } else { openTween.reverse(); } } And here is my code and I can't get it to work. It looks like a lot but I'm only trying to get the mask that I labeled for you to retract. import com.greensock.*; import com.greensock.easing.*; var openTween:TweenMax = new TweenMax.to(mask_mc, 1, {_y:0, _yscale:1501, paused:true}); button_state_btn.onPress = function():Void { if (openTween.reversed) { openTween.play(); } else { openTween.reverse(); } } TweenMax.to(button_state_btn, 1, {_xscale:20, _x:405, _yscale:22, _y:708, delay:4}); TweenMax.to(bar_mc, 1, {_y:733, delay:4}); // This is the code to open and close the bar button_state_btn.onPress = function() { TweenMax.to(word_mark, 1, {_alpha:100, delay:2}); TweenMax.to(logo, 1, {_x:518, _alpha:100, delay: 2}); TweenMax.to(spots_container.spots3, 30, {_y:150, repeat:-1, ease:Linear.easeNone, _alpha:100}) TweenMax.to(spots_container.spots2, 30, {_y:150, repeat:-1, ease:Linear.easeNone, delay:9, _alpha:100}) TweenMax.to(spots_container.spots1, 28, {_y:150, repeat:-1, ease:Linear.easeNone, _alpha:100}) // Above tweens spots TweenMax.to(mask_mc, 1, {_y:0, _yscale:1501}); /////////////////////////////////MASK/////////////////////////////// TweenMax.to(close_bar_btn, 1, {_y:0, delay: 1}); //trace("clicked"); } close_bar_btn.onPress = function() { TweenMax.to(logo, 1, {_alpha:0, _x:563}); TweenMax.to(word_mark, 1, {_alpha:0}); TweenMax.to(mask_mc, 1, {_y:733, _yscale:0, delay: 1}); TweenMax.to(close_bar_btn, 1, {_y:-44, delay: 0}); //spots1._visible = false; spots2._visible = false; spots3._visible = false; TweenMax.to(spots1, 1, {_alpha:0}); TweenMax.to(spots2, 1, {_alpha:0}); TweenMax.to(spots3, 1, {_alpha:0}); //trace("clicked"); }
  13. I was wondering if someone could help me out. I have a button that opens an ad unit. I need the button to close the ad as well. So say this is my code: import com.greensock.*; import com.greensock.easing.*; button_btn.onPress = function(){ TweenMax.to(test_mc, 1, {_x:462}); } How would I be able to tween this back to say: TweenMax.to(test_mc, 1, {_x:10}); Thanks for the help. i know I've been blowing up the forums lately with questions.
  14. I'm working on a project in as2 Basically I have a bar on the stage that houses an ad if you click it the ad opens, if not in 4 seconds the ad goes away and there is a tab that also has a smaller ad that will expand the ad. My problem is even when the bar is clicked the ad opens and then the bar after 4 seconds goes away anyway. Is there a way to have that tween that happens in 4 seconds stop cancel if the bar is clicked so it won't retract? Here is my code: (it looks like a lot but its not that bad) // This will drop the bar after 4 seconds and shrink the button state to the second tab TweenMax.to(bar_mc, 1, {_y:733, delay:4}); TweenMax.to(button_state_btn, 1, {_y:733, delay: 4}); // This is the code to open and close the bar button_state_btn.onPress = function() { TweenMax.to(word_mark, 1, {_alpha:100, delay:2}); TweenMax.to(logo, 1, {_x:518, _alpha:100, delay: 2}); TweenMax.to(spots_container.spots3, 30, {_y:150, repeat:-1, ease:Linear.easeNone, _alpha:100}) TweenMax.to(spots_container.spots2, 30, {_y:150, repeat:-1, ease:Linear.easeNone, delay:9, _alpha:100}) TweenMax.to(spots_container.spots1, 28, {_y:150, repeat:-1, ease:Linear.easeNone, _alpha:100}) // Above tweens spots TweenMax.to(mask_mc, 1, {_y:0, _yscale:1501}); TweenMax.to(close_bar_btn, 1, {_y:0, delay: 1}); //trace("clicked"); }
  15. Ok, my bad. I did a search for loop on the page and I saw that someone posted loop:true in the comments so that was what I was looking for. Something short but sweet like yoyo:true
  16. So if i was going to use tween max how could I loop infinately? import com.greensock.*; TweenMax.to(mc, 14.75, {_x:156, _y:343, loop:true}); ? also is the a way so specify the level of the tween? im having some issues with other elements falling below my tweened objects. I know thats a noob question. I'm kind of learning as im going. Thanks for your help.
  17. I have a simple tween that I want to loop in AS2. Can someone give me a hand in figuring this out? This is what i have tried: import com.greensock.*; TweenLite.to(mc, 14.75, {_x:156, _y:343, loop:true}); import com.greensock.*; TweenLite.to(mc, 1, {_x:156, _y:343, repeat:true}); No luck! Thanks in advance
  18. I'm trying to pull in a movieclip in as3 and position it on the stage. I'm having a little trouble. This is what I have: var ld:Loader = new Loader() ld.load(new URLRequest("test.swf")) addChild(ld) test.swf.x = 100; test.swf.y = 100; the loading part works but im having no luck positioning the clip afterwards.
  19. Well at first I was thinking I had to animate the movie clip open but I think the mask would be best bet. Thanks for the help. I got it just needed to think it out more.
  20. I'm tasked at work with making a bar that when the button is clicked an animated movie clip will animate open to reveal fixed content buckets within the box. The box will animate from 0 to lets say 500 on the y axis to reveal items in a fixed position. My question is is this easy to do as far as animating the box open while keeping the items in a fixed place?
  21. Yea, AS3. No. I'm masking an mc but as the mask animates I was trying to get the mc to fade at the same time.
  22. Can someone help me out. I have a simple tween and I want to add an alpha tween over the coarse of the tween fro 100% to 0% over the coarse of a second. Here is what I have: TweenMax.to(mask_mc, 1, {x:512, y:0, scaleX:0, delay: 4}); I've tried the interactive demo but all I can achieve out of that is the mc moves then faces out real quick at the end. I want to start at 100 and end at 0. Thanks in advance
×
×
  • Create New...