hi mates, this is my first attempt to make a website and my first attempt to do anything in actionscript. the site is at the url given below.
http://antcpl.com/newsite/
my problem is that the dropdown menu on the “services” button appears behind the page content, how do i solve this issue?
as3 code is given below, not the tidiest of the script but its my first attempt.
var currentPage:MovieClip = IntroBtn_mc;
var PageIntro:IntroPage = new IntroPage();
var PageServicesBim:ServicesBimPage=new ServicesBimPage();
var PageProjects:ProjectsPage=new ProjectsPage();
var PagePartners:PartnersPage=new PartnersPage();
var PageContact:ContactPage=new ContactPage ();
IntroBtn_mc.targetMC = PageIntro;
ServicesBtn_mc.ServicesMenu_mc.BimBtn_mc.targetMC = PageServicesBim;
ProjectsBtn_mc.targetMC = PageProjects;
PartnersBtn_mc.targetMC = PagePartners;
ContactBtn_mc.targetMC = PageContact;
PageIntro.x=PageServicesBim.x=PageProjects.x=PagePartners.x=PageContact.x=350;
PageIntro.y=PageServicesBim.y=PageProjects.y=PagePartners.y=PageContact.y=428;
addChild(PageIntro);
IntroBtn_mc.buttonMode=true;
ServicesBtn_mc.buttonMode=true;
ProjectsBtn_mc.buttonMode=true;
ContactBtn_mc.buttonMode=true;
PartnersBtn_mc.buttonMode=true;
PageServicesBim.WhatWeDoBtn_mc.buttonMode=true;
PageServicesBim.WhatIsBimBtn_mc.buttonMode=true;
PageServicesBim.BimAdvBtn_mc.buttonMode=true;
IntroBtn_mc.addEventListener(MouseEvent.ROLL_OVER, AllBtnOvr);
ProjectsBtn_mc.addEventListener(MouseEvent.ROLL_OVER, AllBtnOvr);
PartnersBtn_mc.addEventListener(MouseEvent.ROLL_OVER, AllBtnOvr);
ContactBtn_mc.addEventListener(MouseEvent.ROLL_OVER, AllBtnOvr);
ServicesBtn_mc.addEventListener(MouseEvent.ROLL_OVER, ServBtnOvr);
ServicesBtn_mc.addEventListener(MouseEvent.ROLL_OUT, ServBtnOut);
IntroBtn_mc.addEventListener(MouseEvent.ROLL_OUT, AllBtnOut);
ProjectsBtn_mc.addEventListener(MouseEvent.ROLL_OUT, AllBtnOut);
PartnersBtn_mc.addEventListener(MouseEvent.ROLL_OUT, AllBtnOut);
ContactBtn_mc.addEventListener(MouseEvent.ROLL_OUT, AllBtnOut);
IntroBtn_mc.addEventListener(MouseEvent.CLICK, AllBtnClick);
ServicesBtn_mc.ServicesMenu_mc.BimBtn_mc.addEventListener(MouseEvent.CLICK, AllBtnClick);
ProjectsBtn_mc.addEventListener(MouseEvent.CLICK, AllBtnClick);
PartnersBtn_mc.addEventListener(MouseEvent.CLICK, AllBtnClick);
ContactBtn_mc.addEventListener(MouseEvent.CLICK, AllBtnClick);
function ServBtnOvr(e:MouseEvent):void
{
ServicesBtn_mc.gotoAndPlay("over");
}
function ServBtnOut(e:MouseEvent):void
{
ServicesBtn_mc.gotoAndPlay("out");
}
function AllBtnOvr(e:MouseEvent):void
{
e.currentTarget.gotoAndPlay("over");
}
function AllBtnOut(e:MouseEvent):void
{
e.currentTarget.gotoAndPlay("out");
}
function AllBtnClick(e:MouseEvent):void
{
removeChild(currentPage.targetMC);
currentPage = MovieClip(e.currentTarget);
addChild(currentPage.targetMC);
currentPage.targetMC.gotoAndPlay(1);
}
PageServicesBim.WhatWeDoBtn_mc.addEventListener(MouseEvent.ROLL_OVER, WeDoOvr);
PageServicesBim.WhatIsBimBtn_mc.addEventListener(MouseEvent.ROLL_OVER, WeDoOvr);
PageServicesBim.BimAdvBtn_mc.addEventListener(MouseEvent.ROLL_OVER, WeDoOvr);
PageServicesBim.WhatWeDoBtn_mc.addEventListener(MouseEvent.ROLL_OUT, WeDoOut);
PageServicesBim.WhatIsBimBtn_mc.addEventListener(MouseEvent.ROLL_OUT, WeDoOut);
PageServicesBim.BimAdvBtn_mc.addEventListener(MouseEvent.ROLL_OUT, WeDoOut);
PageServicesBim.WhatWeDoBtn_mc.addEventListener(MouseEvent.CLICK, WeDoClick);
PageServicesBim.WhatIsBimBtn_mc.addEventListener(MouseEvent.CLICK, WhatIsBimClick);
PageServicesBim.BimAdvBtn_mc.addEventListener(MouseEvent.CLICK, BimAdvClick);
function WeDoOvr(e:MouseEvent):void
{
e.currentTarget.gotoAndPlay("over");
}
function WeDoOut(e:MouseEvent):void
{
e.currentTarget.gotoAndPlay("out");
}
function WeDoClick(e:MouseEvent):void
{
PageServicesBim.gotoAndPlay("about");
}
function WhatIsBimClick(e:MouseEvent):void
{
PageServicesBim.gotoAndPlay("info");
}
function BimAdvClick(e:MouseEvent):void
{
PageServicesBim.gotoAndPlay("adv");
}