I am using a TextArea in my application, and wish to change the font color of textArea at runtime based on certain conditions? I am using the following code in a functionresultText.setStyle("color", 0x842D22).However, this does not work, and gives me an exception at runtimeCannot Access property of null object reference.
I am using actionsript 3 and flex 3.5. Is there any way to change the font color of a part of text in TextArea control without using "htmlText" property?
For example I have a string "dog, cat, fish". I want to change the color of "cat" word to red.
var requestObj: URLRequest = new URLRequest("jukebox.swf");var loaderObj: Loader = new Loader();addChild(loaderObj);loaderObj.load(requestObj); thumbnails_tl.addEventListener(Event.CHANGE, thumbnailClicked); function thumbnailClicked(event:Event):void { mineral_ta.text = event.target.selectedItem.data;} thumbnails_tl.addItem({label:"Akeboshi", source:"thumbnails/Akeboshi.jpg",data:"Yellow Moon
[code]......
This is not all of it but i want to change it from black to like lets say green.Is there a way to change it to a different color without using a xml or any other program?
I'm trying to change the background color of a TextArea Component.Does anyone know how to do this?
function processXML(e:Event):void { var strTextBox:String; myText.visible=true; myText.setStyle("contentBackgroundColor", 0x000000); //Does not work..nor does myText.setStyle("backgroundColor",0x000000); myXML = new XML(e.target.data); strTextBox = "<a href='" + myXML.Branch[0].linkURL + "'> More Info...</a>"; myText.htmlText=strTextBox;}
I have about 10 buttons in my flash game. (just SimpleButtons), and i want to change their colors in runtime.How can I do this? I need to change the color of the button rectangle, and the color of the text in the button. I can do this i think by converting all the parts of the buttons into movieclips and then refrencing those moviecips.tansform.colorTransform, but then i have to make a seperate movieclip for all 3 of the button states (normal, hover over, and click), right?
I am attempting to dynamically change the color of a subset/portion of text in a Spark TextArea control. Using the MX-based TextArea, I could leverage the mx.controls.textClasses.TextRange type and change the color directly as follows:
1st argument: The TextArea control that will provide access to the underlying textField property 2nd argument: Indicates the TextRange will not modify the content of the TextArea 3rd argument: The beginning index position in the TextArea text string 4th argument: The ending index position in the TextArea text string
How would I go about doing this for a Spark-based TextArea control? I am looking to dynamically change the font color for a range of text, not just the entire TextArea AND I cannot statically specify the font color. The problem I run into when trying to re-use the TextRange type is that the 1st argument is expected to provide the textField property, which is currently not on the Spark-based TextArea control. I thought about extending the Spark-based TextArea control to provide this accessor property but that seems like overkill and is probably not the best approach.
I want to do as follows: * click a "red" button write in textarea with red color font click "blue" button * write in textarea with blue color font Isn't this possible in flash 10 using AS3 I tried using setTextFormat but the problem is i have to have text before inserting format on that.
click a "red" button write in textarea with red color fontclick "blue" buttonwrite in textarea with blue color font Isn't this possible in flash 10 using AS3 ? I tried using setTextFormat but the problem is i have to have text before inserting format on that.
Is it possible to change the width of an insert TAB character in a Flex TextArea?I'm capturing FocusEvent.KEY_FOCUS_CHANGE events and manually inserting a " " into a text area styled with an embedded monospace font. By default, the TABs are being displayed two and a half monospace characters wide... I need them to display five monospace characters wide
I want to change the image at click event.I change the source of the image on click but its not reflecting immediately it comes when any other event is fired.
I have a prompt string to be displayed in my combobox - this needs to be displayed in italics. When user makes any selection from the list - i need to change the style of the displayed content.
My css file:
.promptStyle { fontStyle: italic;[code].....
I am able to see the style change happening because the color changes; but the change specific to textInputStyleName does not get applied.
flash builder 4 comes with a couple of cool spark themes, and there are tons of others out there on the web, I want to be able to change the theme at runtime, without recompiling.
I'm trying to change an image color in flex 3, but I can't get it still. I think have to change the image color by using pixels, but I don't know how to do it.
I have a doubt in flex 3. I'm trying to change an image color in flex 3, but I can't get it still. I think have to change the image color by using pixels, but I don't know how to do it
Is there a way to set a rollover color for each series in a chart?For instance, I have a column chart with two series: one series is set to blue and the second series is set to gold.
When the user mouses over the blue series, I would like the blue to turn to bright blue. And when the user mouses over the gold series, I would like the gold to turn to bright gold.Also, is it possible to change the color of the chart item when a chart item is clicked?
I have a custom preloader that I designed in flash. When I load it in flex, it loads with a white background. When I try to change the background to black in my flash file & load it in Flex, the background color remains white. I've also tried to update the compiler settings in Flex, adding "-default-background-color #000000" but I still get a white preloader background. I am using Flex 4. Here is my Pre.as file:
I'm trying to change the background color and or text color of a BorderContainer in flex 4 using Action Script, but have not idea how to. The Border Container component doesn't seem to have any properties like: idname.color = "#333333"; idname.backgroundcolor = "#333333"; How might I go about doing this?
It would have been easy with Flex 3 using barColor but as barColor is no more available in Flex 4 how can I setup progress bar such that the progress fluid changes it's color with progress.Like starting progress with the shades of lighter green and ending at bright red.
I am unable to get the DataGridItemRenderer to pass a color value to <s:SolidColor based on the function containing an if statement based on the value of data.Bld_Type. Code below. I am vey new to Flex and not sure what the problem or if this is the right way of doing itr work.
I have some simple actionscript 3 code which compiles and runs without error but doesn't do anything. I just want to change the bacground color to black (or transparent). How can this be done? myTextArea.setStyle("backgroundColor", "0x000000"); I've tried the color argument without quotes and as "black" but nothing seems to work.
I have a Flex 3.5 application that will serve multiple purposes, and as part of the visual changes that I'd like to make to indicate which mode the application is in, I want to change its background color.[code]...
What is the easiest way to change the background color of a toggle button when it is selected?I've tried creating a custom skin for the button and applying it to the downSkin property, but I can't figure out how to change the background color from within the skin. Also I'd like to avoid using an image as a background if possible.
simple (?) question: what's the easiest way to programmatically change the style of an ADG cell most recently clicked by the user? Important note: I'm assuming cells not to editable and the selection mode to be singleRow, i.e. the specific cell needs to render differently from the standard highlight that comes with being part of the selected line.