Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
ddgasdgr #1
Adding styles to custom as3 components
I understand how to add styles to custom components in Flex but can anyone shed
light on the correct way to define a background image style in the class
constructor? i.e what is the correct "type" for a backgroundImage:
[Style(name="backgroundImage", type="????", inherit="no")]
thanks in advance to anyone who can help!
ddgasdgr Guest
-
Adding custom lines to paragraph styles?
In the book style I'm using in ID CS, each section head is followed by a 5-pt. black 50% gradient line apx. 36p wider than the header text. I've been... -
Adding css class styles to images
I have a page template created with css that I would like to allow my users to add images, and based on the style selected, have the image appear to... -
Components, XML and Styles
hi, I'm loading a XML file using the XML connector and some components, ( Combo Box, TextArea, etc... ), the problem is I've plenty of text in one... -
Using styles to change components look in MX2004
How can I change the color of the scrollpane border?? (or delete it) Thanks in advance -
Adding pop up menu styles
Well, I have had Fireworks since v3, have never been able to create a custom popup style (image, not html). I create the style, save it as a style,... -
Bryan Dresselhaus #2
Re: Adding styles to custom as3 components
If your custom component is a UIComponent, you can use the
setStyle(styleProp:String, newValue:*):void method. You can override the
protected method childrenCreated():void or commitProperties():void. If you
have a lot of properties to style, you may want to use a css file and set the
styleName property of the UIComponent to a preset style.
In this case, if you have a background image, just do:
protected override function childrenCreated():void {
super.childrenCreated();
this.setStyle("backgroundImage", image variable or path string);
}
Bryan Dresselhaus Guest



Reply With Quote

