Jump to content
Search Community

ctnc

Members
  • Posts

    5
  • Joined

  • Last visited

ctnc's Achievements

0

Reputation

  1. Apologizes, I never intended for you to go through the whole thing or fix the code, I just wanted you to play the file so you could see the three tweens and why I have them that way because explaining it in words is complicated. Nevermind, I'll do it without TweenLite, Thanks -c
  2. Awesome, Yes I have heard that about mouse_out and mouse_over, Thanks! Is there a time you should use one over the other or always just use Roll_Over/Out? Here is my file to give visual reference to the code I am having trouble with. Many, Many Thanks! C
  3. hello. Thank you for helping me, I am a bit lost Okay using multiple tweens is bad, but what if you want to control a movieclip several different ways? Roll_Over, Roll_Out, Click etc at different x:y locations. I have tried the timelineLite and I want to use labels to control a part of the MC but I can't seem to make it work. I am essentially trying to make this happen with my code: an invisible button exists, when the user rolls over it they get to see a sneak peak of what is to come and when they roll out it goes away but if they click on it the whole MC plays and stops. Something like (this http://www.dayswithmyfather.com/) the new code that does not work: var timeline:TimelineLite = new TimelineLite(); timeline.insert(TweenLite.to(middle_mc, .25, {x:-760, y:0})); slideFarm_btn.addEventListener(MouseEvent.ROLL_OVER, minSlide); slideFarm_btn.addEventListener(MouseEvent.ROLL_OUT, minSlideOut); timeline.addLabel("farmRoll",{x:-780, y:0}); function minSlide(event:MouseEvent):void { timeline.gotoAndPlay("farmRoll"); } function minSlideOut(event:MouseEvent):void { timeline.reverse(); } THANK YOU IN ADVANCE FOR ANY LIGHT YOU CAN SHED MY DIRECTION. -c
  4. Hello. I am trying to control 2 mc each containing 3 images to respond to postions on the stage when 4 different invisible btns are mouse_over, mouse_out and click. I want the tween to hold position till the second click on the same button. Can this be done? Any help will be greatly appreciated. Thanks in advance. -c. import com.greensock.*; import com.greensock.core.*; import flash.utils.*; import com.greensock.easing.*; //cursor //need to figure this out //Legend legend_mc.navigation_btn.addEventListener(MouseEvent.CLICK, clickL); function clickL(event:MouseEvent):void{ if(legend_mc.currentFrame <<2) { legend_mc.play(); } else{ legend_mc.gotoAndPlay(20); } } //Farm slideFarm.addEventListener(MouseEvent.MOUSE_OVER,onOverFarm) function onOverFarm(event:MouseEvent):void { TweenMax.to(middle_mc, .25, {x:-780, y:0}); } slideFarm.addEventListener(MouseEvent.MOUSE_OUT,onOutFarm) function onOutFarm(event:MouseEvent):void { TweenMax.to(middle_mc, .25, {x:-760, y:0}); var myTween:TweenMax = new TweenMax(middle_mc, .25, {x:-760, y:0}); } slideFarm.addEventListener(MouseEvent.CLICK,onClickFarm) function onClickFarm(event:MouseEvent):void { TweenMax.to(middle_mc, 1.25, {x:-1520, y:0}); middle_mc.slideBackFarm.addEventListener(MouseEvent.CLICK,onClickBackFarm) function onClickBackFarm(event:MouseEvent):void { TweenMax.to(middle_mc, 1.25, {x:-760, y:0}); }} //Coral slideCoral.addEventListener(MouseEvent.MOUSE_OVER,onOverCoral) function onOverCoral(event:MouseEvent):void { TweenMax.to(middle_mc, .25, {x:-740, y:0}); } slideCoral.addEventListener(MouseEvent.MOUSE_OUT,onOutFarm) function onOutCoral(event:MouseEvent):void { TweenMax.to(middle_mc, .25, {x:760, y:0}); TweenMax.to(middle_mc, .25, {x:-760, y:0}); var myTween:TweenMax = new TweenMax(middle_mc, .25, {x:-760, y:0}); } slideCoral.addEventListener(MouseEvent.CLICK,onClickCoral) function onClickCoral(event:MouseEvent):void { TweenMax.to(middle_mc, 1.25, {x:0, y:0}); } //Beach slideBeach.addEventListener(MouseEvent.MOUSE_OVER,onOverBeach) function onOverBeach(event:MouseEvent):void { TweenMax.to(middle_mc, .25, {x:-760, y:-20}); TweenMax.to(middleVert_mc, .25, {x:0, y:-490}); } slideBeach.addEventListener(MouseEvent.MOUSE_OUT,onOutBeach) function onOutBeach(event:MouseEvent):void { TweenMax.to(middle_mc, .25, {x:-760, y:0}); TweenMax.to(middleVert_mc, .25, {x:0, y:-460}); } slideBeach.addEventListener(MouseEvent.CLICK,onClickBeach) function onClickBeach(event:MouseEvent):void { TweenMax.to(middle_mc, 1.25, {x:-760, y:-460}); TweenMax.to(middleVert_mc, 1.25, {x:0, y:-920}); } //Estuary slideEstuary.addEventListener(MouseEvent.MOUSE_OVER,onOverEstuary) function onOverEstuary(event:MouseEvent):void { TweenMax.to(middle_mc, .25, {x:-760, y:20}); TweenMax.to(middleVert_mc, .25, {x:0, y:-440}); } slideEstuary.addEventListener(MouseEvent.MOUSE_OUT,onOutEstuary) function onOutEstuary(event:MouseEvent):void { TweenMax.to(middle_mc, .25, {x:-760, y:0}); TweenMax.to(middleVert_mc, .25, {x:0, y:-460}); } slideEstuary.addEventListener(MouseEvent.CLICK,onClickEstuary) function onClickEstuary(event:MouseEvent):void { TweenMax.to(middle_mc, 1.25, {x:-760, y: 460}); TweenMax.to(middleVert_mc, 1.25, {x:0, y: 0}); }
×
×
  • Create New...