ActionScript 3.0 :: Make Text Flash Two Different Colors In It?
Feb 17, 2011Make text flash two different colors in it?
View 4 RepliesMake text flash two different colors in it?
View 4 Replieshow I can manage to give single words inside a DataGrid-CellRenderer a different color than defined by the TextFormat for that CellRenderer? It's not how to get these single words, it's how to use more than one color inside one cell...
View 1 Replieshow to alternate text colors in a Chat i tried to use css but it changes all the text colors not just each message.
View 2 RepliesI am colorblind.I need to change either the color of the background or the color of the text on the layers section on the Timeline.I simply cannot read/see what is currently showing.It is a very light blue background with white text and white dots for seeing, locking, or setting the outline color.I need to either change the text color and dots to black so I can see them, or try to change the background color to a dark blue so I can read the white text.Changing the text color would really be my preference. Adobe hasn't been very concerned about colorblindness when developing these products. I can barely make out all the light grey/grey/dark grey/grey stuff.
View 7 RepliesI'm trying to use a dynamic text field to pull in html text that contains a bulleted list. Easy enough, that works. But the bullets dont take on the color assigned to the field. I've tried putting it in the html text and also using NewTextFormat and neither work. Can someone help me. This should be a simple fix, but I can't find it... I just want my text and bullets to both be white.
Simple code below. Using html text inside the flash document and having a dynamic field on the screen named txt. Code should turn text and bullets green, but it doesn't work, only text turns green
this.txt.html = true;
var my_fmt:TextFormat = new TextFormat();my_fmt.color = 0x00FF00; // hex value for green
this.txt.htmlText = "<P> This is the first paragraph</P><BR><UL><LI>Bullet 1</LI><LI><BR>Bullet 2</LI><LI><BR>Bullet 3</LI><LI><BR>Bullet 4</LI><LI><BR>Bullet 5</LI></UL>";this.txt.setTextFormat(my_fmt);
I want to make a box that changes color when the mouse rolls over it, and changes randomly between 10 different colors.
View 1 RepliesHow do I alternate text colors in a dynamic text field I tried to use CSS but it changes all the text to the same color i want each line to be a seperate color.
View 3 RepliesI'm trying to make an array of colors. I have uint's representing my colors now:
var btnColor:uint;
btnColor = 0x999999;
But when I trace these button colors, they come out funny.The color above comes out as:
10066329
And this is the way they get pushed into my array. I tried converting them to Strings:
arrBtncolor.push(String(btnColor));
But it was the same 10066329 that got put into the array. It must be a small thing I'm doing wrong, but so far, I haven't figured out what it is.
I'm trying to make an array of colors. I have uint's representing my colors now:
var btnColor:uint;
btnColor = 0x999999;
But when I trace these button colors, they come out funny. The color above comes out as:
10066329
And this is the way they get pushed into my array. I tried converting them to Strings:
arrBtncolor.push(String(btnColor));
But it was the same 10066329 that got put into the array.
I am a new user and also very new to actionscript 3.0. I am wondering on how to do the flash menu with varying colors.
View 4 RepliesI have a simple .fla file with a circle on the stage. I want to set actionscript to make the circle randomly change colors when playing. I've tried all sorts of script commands using math random but to no avail
View 4 RepliesI've perused the random color tuts, yet I'm still deadlocked somewhat on this issue.
I'm trying to make a square change colors randomly.
For example, I want the square to change from red, white, and blue, but randomly.
I know about Mcs and instance names and all that. I just need to know how to write the code. I know it starts with:
OnClipEvent (load)
and after the variable,
onClipEvent (enterFrame)
SetProperty...
think.. in as2, i just want to make a movieclip change colors over a period of say 30 frames when i release a button.. is there a simple way to script this?
View 5 RepliesI want to be able to choose three differents colors from a color picker. I want to choose between red, green and blue. How can I change my code below to do this? Should I have my color picker in its own class?
public class SuperDraw extends Sprite
{
private var loadImage:LoadImage;
[code]......
How do I make the color array, dColors, an optional parameter?[code]It gives me a "1047: Parameter initializer unknown or is not a compile-time constant."I've tried a bunch of different ways, but all I get are compile errors.Don't forget to drop a colorpicker control in to your library if you copy out the code.
View 2 RepliesI wonder what kind of class(es) I should use to accomplish this task. I have two predefined colors, 0xFF0000 and 0x00FF00 (red and green), and I would like to set a number of gradiants of colors between these two colors. [code]This generates a random color, but I don't want to generate just any random one. Does anyone know what kind of color class I should use to accomplish my task objective?
View 5 RepliesI'm having trouble when scrolling across keeping my eye focused on the layer I want... is there anyway to change the view so that they alternate between grey and white(or anything like that) or are each there own color..
View 2 RepliesI want to implement having a movie clip randomly change color.How can I make my movie clip randomly switch colors with a push of a button??By the way I'm using flash MX and I am still intermediate when it comes to coding.
View 3 RepliesI'm struggling with setting custom formatting properties on different ContainerControllers assigned to a single TextFlow instance. I can assign different columnCount properties and those display as desired, but other properties such as color seem to be ignored. I have tried this syntax:
Code:
myContainerController.color = 0x00ff00;
myContainerController.columnCount = 2;
[Code]....
In both cases, the columnCount is set correctly, but the color is ignored. Is it possible to affect the color of the displayed text? That would seem to be one of the primary advantages of TLF text?
I'm building a project for a gaming website and i have an interesting dilemma. How do i make the font color change based on the data loaded from the external .txt file.
Example:
In text files i could have... yes yes yes no no maybe yes no. If the text says yes i would like for the font to change to green, if no to red, or maybe to orange/yellowish.
So basically if i went in and changed the No to a Yes on a .txt file, the next time i viewed that flash section the yes text would be in green instead of the default set by the flash core itself.
I hope i am making sense. I don't even know how to go about starting and i stared at the actionscript list for awhile to no avail.
I tried using several text fields to show headlines in different colors, but when i post them online they get all messed up. Is there a way to switch between 2 colors within a single text field?
View 3 RepliesI have a dynamic text box that is being populated by this line of code:
feedback.htmlText = myQuestion[counter]+"<br>You:<br>> "+myFoil[counter][userAnswer]+"<br>Chris:<br>> "+fbCorrect[counter];
I am needing to have the three distinct areas to be different colors of text. Can I do it in this line only? These elemnts are being pulled in from the first part of my file and I want them all the same unitl I pull the the info into "feedback.htmlText".
Is there a way for when you set the dynamic text to have multiple colors inside of it?
Like have a sub string for the first word, and make the blue... Then the rest of it is red?
when i run this code.. all is good and everything is read from the file trees.txt
var myLoader:URLLoader = new URLLoader()
myLoader.dataFormat = URLLoaderDataFormat.VARIABLES
myLoader.load(new URLRequest("trees.txt"))
myLoader.addEventListener(Event.COMPLETE, onDataLoad)
[code]...
now what i am trying to do, and i am almost certain i am going the wrong way with this, is to add on rollover a button that corrosponds to the text the text will change color from black to red. meaning... if i rollover button_0 the text of tcname_0 with change to red , and if i rollover button_1 text in tcname_1 would change.. and so on. so here is what i did:
var myLoader:URLLoader = new URLLoader()
myLoader.dataFormat = URLLoaderDataFormat.VARIABLES
myLoader.load(new URLRequest("trees.txt"))
[code]...
2- if the loop works and doesnt break, i still have a problem of how to exactly pass the name of the text field that should be changed. right now i am hard coding it as tcname_2 to see if this even works but i would like it to somehow pass the button_x (x being the number) and use that x to change the corrosponding text i.e (tcname_x) .. is this even doable?
I am working on project as under:on first step ( screen) there are 2 text fieldsuser inserts text in a field and on the second text field same text appear as he typeshe clicks on a button to go to step 2On the second step he has the written text from previous screen and buttons to change font, colors and position of the text box.
View 3 RepliesI've tried several solutions to get this to work on a dynamically created text field. None of them get the job done.
The font I want to use (let's call it FancyFont) is in the library and does have actionscript linkage. It is exported in Frame 1.
Approach 1: Using CSS:
Since I would like to ultimately be able to change the string dynamically, I'm not loading from an external file.
Code:
var styleString="body{font-weight:bold; font-family:FancyFont;} .red {color:#cc0000}"
var style:StyleSheet=new StyleSheet();
[Code]....
on first step (screen) there are 2 text fields user inserts text in a field and on the second text field same text appear as he types. he clicks on a button to go to step 2 On the second step he has the written text from previous screen and buttons to change font, colors and position of the text box.
View 1 RepliesI'm using the dynamic text scroller from [URL] found at [URL] Here's a link to my zipped files too... [URL]
1) I can't figure out how to have URL links in the text that loads.
2) How can I make the scroller refresh to allow for new text in the dynamic text area. The content changes alright, but the scroller stays in the same position and if it wasn't needed initially, the scroller disappears and doesn't return on new text.
I have many text elements in my flash file - how do I modify the text to make it all caps? Is there an easy way where I can select all of them in one go and make them all caps?
View 7 RepliesI am exporting a RGB Illustration done in Photoshop with really strong colours. I export it for my website from the option save for web, (I also tried save as with all kind of formats) but the colors get really pale when I took it in Flash. I don't understand, the same image has really bright strong colors in Photoshop. I tried to play with the option from flash - color- advanced- alpha,but they just get darker or wierder.
View 9 Replies