Jump to content
Search Community

chefkeifer

Members
  • Posts

    129
  • Joined

  • Last visited

Everything posted by chefkeifer

  1. I have a mc (which acts as a button) and in that mc i have an image that i have a tween attached to when you roll over said mc function over(event:MouseEvent){//MAIN BUTTONS TweenMax.to(event.currentTarget.image, 1, {colorMatrixFilter:{colorize:0xffffcc,amount:1, brightness:2}, ease:Sine.easeOut}); } but when i click where that image is my code does not work properly as far as the rentSpace.addEventListener(MouseEvent.CLICK, clicked); but if i click anywhere around that image but still on the mc..the clicked code and functions all work fine. i guess my question is..how can i make that image do what i need to do but not make it not clickable.... the function below is what tells me what swf to bring to the stage..but when you click and the mouse just happens to be over that image which is in the mc...it traces "image" function clicked(event:MouseEvent):void{ transLoad(event.target.name + ".swf"); trace(event.target.name); }
  2. turns out i have been carrying over the same com folder and its been an old one..i republished and all is well...you talk about frustrating... thanks
  3. I keep getting this error again...something is just going screwy..what could be the issue... VerifyError: Error #1053: Illegal override of reversed in com.greensock.TweenMax. ReferenceError: Error #1065: Variable photoGallery is not defined. ReferenceError: Error #1065: Variable button_2 is not defined. i have the updated version for a club member...i am confused...
  4. I am using a colorMatrix on an rollover and rollout ...how do i get it to go back to the original image... function over(event:MouseEvent){//MAIN BUTTONS var over1:TimelineMax = new TimelineMax(); over1.append(TweenMax.to(event.currentTarget.box,.5, {scaleY:1.10, ease:Back.easeInOut})); over1.insert(TweenMax.to(event.currentTarget.image, .25, {colorMatrixFilter:{colorize:0xffffcc, amount:1, brightness:2}, ease:Sine.easeOut})); } //------------------------------------------------ //BUTTON OUT FUNCTION function out(event:MouseEvent){//MAIN BUTTONS var out1:TimelineMax = new TimelineMax(); out1.append(TweenMax.to(event.currentTarget.box,.5, {scaleY:1, ease:Back.easeInOut})); out1.insert(TweenMax.to(event.currentTarget.image, .5, {colorMatrixFilter:{colorize:0xffffcc, amount:0, brightness:0}, ease:Sine.easeOut})); } is there a remove like there is for the glowFilter?
  5. i keep playing with this thing and its not doing what i want...how do i get each button to scale 1.1, and then move down the y axis and stagger when clicked... var buttonsDown:TimelineMax = new TimelineMax({paused:true}); buttonsDown.insertMultiple(TweenMax.allTo([buttons.gibsonMill, buttons.merchandise, buttons.rentSpace, buttons.contact, buttons.about], .5, {scaleY:1.1, y:525}, .3)); trying to simulate this..is seems so smooth but i again seem to be over my head.. http://www.templatemonster.com/flash-templates/26252.html
  6. that was the trick..funny i thought i had the right one...hard to keep up when your doing so many sites... got that to work but for some reason i am cannot get the appendMultiple to work ...the all come down at the same time. what am i doing wrong var buttonsDown:TimelineMax = new TimelineMax({paused:true}); buttonsDown.insert(TweenMax.to(buttons.gibsonMill, .5, {scaleY:1.10, ease:Elastic.easeOut})); buttonsDown.insert(TweenMax.to(buttons.merchandise, .5, {scaleY:1.10, ease:Elastic.easeOut}),-.5); buttonsDown.insert(TweenMax.to(buttons.rentSpace, .5, {scaleY:1.10, ease:Elastic.easeOut}), -.6); buttonsDown.insert(TweenMax.to(buttons.contact, .5, {scaleY:1.10, ease:Elastic.easeOut}), -.7); buttonsDown.insert(TweenMax.to(buttons.about, .5, {scaleY:1.10, ease:Elastic.easeOut}),-.8); buttonsDown.appendMultiple(TweenMax.allTo([buttons.gibsonMill, buttons.merchandise, buttons.rentSpace, buttons.contact, buttons.about], 2, {y:525, ease:Sine.easeIn, align:TweenAlign.START,stagger:1.3}));
  7. chefkeifer

    delay

    I am trying to get the next tween to start -.5 into the tween before..just like the one you did in the video i keep getting this error 1137: Incorrect number of arguments. Expected no more than 1. here is my code var buttonsDown:TimelineMax = new TimelineMax({paused:true}); buttonsDown.append(TweenMax.to(buttons.gibsonMill, 1, {height:"25"})); buttonsDown.append(TweenMax.to(buttons.merchandise,1, {height:"25"}),-0.5); buttonsDown.append(TweenMax.to(buttons.rentSpace, 1, {height:"25"}), -.5); buttonsDown.append(TweenMax.to(buttons.contact, 1, {height:"25"}), -.25); buttonsDown.append(TweenMax.to(buttons.about, 1, {height:"25"}),-.35); buttonsDown.append(TweenMax.to(buttons, 1, {y:"525"}));
  8. is this an instance that i would use the overwrite:1. I am having issue when a user moves their mouse over the button it gets stuck in the over state. this is a drop down menu when.. function aboutOver(event:MouseEvent){//MAIN BUTTONS var aboutOver:TimelineMax = new TimelineMax(); aboutOver.insert(TweenMax.to(event.currentTarget, .5, {glowFilter:{color:0xc8db00, alpha:1,blurX:15, blurY:15, inner:true}})); aboutOver.insert(TweenMax.to(about_dd, .5, {alpha:1, visible:true})); setChildIndex(about_dd,numChildren - 1); } function aboutOut(event:MouseEvent){//MAIN BUTTONS TweenMax.to(event.currentTarget, .5, {glowFilter:{color:0xc8db00, alpha:0, blurX:0, blurY:0}}); } function dropOut(event:MouseEvent){ TweenMax.to(about_dd, .5, {alpha:0, visible:false}); }
  9. i figured it out...just move the image off the registration point inside the movieclip.. that brings me to another question...for some reason though when the handle moves up it seems to dip down before rising..what could be the cause of that
  10. did the trace and transformAroundPoint does not seem to be what i am looking for. here is my project..the handle is supposed to be rotating on that point. but i cant get it to turn on that point... www.keifersdesign.com and here is the code //*****====================================================***** var contentLoader:Loader = new Loader(); contentLoader.contentLoaderInfo.addEventListener("progress", looping); contentLoader.contentLoaderInfo.addEventListener("complete", fadeIn); //*****====================================================***** var swf:MovieClip; var destX:Number = 14; var destY:Number = 100; //*****====================================================***** var defaultSWF:URLRequest = new URLRequest("home.swf"); //*****====================================================***** contentLoader.load(defaultSWF); addChild(contentLoader); TweenMax.to(door_left, 1, {x:"-525"}); TweenMax.allTo([latch,door_right], 1, {x:"525"}); TweenMax.to(contentLoader, 0, {alpha:0}); TweenMax.to(contentLoader, 0, {x:destX, y:destY}); TweenMax.to(contentLoader, 1, {alpha:1}); //*****====================================================***** function looping(e:ProgressEvent):void { var perc:Number = Math.round(e.bytesLoaded / e.bytesTotal); TweenMax.to(door_left.handle, 1, {rotationZ:perc * 100}); } //*****====================================================***** function clicked(event:MouseEvent):void{ transLoad(event.target.name + ".swf"); } //*****====================================================***** function transLoad(url:String):void{ if(contentLoader.content){ setChildIndex(door_right,numChildren - 1); setChildIndex(door_left,numChildren - 1); setChildIndex(latch,numChildren - 1); var closeThis:TimelineMax = new TimelineMax(); closeThis.insert(TweenMax.to(door_left, 1, {x:"525"})); closeThis.insertMultiple(TweenMax.allTo([latch,door_right], 1, {x:"-525"})); closeThis.append(TweenMax.to(door_left.handle, 1, {rotationZ:0, ease:Sine.easeIn})); closeThis.insert(TweenMax.to(contentLoader, 1, {alpha:0,onComplete:transIn, onCompleteParams: [url], delay:3})); } else { transIn(url); }} //*****====================================================***** function transIn(url:String):void{ addChild(contentLoader); var doorEnter:TimelineMax = new TimelineMax({delay:1}); doorEnter.insert(TweenMax.to(door_left, 1, {x:"-525"})); doorEnter.insertMultiple(TweenMax.allTo([latch,door_right], 1, {x:"525"})); setChildIndex(door_right,numChildren - 1); setChildIndex(door_left,numChildren - 1); setChildIndex(latch,numChildren - 1); contentLoader.load(new URLRequest(url)); } //*****====================================================***** function fadeIn(event:Event):void{ setChildIndex(door_right,numChildren - 1); setChildIndex(door_left,numChildren - 1); setChildIndex(latch,numChildren - 1); var contentIn:TimelineMax = new TimelineMax(); contentIn.append(TweenMax.to(door_left.handle, 1, {rotationZ:-80})) contentIn.append(TweenMax.to(contentLoader, 0, {alpha:0})); contentIn.append(TweenMax.to(contentLoader, 0, {x:destX, y:destY})); contentIn.append(TweenMax.to(contentLoader, 1, {alpha:1})); } //*****====================================================***** door_left.handle.addEventListener(MouseEvent.CLICK, traced); function traced(event:MouseEvent):void{ trace(mouseX, mouseY); }
  11. I am trying to tween something that turns like a clock hand would do(quarter rotation and then back to the original spot, not wanting to do a full rotation ) the rotation registration point is not exactly on the edge but slightly in where the screw would be on a clock. when i use the rotationZ and have the registration in the middle left....the MC does not move the quarter way on the point i want, but it does return to the same position when it goes back...I was going to use the transformAroundPoint but how do you find the right coordinates to use in your MC..using the demo doesnt give the right coordinates..
  12. i have tried this but it does it all at the same time.. var over1:TimelineMax = new TimelineMax({paused:true}); over1.insertMultiple(TweenMax.allTo([welcome,dragStrip, motocross, rvCamping,tentCamping, mudOval, oval_dirtTrack, zipLine, topWorld, bathHouse, ticketBooth, pavilion, jrMotocross, washArea, mudBog], 1, {dropShadowFilter:{color:0x000000, alpha:1, blurX:5, blurY:5, angle:45, distance:10}})); over1.insertMultiple(TweenMax.allTo([welcome,dragStrip, motocross, rvCamping,tentCamping, mudOval, oval_dirtTrack, zipLine, topWorld, bathHouse, ticketBooth, pavilion, jrMotocross, washArea, mudBog], 1, {x:"2.5",y:"-5", z:25})); over1.insertMultiple(TweenMax.allTo([welcome,dragStrip, motocross, rvCamping,tentCamping, mudOval, oval_dirtTrack, zipLine, topWorld, bathHouse, ticketBooth, pavilion, jrMotocross, washArea, mudBog], 1, {glowFilter:{color:0xc8db00, alpha:1, blurX:5, blurY:5}})); function over(e:MouseEvent):void { over1.play(); } function out(e:MouseEvent):void { over1.reverse(); }
  13. I am really new to this..i am not familiar with subclass...I just want to make sure that when I use the x:"2.5", y:-5 it does not studder and it goes back to its original position. Jack recommended using the play and reverse which i like but not sure how to implement that with mutliple buttons for one over and out functions
  14. the reason i am was using event.currentTarget was because i have multiple buttons doing the same thing and trying to use the code you recommended. How would i use that same tween for multiple buttons. and be able to play and reverse. Happy Thanksgiving by the way.
  15. ok i have tried this but it keeps telling me this 1120: Access of undefined property event. how do i fix this?
  16. i am writing a timeline would i write it like this? var over1:TimelineMax = new TimelineMax(paused:true); over1.insert(TweenMax.to(event.currentTarget, 1, {dropShadowFilter:{color:0x000000, alpha:1, blurX:5, blurY:5, angle:45, distance:10}})); over1.insert(TweenMax.to(event.currentTarget, 1, {x:"2.5",y:"-5", z:25})); over1.insert(TweenMax.to(event.currentTarget, 1, {glowFilter:{color:0xc8db00, alpha:1, blurX:5, blurY:5}})); //*****====================================================***** // BUTTON OVER FUNCTION function over(event:MouseEvent){//MAIN BUTTONS over1.play(); } //------------------------------------------------ //BUTTON OUT FUNCTION function out(event:MouseEvent){//MAIN BUTTONS over1.reverse(); } //*****====================================================***** and of course i have my event listeners
  17. another thing i figured out is when using the this over state over1.insert(TweenMax.to(event.currentTarget, 1, {x:"2.5",y:"-5", z:25})); out state out1.insert(TweenMax.to(event.currentTarget, 1, {x:"-2.5", y:"5", z:0})); every time you go back over the button it never really goes back to its original position. If i went over the button 100 times it would eventually move off the screen. so i am trying to figure out a way for it to move just 5 pixels up and 5 pixels to the left and then it goes back to its original position every time you ROLL_OUT
  18. ok i totally forgot about doing this x:"5", y:"-5" but when i used that instead actually putting the actual coordinates it seems to be chopping. any reason for that also forget about the scale issue..i was still asleep when i wrote that..no need to do a variable in that case..
  19. I am trying to make my coding a little more simpler. I am currently trying to tween 15 different buttons.. i am trying to make this variable work at does how to i write what the current position of that button in code. I guess i should say I am trying to write something like this..is this how you would do it var xpos:Number = currentTarget.name.x + 5; var xpos:Number = currentTarget.na,e.y - 5; I am trying to make all of these objects to move up 5 and to the right 5 pixels. over1.insert(TweenMax.to(menu.btn_welcome, 1, {x:xpos, y:xpos,scaleX:scalex, scaleY:scaley})); also when i use the scaleX and just put in the code to scale up 1.5 it works fine but when i make variable and refer to it it says it too large to display the variable i am using is var scalex:Number = 1.5;
  20. as far as what i am trying to do. here is the link of what i am doing http:// http://www.carolinaadventureworld.net/homePage.swf when the user rolls over certain parts of the aerial map content will appear(which are movieclips exported for Actionscript) and when the user rolls the content is to fade away and remove from the stage. you will noticed if you go the link if you mouse over too fast the content does not go away. I am stumped here...I understand AS when i look at the code but as far writing it, well thats a different story. here is the code i have for the 15 buttons..its rather lengthy but maybe you could see something that i could change or simpler. I appreciate your patience import com.greensock.*; import com.greensock.plugins.*; import com.greensock.easing.*; //*****====================================================***** import com.google.analytics.AnalyticsTracker; import com.google.analytics.GATracker; //*****====================================================***** var tracker:AnalyticsTracker = new GATracker( this, "UA-11181582-1", "AS3", false ); //*****====================================================***** menu.btn_welcome.buttonMode = true; menu.btn_welcome.addEventListener(MouseEvent.ROLL_OVER, over); menu.btn_welcome.addEventListener(MouseEvent.ROLL_OUT, out); //----------------------------------------------- menu.btn_dragStrip.buttonMode = true; menu.btn_dragStrip.addEventListener(MouseEvent.ROLL_OVER, over); menu.btn_dragStrip.addEventListener(MouseEvent.ROLL_OUT, out); //----------------------------------------------- menu.btn_motocross.buttonMode = true; menu.btn_motocross.addEventListener(MouseEvent.ROLL_OVER, over); menu.btn_motocross.addEventListener(MouseEvent.ROLL_OUT, out); //----------------------------------------------- menu.btn_rvCamping.buttonMode = true; menu.btn_rvCamping.addEventListener(MouseEvent.ROLL_OVER, over); menu.btn_rvCamping.addEventListener(MouseEvent.ROLL_OUT, out); //----------------------------------------------- menu.btn_tentCamping.buttonMode = true; menu.btn_tentCamping.addEventListener(MouseEvent.ROLL_OVER, over); menu.btn_tentCamping.addEventListener(MouseEvent.ROLL_OUT, out); //----------------------------------------------- menu.btn_mudOval.buttonMode = true; menu.btn_mudOval.addEventListener(MouseEvent.ROLL_OVER, over); menu.btn_mudOval.addEventListener(MouseEvent.ROLL_OUT, out); //----------------------------------------------- menu.btn_oval_dirtTrack.buttonMode = true; menu.btn_oval_dirtTrack.addEventListener(MouseEvent.ROLL_OVER, over); menu.btn_oval_dirtTrack.addEventListener(MouseEvent.ROLL_OUT, out); //----------------------------------------------- menu.btn_zipLine.buttonMode = true; menu.btn_zipLine.addEventListener(MouseEvent.ROLL_OVER, over); menu.btn_zipLine.addEventListener(MouseEvent.ROLL_OUT, out); //----------------------------------------------- menu.btn_topWorld.buttonMode = true; menu.btn_topWorld.addEventListener(MouseEvent.ROLL_OVER, over); menu.btn_topWorld.addEventListener(MouseEvent.ROLL_OUT, out); //----------------------------------------------- menu.btn_bathHouse.buttonMode = true; menu.btn_bathHouse.addEventListener(MouseEvent.ROLL_OVER, over); menu.btn_bathHouse.addEventListener(MouseEvent.ROLL_OUT, out); //----------------------------------------------- menu.btn_ticketBooth.buttonMode = true; menu.btn_ticketBooth.addEventListener(MouseEvent.ROLL_OVER, over); menu.btn_ticketBooth.addEventListener(MouseEvent.ROLL_OUT, out); //----------------------------------------------- menu.btn_mudBog.buttonMode = true; menu.btn_mudBog.addEventListener(MouseEvent.ROLL_OVER, over); menu.btn_mudBog.addEventListener(MouseEvent.ROLL_OUT, out); //----------------------------------------------- menu.btn_pavilion.buttonMode = true; menu.btn_pavilion.addEventListener(MouseEvent.ROLL_OVER, over); menu.btn_pavilion.addEventListener(MouseEvent.ROLL_OUT, out); //----------------------------------------------- menu.btn_jrMotocross.buttonMode = true; menu.btn_jrMotocross.addEventListener(MouseEvent.ROLL_OVER, over); menu.btn_jrMotocross.addEventListener(MouseEvent.ROLL_OUT, out); //----------------------------------------------- menu.btn_washArea.buttonMode = true; menu.btn_washArea.addEventListener(MouseEvent.ROLL_OVER, over); menu.btn_washArea.addEventListener(MouseEvent.ROLL_OUT, out); //----------------------------------------------- //*****====================================================***** //*****====================================================***** var content1:welcome; var content2:dragStrip; var content3:motocross; var content4:rvCamping; var content5:tentCamping; var content6:mudOval; var content7:oval_dirtTrack; var content8:zipLine; var content9:topWorld; var content10:bathHouse; var content11:ticketBooth; var content12:mudBog; var content13:pavilion; var content14:jrMotocross; var content15:washArea; //*****====================================================***** function over(event:MouseEvent):void{ switch(event.currentTarget.name){ case"btn_welcome": content1 = new welcome(); addChild(content1); content1.alpha = 0; var over1:TimelineMax = new TimelineMax(); over1.insert(TweenMax.to(content1, .1, {scaleX:0, scaleY:0})); over1.append(TweenMax.to(content1, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break; case"btn_dragStrip": content2 = new dragStrip(); addChild(content2); content2.alpha = 0; var over2:TimelineMax = new TimelineMax(); over2.insert(TweenMax.to(content2, .1, {scaleX:0, scaleY:0})); over2.append(TweenMax.to(content2, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break; case"btn_motocross": content3 = new motocross(); addChild(content3); content3.alpha = 0; var over3:TimelineMax = new TimelineMax(); over3.insert(TweenMax.to(content3, .1, {scaleX:0, scaleY:0})); over3.append(TweenMax.to(content3, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break; case"btn_rvCamping": content4 = new rvCamping(); addChild(content4); content4.alpha = 0; var over4:TimelineMax = new TimelineMax(); over4.insert(TweenMax.to(content4, .1, {scaleX:0, scaleY:0})); over4.append(TweenMax.to(content4, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break; case"btn_tentCamping": content5 = new tentCamping(); addChild(content5); content5.alpha = 0; var over5:TimelineMax = new TimelineMax(); over5.insert(TweenMax.to(content5, .1, {scaleX:0, scaleY:0})); over5.append(TweenMax.to(content5, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break; case"btn_mudOval": content6 = new mudOval(); addChild(content6); content6.alpha = 0; var over6:TimelineMax = new TimelineMax(); over6.insert(TweenMax.to(content6, .1, {scaleX:0, scaleY:0})); over6.append(TweenMax.to(content6, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break; case"btn_oval_dirtTrack": content7 = new oval_dirtTrack(); addChild(content7); content7.alpha = 0; var over7:TimelineMax = new TimelineMax(); over7.insert(TweenMax.to(content7, .1, {scaleX:0, scaleY:0})); over7.append(TweenMax.to(content7, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break; case"btn_zipLine": content8 = new zipLine(); addChild(content8); content8.alpha = 0; var over8:TimelineMax = new TimelineMax(); over8.insert(TweenMax.to(content8, .1, {scaleX:0, scaleY:0})); over8.append(TweenMax.to(content8, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break; case"btn_topWorld": content9 = new topWorld(); addChild(content9); content9.alpha = 0; var over9:TimelineMax = new TimelineMax(); over9.insert(TweenMax.to(content9, .1, {scaleX:0, scaleY:0})); over9.append(TweenMax.to(content9, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break; case"btn_bathHouse": content10 = new bathHouse(); addChild(content10); content10.alpha = 0; var over10:TimelineMax = new TimelineMax(); over10.insert(TweenMax.to(content10, .1, {scaleX:0, scaleY:0})); over10.append(TweenMax.to(content10, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break; case"btn_ticketBooth": content11 = new ticketBooth(); addChild(content11); content11.alpha = 0; var over11:TimelineMax = new TimelineMax(); over11.insert(TweenMax.to(content11, .1, {scaleX:0, scaleY:0})); over11.append(TweenMax.to(content11, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break; case"btn_mudBog": content12 = new mudBog(); addChild(content12); content12.alpha = 0; var over12:TimelineMax = new TimelineMax(); over12.insert(TweenMax.to(content12, .1, {scaleX:0, scaleY:0})); over12.append(TweenMax.to(content12, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break; case"btn_pavilion": content13 = new pavilion(); addChild(content13); content13.alpha = 0; var over13:TimelineMax = new TimelineMax(); over13.insert(TweenMax.to(content13, .1, {scaleX:0, scaleY:0})); over13.append(TweenMax.to(content13, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break; case"btn_jrMotocross": content14 = new jrMotocross(); addChild(content14); content14.alpha = 0; var over14:TimelineMax = new TimelineMax(); over14.insert(TweenMax.to(content14, .1, {scaleX:0, scaleY:0})); over14.append(TweenMax.to(content14, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break; case"btn_washArea": content15 = new washArea(); addChild(content15); content15.alpha = 0; var over15:TimelineMax = new TimelineMax(); over15.insert(TweenMax.to(content15, .1, {scaleX:0, scaleY:0})); over15.append(TweenMax.to(content15, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break; } } //*****====================================================***** function onFinish(clip:DisplayObject):void { clip.parent.removeChild(clip); } //*****====================================================***** function out(event:MouseEvent):void{ switch(event.currentTarget.name){ case"btn_welcome": TweenMax.to(content1, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[welcome]}); break; case"btn_dragStrip": TweenMax.to(content2, 1, {alpha:0, onComplete:onFinish,onCompleteParams:[dragStrip]}); break; case"btn_motocross": TweenMax.to(content3, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[motocross]}); break; case"btn_rvCamping": TweenMax.to(content4, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[rvCamping]}); break; case"btn_tentCamping": TweenMax.to(content5, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[tentCamping]}); break; case"btn_mudOval": TweenMax.to(content6, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[mudOval]}); break; case"btn_oval_dirtTrack": TweenMax.to(content7, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[oval_dirtTrack]}); break; case"btn_zipLine": TweenMax.to(content8, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[zipLine]}); break; case"btn_topWorld": TweenMax.to(content9, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[topWorld]}); break; case"btn_bathHouse": TweenMax.to(content10, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[bathHouse]}); break; case"btn_ticketBooth": TweenMax.to(content11, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[ticketBooth]}); break; case"btn_mudBog": TweenMax.to(content12, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[mudBog]}); break; case"btn_pavilion": TweenMax.to(content13, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[pavilion]}); break; case"btn_jrMotocross": TweenMax.to(content14, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[jrMotocross]}); break; case"btn_washArea": TweenMax.to(content15, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[washArea]}); break; } }
  21. so do I need to just do another variable like this var welcome:MovieClip; and do that for movieclip i addChild to the stage?
  22. They are movieclips coming from the library. var content1:welcome; var content2:dragStrip; //------------------------------------------------------- function over(event:MouseEvent):void{ switch(event.currentTarget.name){ case"btn_welcome": content1 = new welcome(); addChild(content1); content1.alpha = 0; var over1:TimelineMax = new TimelineMax(); over1.insert(TweenMax.to(content1, .1, {scaleX:0, scaleY:0})); over1.append(TweenMax.to(content1, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break; case"btn_dragStrip": content2 = new dragStrip(); addChild(content2); content2.alpha = 0; var over2:TimelineMax = new TimelineMax(); over2.insert(TweenMax.to(content2, .1, {scaleX:0, scaleY:0})); over2.append(TweenMax.to(content2, .5, {scaleX:1, scaleY:1, alpha:1})); setChildIndex(menu,numChildren - 1); break;
  23. I am getting this error now. TypeError: Error #1034: Type Coercion failed: cannot convert oval_dirtTrack$ to flash.display.DisplayObject. i change all the code to reflect that one function when removeChild. what am i doing wrong... function onFinish(clip:DisplayObject):void { clip.parent.removeChild(clip); } //*****====================================================***** function out(event:MouseEvent):void{ switch(event.currentTarget.name){ case"btn_welcome": TweenMax.to(content1, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[welcome]}); break; case"btn_dragStrip": TweenMax.to(content2, 1, {alpha:0, onComplete:onFinish,onCompleteParams:[dragStrip]}); break; case"btn_motocross": TweenMax.to(content3, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[motocross]}); break; case"btn_rvCamping": TweenMax.to(content4, .5, {alpha:0, onComplete:onFinish,onCompleteParams:[rvCamping]}); break;
  24. so something like this function onFinish(clip:DisplayObject):void { clip.parent.removeChild(clip); } //*****====================================================***** function out(event:MouseEvent):void{ switch(event.currentTarget.name){ case"btn_welcome": TweenMax.to(content1, 1, {alpha:0, onComplete:onFinish,onCompleteParams:[welcome]}); break; and make sure all the case break statements reflect the same parameter...
×
×
  • Create New...