all groups > flash actionscript > june 2004 >
You're in the

flash actionscript

group:

Flash drop down component


Flash drop down component mistainfa
6/27/2004 10:26:52 PM
flash actionscript: I have a drop-down menu component in a movie that has names in it. I want the
names when clicked
to spawn a pop-up box the the bio of persons name being selected. Can someone
put together
a very simple fla showing me how the actionscripting would look.

Here is the site I'm working on, roll you mouse over the navigation squares
and select "About Us"
thats where you will see component. Also how can I make the drop-down motion
smoother?

Thanx very much.

Infa.

email: rob@infadesign.com


Re: Flash drop down component Shinchi
6/28/2004 2:22:24 AM
Hi,
you can assign the "change" event of the drop down box to an eventlistener,
which will give the selectedItem.label from the drop down box to decide what
is being selected. As for the pop-up box, are you using attachMovie(or any
other command to create a new movieclip) or using Flash build in 'window' UI
component?
Re: Flash drop down component mistainfa
6/28/2004 3:51:38 AM
Re: Flash drop down component Shinchi
6/28/2004 5:13:19 AM
Hi,
The following will be the code to create a pop up when you select an item
from your combo box
In the following code, 'cb' is the instance name of your combo box.

function myfunc()
{
newWindow = mx.managers.PopUpManager.createPopUp(_root, mx.containers.Window,
true, {title:cb. selectedItem.label, contentPath:"mycontent"});
newWindow.setSize(300, 300);
}
cb.addEventListener("change", myfunc);
AddThis Social Bookmark Button