Jump to content
Search Community

Evostar*

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Evostar*

  1. thankyou greensock. i will edit my post. i only have 1 question now.
  2. im finding im having a problem with the mouse click event its tweening when i roll over quickly and when i click. why is this? to be more specific when i roll over the button then roll off. then roll back on again (roll on for the 2nd time) it does the click function. even tho i no click.
  3. Hi. i have answered all of my questions but 1 on my own. but i have problem with my array event. my Button Text scales to 1.5 x and y on Mouse event Click. how do i reset the Scale X + Y to 1 after a different button is clicked? i have added my fla 49kb to help explain. here is all my code. and i have the 6 buttons on stage with instance names that are in the array. import com.greensock.*; import com.greensock.easing.*; import com.greensock.plugins.*; TweenPlugin.activate([blurFilterPlugin]); home.btnname.btntxt.text="Home"; aboutus.btnname.btntxt.text="About Us"; pricelist.btnname.btntxt.text="Pricelist"; products.btnname.btntxt.text="Products"; promotions.btnname.btntxt.text="Promotions"; contactus.btnname.btntxt.text="Contact Us"; var MenuArray = [home, aboutus, pricelist, products, promotions, contactus]; var BtnGroup:MovieClip; for (var i:Number = 0; i < MenuArray.length; i++) { BtnGroup = MenuArray[i]; TweenMax.from(BtnGroup, 1, {y:-80, delay:0.075* i, ease:Elastic.easeOut}); } container.scaleX=0; TweenMax.to(container, 1, {scaleX:1, delay:0.25, ease:Elastic.easeOut}); for each (var btn in MenuArray) { btn.buttonMode = true; btn.useHandCursor = true; btn.mouseChildren = false; bar.mouseEnabled = false; btn.addEventListener(MouseEvent.MOUSE_OVER, onBtnOver); btn.addEventListener(MouseEvent.CLICK, onBtnClick); } function onBtnOver (event:MouseEvent):void { trace(event.target.name + " = Roll Over!"); TweenMax.to(event.target.btnname, 0.2, {blurFilter:{blurY:30}}); TweenMax.to(event.target.btnname, 0.2, {blurFilter:{blurY:0}, delay:0.2}); TweenMax.to(bar, 1, {x:event.currentTarget.x, ease:Elastic.easeOut}); } function onBtnClick (event:MouseEvent):void { trace(event.target.name + " = Clicked!"); TweenMax.to(event.target.btnname, 0.1, {blurFilter:{blurX:30}}); TweenMax.to(event.target.btnname, 0.1, {blurFilter:{blurX:0}, delay:0.1}); TweenMax.to(event.target.btnname, 0.1, {scaleX:1.5, scaleY:1.5, delay:0.1}); TweenMax.to(container, 0.8, {scaleX:0, alpha:0, ease:Elastic.easeIn, onComplete:Load}); function Load():void{ container.gotoAndStop(event.target.name); TweenMax.to(container, 0.8, {scaleX:1, alpha:1, ease:Elastic.easeOut}); } } thankyou again for your time and advice. Evo.
×
×
  • Create New...