Actionscript :: Which Text Control To Use In Flex Mobile App So That Color Of It's Substring Can Be Changed?
Jul 8, 2011
I am creating an searchbox for a tablet application. On entering any text the results appear below as a list. Now I want to change color of that part of the text that is there in searchbox.So which text control would allow me to do that. I found that RichText is one such control but Adobe recommends not to use it for mobileDevices.
I am learning about sharedobjects and have worked out how to save info to an so. Then i came across this script that creates an input field and allows the text color to be changed, how do I use this package and save the textfield input to a so.[code]........
I have a Flex3 TextInput control, with white text on a black background. I would like to change the style of highlighted text within the control to use black text on a white background (or something similar). I would love to do this using Flex styles, however I'm comming up empty handed
I have a dynamic textfield that displays different text. What I want is the ability to control both the text color and the background color of the textfield.
I'm currently working with Flex Hero mobile 4.5 to develop a mobile program.I have searched some forums allready but nobody can help me with this.How do you change the backgroundcolor of your mobile program.I have allready tried to use:
Ok perhaps ive bitten off too much here...I know you are not supposed to parse xml/html to regex but the thing is there just arent many other options.Im using AS3.im parsing the source of textflowlayout text to a different format.
string to parse :
< fontFamily=Verdana encoding=unicode fontWeight="bold"> some text < fontFamily=Verdana encoding=unicode > some text < fontFamily=Arial encoding=unicode fontStyle="italic"> some text < fontFamily=Arial encoding=unicode fontWeight="bold" fontStyle="italic"> some text
what i really need is:
< fontname=Verdanabold encoding=unicode> some text < fontname=Verdana encoding=unicode > some text < fontname=Arialitalic encoding=unicode > some text < fontname=Arialbolditalic encoding=unicode > some text
logically i think of it as taking apart the string into substrings
checking if there are fontWeight or fontStyle in the substring
if there is then appending the font name with the weight or style so so that the font name becomes font NameWeightStyle.then rebuilding the string.The font could be any font with variouse styles or weights..so far:
pattern = /<(.*?)>/gixsm; var matches:Object = pattern.exec(str); var finalstring:String = "";[code]...........
I'm playing around with a messaging type of application. Does anyone know how, or of any tutorials on to "appending" html text to text areas in flex and flex mobile projects? And specifically how I could take that and basically "append" a sprite inline to the text when i need to? Something simple like:Username: some text right here!So, Anyone have any experience "appending" sprites or simple text formatting?how to solve these issues!EDIT:Based on an answer below it was sugguested that it's as simple as...textAreaInstance.htmlText += "<b>Username:</b> some text right here!";But its not. you can't do .htmltext with a text area. you can on a text field, so i tried
var TF:TextField = new TextField(); TF.width = 200; TF.height = 200;
I can't seem to figure out how to set the application control bar's background color in flex 4? It doesn't have the backgroundColor property, and I'm a little stuck.
I've a basic portfolio page with 5 links. The idea being that 4 stay small and the active page is a larger font. When one link is clicked, itself and whatever font is currently large both swoop down and then the large text is replaced by whatever section the user chose.
I haven't keyframed anything, it's all done with actionscript and here it is. I made one of the links show what the var is currently set to in a dynamic text box. That all seems right. But whenever the 'currentchoice' mc is asked the swoop down, it just disappears rather than animates out. Here's the actionscript.
import mx.transitions.Tween; import mx.transitions.easing.*; var currentchoice:Object = new Object(); currentchoice.selection = large_anne;
TWO PROBLEMS: THE FIRST ONE: I have one Button instaced botao01 Inside this button i have a animation, with to words alternating in a mask, each one word is a MC with instace names:
txt01_bt01 and txt02_bt01 This two MC have ONLY the text "home" inside, with one frame... its only a MC of a static text All flash have some objects, and this objects change the colors with some variables.... and this works fine. I want to change the colors of this static texts too. BUT when i put the command to change the color of the movie clip txt01_bt01, he really change the color BUT he lost the animation, the movement, he dont have more the movement!
In Flex Mobile Project, Text Input shows blocks instead of showing arabic text. Labels are working fine with Arabic.
Is there any way to show Arabic text inside text input?
My code sample is
<fx:Script> <![CDATA[ /* Import all the easing classes so its
[Code]....
Since, it is for flex mobile project, when I input any text in arabic, it shows separate characters. Arabic is a language that doesn't have separate characters. It should combine letters to form specific word.
I have a string variable assigned with some Content in HTML format.[code]...
But in the output i am getting as This is <b. Basically it considering HTML related tags also as text. But my code has to omit the HTML tags while calculating sub string.
i got some examples am working on i have this project that has falling stars but when i run my project and test the movies the stars are colored in yellow,i have checked the sprites and the shapes color and changed them to white but nothing changed
I have a graphic (behaving as a movie) that has a motion tween. Color selector buttons let the user change the color (using setTransform) of this moving image.
BUT... as soon as one clicks a button to change the color, it stops moving (eveything else carries on moving though).
A good example of what happens is: picture a red car moving across the screen. A potencial buyer wants to see what the car will look like in yellow and as soon as they click the yellow button, the body work of the car becomes yellow and stops dead. The rest of the car carries on. Buyer not impressed and I loose the sale!
I have a graphic (behaving as a movie) that has a motion tween. Colorselector buttons let the user change the color (using setTransform) of this moving image.BUT... as soon as one clicks a button to change the color, it stops moving (eveything else carries on moving though). good example of what happens is: picture a red car moving across the screen. A potencial buyer wants to see what the car will look like in yellow and as soon as they click the yellow button, the body work of the car becomes yellow and stops dead. The rest of the car carries on.
I just wanted to know about a website's logo application. The website is www(dot)Logomaker(dot)com and I have question about how can the images be selected at various regions and their color can be changed ? What format are the images in the flash?
I'm trying to get a spark tab bar to have a selected tab that does not change color on mouseover. I'm trying to implement this by working with a skin based on the skin spark.skins.spark.TabBarButtonSkin, but despite turning off the shadows on the selected and overAndSelected states, it still shows a dark color on mouseover.
I have below columnGroup in advancedDataGrid control and I want to show the header in red background color and also applied the style but the background color in the header does not show as red only the text color in the header is changed.[code]...
I would like to move (right or left according the current view) between 2 views when I move my finger on the mobile screen; for example with Google+ mobile application, in profil section, you can change the view just on move your finger on the screen, and the offset and the moving speed must be checked before change complete view.
I am using spark.label for Mobiles in Flex, I want gradient on label text instead of solid color. But performance should be kept in mind as it will run on mobile device.
What is the best way to display a large amount of text (5000-10000 words) in a Flex mobile app?
I have been loading text in through an xml file using itemrenderer. It works totally fine when I run the application on my PC but when I load it onto my Android phone it crashes. Looks like my phone can only handle loading in about 3000 words using this method without crashing.
Anyone have a suggestion? Also, HTML isn't going to work for me. I want the text built into the application, which is why I have been trying to use the xml file.
I am trying to use a text area to display some text on a mobile AIR app. It works fine whenever I am using the phone emulator on my desktop to debug, however whenever I put the app on my phone, the text displays, then disappears. I've also noticed that if I lock the screen and unlock, the text will display just fine when I come back.
One other interesting thing to note is that it only happens on certain Views, and only on Views in the first ViewNavigator tab. This leads me to believe that there isn't really anything wrong with my use of the TextArea, but something else happening at a higher level in the application.
Because the color of the background image in my application is very dark, and the Alpha is very low, when I hover my mouse over a checkbox, the text is scarcely visible. I've scoured the interwebz in vain for what property to set, either at design-time or in the MouseOver event for the checkbox and just can't figure out what property or setStyle property to alter to be able to control the color of the checkbox text when the mouse pointer is hovering over it.