Creating A Combo Box In Flash MX - Flash Tutorials
 
  Buy Ebooks, Video Games, DVDs, Electronics and more !
Home | Help Forums | Web Design Tutorials | Free Swishmax Downloads Make Money Online Blog . Free Image and Photo Sharing and Hosting

 

 

Company

Home

Nework Details

Tutorials

SWiSH 2

SWiSHMax

Flash MX

PHP & MySQL

HTML / JScript

Adobe Photoshop

Corel Draw

Gimp

Miscellaneous

Downloads

Templates

Plugins

Fonts

Wallpapers

Free Images

Scripts and Codes

Products

E-Books

SWiSH BB

SWiSH Templates

SWiSH-DB Newsletter
Subscribe to our newsletter : GO
  Partners / Affiliates

   Free image hosting
   Web Design Pakistan
   Swish Templates
   SWiSH Climax
   Talkfreelance Community
   Template Desire
   Lite boards
   Script Sector
   GimpTalk
   13dots
   Idea Designs
   PHP Cafe
   Sposatoettore
   Free swishmax templates
   Swishzone

Manage your site with Flax Article Content Management System
Creating A Combo Box In Flash MX
Category : Flash | Level : Beginner | Language : English
Ask Question | Read Comments | Post tutorial | Previous | Next

Web www.swish-db.com

Step 1: Creating A Combo Box In Flash MX....

-- First create a layer called Combo Box --

a) One of the coolest features of Flash MX is the new pre made components. From the components menu drag the 'combo box' into your main movie stage. Resize it to fit the space you're using...

b) Now in the properties box, we will name the component so we can refer to it later with action script. In this example I am naming it 'db_links'.

[img]http://members.cox.net/dbillings/flashtut1/tut1.jpg[/img]

c) Now add the labels to the. In the properties box, double click the 'labels' field and you will bring up the values box. Now from the values box click on the + symbol to create as many links as you need, not counting the value 0 - It will be the default text value. In this case we will click the + sign 3 times, adding the values 0-4. -- Now click on the values and enter the link text as follows

0 - DB Links
1 - Tutorials
2 - Downloads
3 - EDB System

Now click [ok]

d) Now we need to add our data values. In the properties box, double click the 'Data' field. to bring up the values box. Again, click the + symbol to add the same amount of values you added before. 0-4. On value 0 there will be no link because it is the default value, so just delete the text and leave it blank. Now your data values should be set up as so...

0 -
1 - http://www.swish-db.com/phpBB2/viewforum.php?f=2
2 - http://www.swish-db.com/Board/files.php
3 - http://www.swish-db.com/phpBB2/viewtopic.php?t=2638

Now click [ok]
___________________________________________________________________________________________

Step 2: Calling Values From The Combo Box...

a) Now we get to do some action script. in the properties box notice the field 'Change Handler' This is where we need to name the function that our combo box will call. In our example we will call this DB_Function. We still haven't created our function, but as long as we name it DB_Function we will be ok.

b) Right click on the first frame in the timeline on the 'Combo Box' layer, and open the actions panel from the menu. Make sure that your actions panel is working in Normal Mode by clicking the options button on the far top right of the actions panel and selecting Normal Mode from the list.

[img]http://members.cox.net/dbillings/flashtut1/tut2.jpg[/img]

c) Now we need to get out function script. - Click on 'actions' from the actions panel menu - then click on 'user defined functions' from the sub menu. Now double click the 'function' text to apply the action.

d) Now name the function in the Name text field - remember our combo box is going to call the function DB_Function.

e) Now click on the 'Browser/Network' tab from the actions panel window. Then click on the action 'getURL' Since we will be using a combo box, and not an actual URL - ignore the url field and check the box marked 'expression' at the end of the url field. Your script will now look like this.

function DB_Function ( ) {
getURL (<not set yet>) ;
}


___________________________________________________________________________________________

f) Now click 'Flash UI Components' from the actions panel menu, click 'FComboBox' from the sub menu / then 'Method' / and lastly double click 'getSelectedItem' to apply the action. Now in the URL field you'll notice it says -
.getSelectedItem()
Click in the URL box just before the dot and add our combo box name. Now you have this -
db_links.getSelectedItem()!! Now all that is left is to tell the script what value we want to call. We are wanting the addresses from the 'Data' values. So after the script type '.data' so that now your script looks like this.
db_links.getSelectedItem().data

[img]http://members.cox.net/dbillings/flashtut1/tut3.jpg[/img]

That's it!
I know this seems complicated, but it's really not. this tutorial is just long because I want it to be easily followed by those who have never even used Flash. I will add some pics later, I promise - but for now, I'm spent ;)

Tx2


© 2002-2005 Flaxweb Network | Article Manager | Gimp Tutorials Library | RAD C++ Library | Free C/C++ Sourcecode |
Sites of interest : Web Design Blog | Swish Templates | Swishmax Ebook | Photoshop Templates | Gimp Tutorials | Text Forum | Make Money Online