Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
charleuts #1
Drop-down to Input text box
I am trying to figure out the right way to go about this. I would like to use
a drop down box as a search component. When you drop down the list, you will
see the main categories:
Category 1
Category 2
Category 3
Upon selecting one of those, I would like to have the drop-down box
automatically change to an input text box the user will enter a search string
in. This string will query only within the initial category selected. I'll
have a 'Search Now' button, or the like to initiate the action. Does anyone
have any ideas for me? Any help is greatly appreciated.
Regards,
Chuck Vollmer
charleuts Guest
-
White Text Box with Drop Shadow Text on Windows 2000
I'm new to Indesign, having just got the CS set of software. Used PM 7.0 and Acrobat 5.0 previously. On single page of InDesign, I have reversed... -
text input
im trying to input text into a feild using a keypad arrangment with images as the buttons. problem is everytime i press the next button it... -
Input Text, need help
ok what do i do if say, i have an input box and the user types something. lets say that the box is named 'input', how do i put an action on a button... -
Text vs Field for text input
I know this is a bit of a back-to-basics question, but it is something I have never really got my head around when to use text and when to use... -
mouseover drop down text overlaps text on page, unreadable!
Hello, I would appreciate any suggestions on this problem. When I place my mouse over an area that has a drop down menu, the text overlaps with... -
kglad #2
Re: Drop-down to Input text box
are you looking for help creating a search engine?
kglad Guest
-
Jack. #3
Re: Drop-down to Input text box
dropdown box - - use a listbox or combobox component,
use the component changeHandler to move the dropdown off stage eg _y=1000;
and using createTextField with type="input" make your input field,
my 2c's..........hth
Jack. Guest
-
charleuts #4
Re: Drop-down to Input text box
Actually, no. We know how we're going to go about querying our database, just
need to figure out the action to swap the comboBox component for an input text
field automatically after selecting the item (in the comboBox). Looks like a
good suggestion below that I'm going to try. If you have any other ideas, I'd
love to hear em'
Thanks,
Chuck
charleuts Guest
-
charleuts #5
Re: Drop-down to Input text box
Thanks Jack, sounds like a good idea. I'll give it a try.
Regards,
Chuck
charleuts Guest
-
charleuts #6
Re: Drop-down to Input text box
I tried this on the comboBox (mfSearch1_cb), but it's not seeing any change
event...so nothing is happening. Do I need to add a listener first? Or am I
just missing something silly?
on (change) {
my_mc.mfSearch1_cb._y=-3000;
my_mc.createTextField(mfSearchInput1, 1, 148, 65, 202, 20);
mfSearchInput1.type = "input";
}
Thanks,
Chuck
charleuts Guest
-
Jack. #7
Re: Drop-down to Input text box
i am still using MX, where a typical changeHandler is -
myCBox.setChangeHandler("handle");
function handle(component) {
theURL = component.getSelectedItem().data;
getURL("http://www."+theURL, "_blank");
sIndex = component.getSelectedIndex();
_root.gotoAndStop(sIndex+1);
};
Jack. Guest
-
charleuts #8
Re: Drop-down to Input text box
This is my listener, which is working (on actionscript layer of mc). Using
this as an example, how would you do the on(change) event for the CB to place
the clip off the stage?
myComboBoxListener = new Object();
myComboBoxListener.change = function(eventObj)
{
var eventSource = eventObj.target;
var theSelectedItem = eventSource.selectedItem;
var theSelectedItemLabel = theSelectedItem.label;
trace ( "You selected "+theSelectedItemLabel+".");
}
mfSearch1_cb.addEventListener ("change", myComboBoxListener);
mfSearch2_cb.addEventListener ("change", myComboBoxListener);
mfSearch3_cb.addEventListener ("change", myComboBoxListener);
mfSearch4_cb.addEventListener ("change", myComboBoxListener);
mfSearch5_cb.addEventListener ("change", myComboBoxListener);
mfSearch6_cb.addEventListener ("change", myComboBoxListener);
1000 Thanks,
Chuck
charleuts Guest
-
Jack. #9
Re: Drop-down to Input text box
i no longer have, nor find that i need MX2004, as i stated i am staying with MX,
so i cannot test this code, but at a guess, eventObj is returning the instance
name
of the selected component, so i'd try -
myComboBoxListener.change = function(eventObj){
eventObj._y = -3000;
my_mc.createTextField(mfSearchInput1, 1, 148, 65, 202, 20);
mfSearchInput1.type = "input";
};
hth ?
Jack. Guest
-
charleuts #10
Re: Drop-down to Input text box
Can't seem to get the change handler right. I'll keep pecking away at it. Thanks for your help!
Chuck
charleuts Guest



Reply With Quote

