I'm a beginner when it comes to Actionscript 3.0 for Adobe Flash CS6. I'm trying to make a basic, plain animated interactive logo for a web portfolio, and have encountered a problem while trying to fix rollOver issues with triangles in the logo. With the current coding I've learned on my own, I'm able to get the animations and reactions just fine with movie clips instead of buttons. However, the execution of this method causes the "hit-boxes" of whichever movie clip is front-most on stage to play its animation even if you're trying to mouse over a movie clip behind it.
Here is the web page in question:
http://inancarrow.wix.com/home
Notice how when you roll over the left corner or bottom corner of the yellow triangle, the blue "Games" animation or the green "Skills" animation fades in and plays instead of the yellow "Connect" animation.
I have attempted to remedy this small but annoying problem by attempting to turn the movie clips to buttons, allowing an accurate response when people mouse over the shapes. The result is that all the movie clips that have animation play uncontrollably and loop their animations. From the searching I've done, it has something to do with nested movie clips...
I've spent too much trying to figure out what is wrong and how to fix the problem by myself, which is why I'm asking for help, advice, or insight as to how to either fix the overlapping rollOver problem, or how to fix my movieClips playing uncontrollably.
Here is the code I've been using:
RedIFader.addEventListener(MouseEvent.ROLL_OVER, RedIOver);
RedIFader.addEventListener(MouseEvent.ROLL_OUT, RedIOut);
//RedIFader.addEventListener(MouseEvent.ROLL_OVER, RedIClick);
function RedIOver(event:MouseEvent):void{
BioFadeIn.gotoAndPlay("BioFadeInOver")
BlueAFader.gotoAndPlay("BlueAFaderOver")
GreenAFader.gotoAndPlay("GreenAFaderOver")
YellowNFader.gotoAndPlay("YellowNFaderOver")
}
function RedIOut(event:MouseEvent):void{
BioFadeIn.gotoAndPlay("BioFadeInOut")
BlueAFader.gotoAndPlay("BlueAFaderOut")
GreenAFader.gotoAndPlay("GreenAFaderOut")
YellowNFader.gotoAndPlay("YellowNFaderOut")
}
BlueAFader.addEventListener(MouseEvent.ROLL_OVER, BlueAOver);
BlueAFader.addEventListener(MouseEvent.ROLL_OUT, BlueAOut);
//BlueAFader.addEventListener(MouseEvent.ROLL_OVER, BlueAClick);
function BlueAOver(event:MouseEvent):void{
GamesFadeIn.gotoAndPlay("GamesFadeInOver")
RedIFader.gotoAndPlay("RedIFaderOver")
GreenAFader.gotoAndPlay("GreenAFaderOver")
YellowNFader.gotoAndPlay("YellowNFaderOver")
}
function BlueAOut(event:MouseEvent):void{
GamesFadeIn.gotoAndPlay("GamesFadeInOut")
RedIFader.gotoAndPlay("RedIFaderOut")
GreenAFader.gotoAndPlay("GreenAFaderOut")
YellowNFader.gotoAndPlay("YellowNFaderOut")
}
GreenAFader.addEventListener(MouseEvent.ROLL_OVER, GreenAOver);
GreenAFader.addEventListener(MouseEvent.ROLL_OUT, GreenAOut);
//GreenAFader.addEventListener(MouseEvent.ROLL_OVER, GreenAClick);
function GreenAOver(event:MouseEvent):void{
SkillsFadeIn.gotoAndPlay("SkillsFadeInOver")
RedIFader.gotoAndPlay("RedIFaderOver")
BlueAFader.gotoAndPlay("BlueAFaderOver")
YellowNFader.gotoAndPlay("YellowNFaderOver")
}
function GreenAOut(event:MouseEvent):void{
SkillsFadeIn.gotoAndPlay("SkillsFadeInOut")
RedIFader.gotoAndPlay("RedIFaderOut")
BlueAFader.gotoAndPlay("BlueAFaderOut")
YellowNFader.gotoAndPlay("YellowNFaderOut")
}
YellowNFader.addEventListener(MouseEvent.ROLL_OVER, YellowNOver);
YellowNFader.addEventListener(MouseEvent.ROLL_OUT, YellowNOut);
//YellowNFader.addEventListener(MouseEvent.ROLL_OVER, YellowNClick);
function YellowNOver(event:MouseEvent):void{
ConnectFadeIn.gotoAndPlay("ConnectFadeInOver")
RedIFader.gotoAndPlay("RedIFaderOver")
BlueAFader.gotoAndPlay("BlueAFaderOver")
GreenAFader.gotoAndPlay("GreenAFaderOver")
}
function YellowNOut(event:MouseEvent):void{
ConnectFadeIn.gotoAndPlay("ConnectFadeInOut")
RedIFader.gotoAndPlay("RedIFaderOut")
BlueAFader.gotoAndPlay("BlueAFaderOut")
GreenAFader.gotoAndPlay("GreenAFaderOut")
}
Thank you for your time and consideration.