Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3399
  • Last Modified:

Combobox - Editable Input Field Skin (AS3)

Hi Experts,

Please see attached, is there anyway to skin the actual input field in an editable combo box (so users can see it's actually editable!), like how Flex has it?

Cheers!

combobox.jpg
0
hddesign
Asked:
hddesign
  • 9
  • 6
  • 2
1 Solution
 
rascalpantsCommented:
you should just be able to click into the component in the Flash IDE...

then you can edit the items there...


rp / ZA

0
 
hddesignAuthor Commented:
there's the global textInput component in there but changing it's color etc has no effect on the combobox...
0
 
rascalpantsCommented:

are you talking about the color of the text or the movieclips that make up the interface elements?

rp / ZA
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
rascalpantsCommented:
forgot to mention, that you have to be using CS3 or above and have the document set for Actionscript 3.0

then you can drag over a ComboBox from the library to the stage... and click down into it


rp / ZA
0
 
hddesignAuthor Commented:
not the text color, the combo box includes a textinput component but it doesn't display it, it's basically invisible, i just need to know how to create the effect above, editing the text input field doesn't do it unfortunately...
0
 
rascalpantsCommented:
the attached image show what it looks like when you open a component in with CS3 and AS3 as the language...


then you just open and edit what you want...



rp / ZA
combobox-screen.jpg
0
 
hddesignAuthor Commented:
thanks but i'm well aware of how to edit a component, the problem is this doesn't control the appearance of the EDITABLE input field, need another solution....
0
 
CyanBlueCommented:
Maybe it is easier for others to play with the component if it is not following standard procedure...  Just a thought...  ;)

CyanBlue
0
 
rascalpantsCommented:

hd...  maybe it is your use of vocabulary that is making this an issue, but are you needing to control the text in the input field?  like color and font?  or something else that I am completely missing?

and by the way...  since I have been an expert on this site for a tad, I make it my normal practice not to ass/u/me anything, especially a developers skill level, or understanding of the Flash IDE.

Cyan...  i never knew there was every a standard procedure for anything on the web  ;)


rp / Flash Zone Advisor
0
 
CyanBlueCommented:
Oh, I meant how you can double click on the component to customize the component for the Adobe components...  ;)

CyanBlue
0
 
hddesignAuthor Commented:
Sure, let me try explaining a different way...  a regular combobox and an editable combobox look identical in Flash so there's no way for a user to know that they can type into the editable combobox. (try it for yourself, drag a combo box onto the stage and select 'editable = true' in the parameters)

In Flex however, the editable combox box looks like the image above, with a white rectangle so that it's obvious that you can type in there.  I want to know if and how I can recreate this effect, i've tried editing the movie clips that make up the component but maybe there's a background property for the input field?

Not sure what the syntax would be but something like comboBox.textInput.setStyle("backgroundColor", "#fffffff")?  Or a property to add a border to the textInput field?

thanks
0
 
rascalpantsCommented:
you CAN skin the component the way you want... you just have to fake it a bit...  you don't update the textfield, you update the movieclips like Up Skin, Over Skin, Down Skin in the component...  I just clicked on the Up Skin until I got inside of the graphic that allows me to put a white box with a dark grey border...  

gotta git dat...  


rp / ZA

 
combo-screen.jpg
0
 
hddesignAuthor Commented:
ah cool! BUT... this would apply to all comboBoxes in the app, do you know how to have like 2 different versions of the comboBox on the stage, an instance name wouldn't work, i guess is there a way to duplicate them in the library and assign diffirent names there?  (So I can have some comboboxes look like this and some look regular)
0
 
rascalpantsCommented:
hmmm....  

well this is quite a hack, but you can duplicate the ComboBox class and then associate the editable combobox with it, and then assign the graphics in the combobox instance names, and then in the new Combobox class you created, you can control the visibility state of it...  


this is theory, and I have not done it yet... Ill let you know how it goes....


rp / ZA
0
 
rascalpantsCommented:

well, I had some trouble with my system recognizing my classes...  so I am still not sure if it is possible to re-associate or re-name a class...  like fl.controls.ComboBox.as  to fl.controls.EditableComboBox.as.   for some reason, when I associate it with a new class, it goes wacko...   even though all I did was update the class filename, class name, and construct.


anyway...  I think your question is answered, as to how to skin the combobox, so that it looks editable.

but as you have found out, the caveat is that all comboboxes will have that same skin.


being able to associate it with a new class, should work, but you will have to look into that one.


rp / ZA

0
 
rascalpantsCommented:
Please finish up the question.


rp / Flash Zone Advisor
0
 
hddesignAuthor Commented:
thanks, sorry for delay, was on vacation.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 9
  • 6
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now