PDA

View Full Version : Search by drop-down??


mages.b
08-15-2008, 12:06 PM
I am familliar with flash and AS2 but definately on a peasants level compared to most of you. However between the people I know, we posess enough to get the following done, I'm just looking for a point in the right direction. Thats where you come in!!


Essentially, I need to be able to create buttons or .jpgs, searchable by drop down menus. For instance one drop menu would list options: color,size,shape which would que a second menu that would say blue/black, large/medium, circle/square, respectively - dependent on the first menu choice. then there would be a third drop down menu with some other specifying parameter.

That part I think I can figure out, but any input is appreciated.

What I am trying to figure out is the best way to "label" these buttons/jpgs so they are searchable with these dropdowns, and can be accessed in a combination of dropdowns if applicable.

like I said, any input or references would be awesome!!

vcovcf
08-26-2008, 02:25 AM
the best bet is to use your own custom naming schema. for instance, say drop down 1 yields a possible of 10 outcomes. what to do? -- make the first digits in your naming convention be 01-10. Then, do the same thing for drop down two. So, if a user picked number 6 in the first and then number 2 in the 2nd, your new String("key code") would be "0602". If you catch my drift...concatenate that with any other drop downs/naming convention that you'd like, then get a grunt to write out an XML with all the possible key code value pairs. When that's done, just write a for loop that searches through the xml for a possible match and then execute whatever action needed when/if you find a match.

It might not be the smartest or most efficient solution, but it works, and it's fairly simple.