Avatar billede Trinh Nybegynder
13. oktober 2010 - 23:04

Flash CS3 - Drop Down Menu with AS 3.0 and Layer Controlling

Hello experts,
I load a SWF file (as a header) in my FLASH file with the following code, and it works :-)
var loader:Loader=new Loader();
var mcExternal:MovieClip;
this.addChild(loader);
loader.load(new URLRequest("header.swf"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,swfIn);
function swfIn(e:Event):void {
loader.x=60;
loader.y=100;
}

Now I have two questions.
Question 1:
I want to create a simple drop down menu. When I click on one button there should drop down three links. Is there a simple code to create such a drop down menu (maybe some code lines in action script 3.0).
Question 2:
I have tried a not so elegant drop down menu (by creating 3 buttons and put it in the second frame of the time line). But there I have already seen that the drop down menu is behind the SWF file wich I have loaded with the code above. But of course the drop down menu has to be in front of the SWF file.

Thank you very much!

(I kan ogsaa gerne svare paa dansk)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester



IT-JOB

Cognizant Technology Solutions Denmark ApS

Senior Test Manager

Politiets Efterretningstjeneste

Testere med flair for test management