Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US :: FAQ
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE FLASH:HomeFlash ForumFlash TutorialsFlash Video TutorialsWeb Streaming ForumAdobe FlashPodcast

Buttons .. show/hide movieclips

COW Forums : Adobe Flash

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Share on Facebook
Respond to this post   •   Return to posts index   •   Read entire thread


Daniel TrotterButtons .. show/hide movieclips
by on Aug 12, 2011 at 4:05:50 pm

Hi guys,

New here and new to AS3 so wondering if any of you could assist with a little problem I'm facing.

Basically I have 3 buttons with 3 different movieclips, currently when I click a button it plays a particular movieclip.
The movieclip only dissappears if I click the same button again.
If I click one of the other buttons without clicking the first again it goes over the top of the other or under depending on which layer it is.
I've tried to make it so when I click one button the other movieclips are hidden but I've got to the point where I'm now cross-eyed and struggling to make sense of my code or logic :(

Any advice would be fantastic :)


AES_btn.addEventListener(MouseEvent.CLICK, aesButtonClick);
AMT_btn.addEventListener(MouseEvent.CLICK, amtButtonClick);
WBSS_btn.addEventListener(MouseEvent.CLICK, wbssButtonClick);

function aesButtonClick(event:MouseEvent):void{MovieClip(this.parent).AES_frame.visible=true;MovieClip(this.parent).play();MovieClip(this.parent).AMT_frame.visible=false;MovieClip(this.parent).WBSS_frame.visible=false;}
function amtButtonClick(event:MouseEvent):void{MovieClip(this.parent).AMT_frame.visible=true;MovieClip(this.parent).play();MovieClip(this.parent).AES_frame.visible=false;MovieClip(this.parent).WBSS_frame.visible=false;}
function wbssButtonClick(event:MouseEvent):void{MovieClip(this.parent).WBSS_frame.visible=true;MovieClip(this.parent).play();MovieClip(this.parent).AES_frame.visible=false;MovieClip(this.parent).AES_frame.visible=false;}


Posts IndexRead Thread
Reply   Like  
Share on Facebook


Current Message Thread:




LOGIN TO REPLY



FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2014 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]