Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-11-2003, 07:26 PM   #1
mykrob
Registered User
 
Join Date: Oct 2002
Location: Jackson, TN
Posts: 22
Default combo box question?

hey,
no FLA to post, but i'm just pondering a thought..
i know that you can make a combo box editable, so that the user can begin typing in a response.. Is there a way to make the combobox search its own contents? I guess what i'm looking for is to emulate a dropdown menu like in HTML/Javascript.. so as the user types, the selection in the dropdown menu tries to "predict" the users choice.. This way, they can type a partial word, and the menu find the item as they type...
sorry for the bad description,but any input on this would be great.. thanks,
-myk
mykrob is offline   Reply With Quote
Old 02-13-2003, 04:26 PM   #2
treefield
Registered User
 
Join Date: Dec 2002
Posts: 15
Default

I bought a book that has an example for word completion done by Actionscript.

Object-Oriented Programming with ActionScript
by Branden Hall & Samuel Wan
CH 13 pg. 292

You will have to make a custom combo box or at least override the onChanged event handler for the out of the box components. Basically every time there is a change in the box, the method looks for a matching list item and if it finds one, it displays it in it's entirety with in the box.
treefield is offline   Reply With Quote
Old 02-13-2003, 10:54 PM   #3
freddycodes
Master of Nothing
 
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
Default

I haven't read the book treefield mentioned, but I did write something that does what you ask. Actually it does more, it will add the item to the list when you press enter if its not already there. And it will delete the item from the list if you press delete. It will also try and match what you are typing while you are doing it. It uses the normal combobox with a Key listener.

Is this what you are asking for?
http://www.irq11.com/~louie/portfoli...martCombo.html
freddycodes is offline   Reply With Quote
Old 02-14-2003, 12:30 AM   #4
oldnewbie
Banned by AS.org Staff
 
Join Date: Mar 2002
Posts: 10,533
Default

Just tested this out and this seems exactly what mykrob was after.
Tried a .fla extension on your link, and it worked. Thank you very much.
oldnewbie is offline   Reply With Quote
Old 02-14-2003, 12:48 AM   #5
oldnewbie
Banned by AS.org Staff
 
Join Date: Mar 2002
Posts: 10,533
Default

A nice addition to this would be no difference on input between caped and uncaped charracters!
oldnewbie is offline   Reply With Quote
Old 02-14-2003, 12:50 AM   #6
freddycodes
Master of Nothing
 
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
Default

Ask and you shall receive.
http://www.irq11.com/~louie/portfoli...martCombo.html
freddycodes is offline   Reply With Quote
Old 02-14-2003, 01:14 AM   #7
mykrob
Registered User
 
Join Date: Oct 2002
Location: Jackson, TN
Posts: 22
Default

thanks, guiys.
i had forgotten i had posted here as well as FK.
will give it a try.
-myk
mykrob is offline   Reply With Quote
Old 02-27-2003, 06:49 PM   #8
mykrob
Registered User
 
Join Date: Oct 2002
Location: Jackson, TN
Posts: 22
Default

hey, can you repost the FLA? I think you updated the SWF on the server but not the FLA..
I'd like to see how you scripted the one where the user CANNOT add or delete items from the list, but simply type and have the box search while they type.
A popular request back on FK.

thanks,
-myk
mykrob is offline   Reply With Quote
Old 02-27-2003, 06:51 PM   #9
freddycodes
Master of Nothing
 
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
Default

This one?


http://www.irq11.com/~louie/portfoli...martCombo.html
freddycodes is offline   Reply With Quote
Old 02-27-2003, 06:52 PM   #10
freddycodes
Master of Nothing
 
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
Default

Done
freddycodes is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
My brain hurts (onClipEvent question) andrea_levin ActionScript 2.0 3 03-25-2004 04:23 AM


All times are GMT. The time now is 08:27 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.