Solved

Combobox - Editable Input Field Skin (AS3)

Posted on 2009-05-18
17
3,361 Views
Last Modified: 2013-11-11
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
Comment
Question by:hddesign
  • 9
  • 6
  • 2
17 Comments
 
LVL 22

Expert Comment

by:rascalpants
Comment Utility
you should just be able to click into the component in the Flash IDE...

then you can edit the items there...


rp / ZA

0
 

Author Comment

by:hddesign
Comment Utility
there's the global textInput component in there but changing it's color etc has no effect on the combobox...
0
 
LVL 22

Expert Comment

by:rascalpants
Comment Utility

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

rp / ZA
0
 
LVL 22

Expert Comment

by:rascalpants
Comment Utility
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
 

Author Comment

by:hddesign
Comment Utility
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
 
LVL 22

Expert Comment

by:rascalpants
Comment Utility
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
 

Author Comment

by:hddesign
Comment Utility
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
 
LVL 37

Expert Comment

by:CyanBlue
Comment Utility
Maybe it is easier for others to play with the component if it is not following standard procedure...  Just a thought...  ;)

CyanBlue
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 22

Expert Comment

by:rascalpants
Comment Utility

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
 
LVL 37

Expert Comment

by:CyanBlue
Comment Utility
Oh, I meant how you can double click on the component to customize the component for the Adobe components...  ;)

CyanBlue
0
 

Author Comment

by:hddesign
Comment Utility
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
 
LVL 22

Expert Comment

by:rascalpants
Comment Utility
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
 

Author Comment

by:hddesign
Comment Utility
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
 
LVL 22

Expert Comment

by:rascalpants
Comment Utility
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
 
LVL 22

Accepted Solution

by:
rascalpants earned 500 total points
Comment Utility

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
 
LVL 22

Expert Comment

by:rascalpants
Comment Utility
Please finish up the question.


rp / Flash Zone Advisor
0
 

Author Closing Comment

by:hddesign
Comment Utility
thanks, sorry for delay, was on vacation.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now