Change Dynamic Text Background Color
For some reason I can't get my background changed
ccText_txt.backgroundColor = 0xcccccc;
I have a dynamic text box with instance name of ccText_txt that starts on frame 1 and spans 30 frames. On a separate layer I have functions that are in frame one and that frame goes across all 30 frames as well. The function layer turns the text box on/off.
Any reason the background won't show? I am using MX 2004 pro and publishing as player 6.
FlashKit > Flash Help > Flash ActionScript
Posted on: 02-17-2005, 04:23 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How Do You Change The Background Color Of A Text Field?
I've been trying to change the color of my text field in FlashMX and I can't seem to figure out how to do it. Couldn't find any tutorials on it anywhere, so I'm posting here instead.
I've got a dynamic text field (loading an external text file) with a scroll bar, but I don't want the background color of the field to be the default white color. How can I change it to something else?
Any help would be greatly appreciated.
Thanks,
-RoG-
http://www.I-Mockery.com
How Do I Change The Background Color Of Text Fields?
Hi,
Is there a way to change the background color of a text field? I have a text field with the border enabled, and the background color of the field changes to white. I would like to change its color to another color (or even to transparent, if possible), but I can't find a way to do it at design time.
I know that it is possible to change the color with ActionScript using the backgroundColor property, or even disabling it with the background property, but I didn't find anything about doing that on the Flash interface.
Can someone help me?
Best regards
Norberto
Change Background And Text Color With Buttons?
Hi, i'm trying to change the background and the text color with two button. The first one is ok, but when I try to change the color back only the background changes.
AS layer:
Code:
this.myText.textColor = 0xFFFFFF;
function changeBG(col) {
var c = new Color(bgClip);
c.setRGB(col);
bgClip._width = "550";
bgClip._height = "400";
}
changeBG(0x000000);
Button 1:
Code:
on (release) {
if (this.myText.textColor = 0xFFFFFF) {
this.myText.textColor = 0x000000;
} else {
this.myText.textColor = 0xFFFFFF;
}
function changeBG(col) {
var c = new Color(bgClip);
c.setRGB(col);
bgClip._width = "550";
bgClip._height = "400";
}
changeBG(0xFFFFFF);
}
Button 2:
Code:
on (release) {
if (this.myText.textColor = 0x000000) {
this.myText.textColor = 0xFFFFFF;
} else {
this.myText.textColor = 0x000000;
}
function changeBG(col) {
var c = new Color(bgClip);
c.setRGB(col);
bgClip._width = "550";
bgClip._height = "400";
}
changeBG(0x000000);
}
How Do I Change Background Color On MM Rich Text Editor Component?
I am trying to change the background color on Macromedia's Rich Text Editor component but I'm having no luck. I know I need to muck around in the library once I add the component to my project and I think it has something to do with skins but other than that, I'm lost!
Thanks in advance.
Dynamic Text Background Color
I've searched this subject, but can't find a response that I fully understand. My dynamically loaded text box is white and I want to make it a different color with no border. What is the code for that and do I put the code in the action box while the text field is selected or maybe in the first frame of the MC?
thanks in advance.
Background Color Of Dynamic Text Box
I have flash photo gallery with thumbnails linked to large pictures via xml with a text description from a .txt file, which loads into a dynamic text box.
Question, is there an easy way to change the background color of the text box to something other than white?
Dynamic Text - Background Color
Hello. I wanted to inquire if there is a way to set the background color of a dynamic text box. I know this can be done setting the doc bgcolor first then add the text, but what about afterwards.....can you go back and change the dynamic text box bgcolor?
Add Background Color To Dynamic Text Scroller
I have a dynamic scolling text example from this web site. The text area background is white.
How do I change the color to the back ground color of page or just any color that I want?
this is the link to the one in question.
http://www.kirupa.com/developer/mx/dynamic_scroller.htm
newbie
Set Background Color Of Dynamic Text Fied
I am trying to set the background color of a dynamic text field via AS but having no luck. Here is what I did:
1. Created a dynamic text field on the stage and gave it an instance name of tText
2. In the actions panel I have:
tText.text = "blahblahblah"
tText.border = true;
tText.backgroundColor = 0x000000;
The background does not change to black. Any ideas as to what I am doing wrong?
[F8] Change Dynamic Text Color
I have a dynamic text field (title_txt) it is populated through a XML file that defines most of my body elements. I am trying to get my title_txt to change to the color of the secondary color which is also defined in the xml file, but for some reason I cant to get it to work. Here is my code check the //header section to see where I am ahving problems
Code:
function getMenuNode ()
{
var xmlin = new XML ();
xmlin.ignoreWhite = true;
xmlin.onLoad = function ()
{
headerNode = xmlin.childNodes[0].childNodes[0]
bodyHeader = headerNode.attributes.header;
backgroundColor = headerNode.attributes.bgColor;
primaryColor = headerNode.attributes.primaryColor;
secondaryColor = headerNode.attributes.secondaryColor;
//header
//problem starts here
titleFormat= new TextFormat();
titleFormat.color = secondaryColor;
title_txt.setTextFormat(titleFormat);
// works fine below this
title_txt.text = bodyHeader;
//primary color
var colorPrimaryTrans:ColorTransform = new ColorTransform();
var transPrimary:Transform = new Transform(contentBody_mc);
transPrimary.colorTransform = colorPrimaryTrans;
colorPrimaryTrans.rgb = primaryColor;
transPrimary.colorTransform = colorPrimaryTrans;
//background color
var colorBGTrans:ColorTransform = new ColorTransform();
var transBG:Transform = new Transform(background_mc);
transBG.colorTransform = colorBGTrans;
colorBGTrans.rgb = backgroundColor;
transBG.colorTransform = colorBGTrans;
//logo
createEmptyMovieClip("logo_mc",getNextHighestDepth());
logo_mc._x = 10;
logo_mc._y = 5;
loadMovie("bodyElements/logo.jpg","logo_mc");
}
xmlin.load ("data.xml");
}
Change Dynamic Text Color
So I have this typewriter script that looks like this:
frame 1:
Code:
firstname = "Tom";
_root.strText = "Hi "+firstname+". Allow me to introduce myself.";
_root.counter = 1;
frame 2 (labeled "loop"):
Code:
_root.text1 = _root.strText.substr(0,_root.counter);
_root.counter++
frame 3:
Code:
gotoAndPlay("loop");
I'm looking to get 'firstname' to be a different color than the rest of the text. How can I do this?
Dynamic Text Change Color?
Hi all,
First of all i would like to thank all of you, I've been around allready for a while. looking ,reading but most of all learning allot from all of you.
and now what i would like to learn.
I saw the menu over at designcharts and was wondering how that was made.
I expect it gets its content dynamicly, xml or php that i can understand, but how would you make that rollover effect with dynamic text?
i never thoughed it was possible to mask dynamic text.
If there is somebody out there that knows how to build it please share it,
thanx in advance!
G
Dynamic Text Color Change
Anyone know why this isn't changing the text color on release?
newLetter.onRelease = function() {
var matchFound:Boolean = false;
var clickedLetter:String = this._name.charAt(this._name.length-1);
for (var j:Number = 0; j<chosenWord.length; j++) {
if (chosenWord.charAt(j) == clickedLetter) {
_root.guess_txt.text = displayedText.substr(0, j)+clickedLetter+displayedText.substr((j+1));
matchFound = true;
this._visible = true;
myFormat_fmt = new TextFormat();
myFormat_fmt.color = 0xbbbbbb;
}
Change Background Of Dynamic Text
Is it possible to change the color/alpha of a dynamic text box background. Not the actual font, but the white space behind it? I have been trying to figure out how to do it for a while now and decided I need some help or some info on if it's even possible.
-Mike
Background Fill Color Of Dynamic Text Field
I can't seem to write the code to give this dynamic text field a background fill. Could someone take a look and point me in the right direction.
Thanks.
this.createTextField("tfNewfield",1,10,10,150,30);
tfNewfield.text = "Here's some text";
tfNewfield.border = true;
tfNewfield.background =true;
tfNewfield.wordWrap=true;
tfNewfield.multiline=true;
myformat = new TextFormat();
myformat.color = 0xff0000;
myformat.bullet = false;
myformat.underline = true;
myformat.background=blue;
tfNewfield.setTextFormat(myformat);
Change Color Of Text In A Dynamic Textbox
hi everyone,
does somebody know how to change the color of text in a dynamic textbox via actionscript?
i want to set the text at runtime but also the color, so converting the text to a symbol is not an option (as long as you can'7 convert it at runtime).
any ideas are highly appreciated ...
tia
eman
Change Dynamic Text Color/size?
Hello, I was wonder how you change the color and size of text that appears in a dynamic text field. I tried selecting it and changing it in the "characture" panel, but that doesn't seem to do anything. how would I go about this?
How To Change Color Of A Mc W/ Dynamic Text With Script?
Cannot figure out how to do it.
Since the mc contain a dynamic text box, the color of the text seems to be dominated by the text box color.
I have tried to use setRGB or setTransform but none seems to be working.
But i know i can cgange the color with the tint setting in the property pane, but how can i do it w/ scripts?
Dynamic Text Mouseover Color Change?
So, I have a dynamic menu drawing its info from an external as file. The menu contents are loaded in a textfield inside a movieclip
The question is, can I have that text change color as I put the mouse over it?
- K
Change Movieclip Color & Text Through Dynamic Txt
Ok, I am developing an interface for a client (to display in their office, not web based). I need to include a way to let the client (not Flash or programming savvy) to update part of the interface saying whether or not property has been available, pending or sold. This will change a circle's color and a word (for example, "Sold!" and the circle would now be red). I can make this work through a dynamic txt file, but I have to use 2 txt files (one for the color and one for the text). My questions are these: How can I make this as simple as possible for the client? I would like to change the txt file so they just input "red" rather than "0xCC0000", and not have two txt files. (when I try to integrate them, the circle turns black rather than the color I specify). Lastly, how would I integrate a database if necessary?
My code on the frame:
Code:
// *************************** //
// MovieClip.setRGB() method //
MovieClip.prototype.setRGB = function(newColor) {
(new Color(this)).setRGB(newColor);
};
// end MovieClip.setRGB()
// *************************** //
var a = new LoadVars();
a.load("properties.txt");
a.onLoad = function(success) {
if (success == true) {
trace("Text file load successful");
// variable representing hex number
circle = new Color("lot1");
nColor =_root.a.lot1;
circle.setRGB(nColor);
} else {
trace("Error: text file did not load properly!");
}
} // end onLoad()
loadVariablesNum("propertiestext.txt", 0);
And my color txt file (properties.txt):
&lot1=0xCC0000
And the word txt file (propertiestext.txt):
&lot1status=Sold!
&textloaded=OK
All help is appreciated! Thanks!!!
Change TextArea Color For Dynamic Text
Hello,
So I am trying to have a text area call up a txt file on the root directory of a site I am working on.
The textArea has the instance name of newsText
the text file is called news.txt.
Here is the actionscript code on the first frame (1/1 frames)
ActionScript Code:
var url:String = "news.txt";
var loadit:URLLoader = new URLLoader();
loadit.addEventListener(Event.COMPLETE, completeHandler);
loadit.load(new URLRequest(url));
function completeHandler(event:Event):void {
newsText.text = event.target.data as String;
}
Where and how do I insert the script to change the color of the text to be displayed into the text area? I've searched around for a few days and cannot find anything but long, elaborate scripts that do many things that I do not need.
Please Help!
Change Text Color On Dynamic Menu ?
Hi,
I have a menu text dynamically loaded from external data. It duplicateMovieClips on stage.
The thing that does not work is the onRelease statement. The new color is not applied.
All others (onRollover, onRollout), works perfectly.
How can I set the new color to the text menu when we press on it ?
Here is the AS code on the MC that is duplicated:
Code:
mcbase = new Color(this);
orig = "0xFFFFFF";
overSt = "0x980F08";
this.onLoad = function() {
mcbase.setRGB(orig);
}
this.onRollOver = function() {
mcbase.setRGB(overSt);
}
this.onRollOut = function() {
mcbase.setRGB(orig);
}
this.onRelease = function() {
mcbase.setRGB(overSt);
}
Change Text Color On Dynamic Menu ?
Hi,
I have a menu text dynamically loaded from external data. It duplicateMovieClips on stage.
The thing that does not work is the onRelease statement. The new color is not applied.
All others (onRollover, onRollout), works perfectly.
How can I set the new color to the text menu when we press on it ?
Here is the AS code on the MC that is duplicated:
Code:
mcbase = new Color(this);
orig = "0xFFFFFF";
overSt = "0x980F08";
this.onLoad = function() {
mcbase.setRGB(orig);
}
this.onRollOver = function() {
mcbase.setRGB(overSt);
}
this.onRollOut = function() {
mcbase.setRGB(orig);
}
this.onRelease = function() {
mcbase.setRGB(overSt);
}
If Statement Help - Change Text Color Depending On Dynamic Text
I am trying to change the color of my dynamic text depending on what the actual dynamic text is... for example, if my dynamic text is "This is Red" I want to set the color of the text to #FF0000. Here's the code, just doesn't seem to be working... any help?
Code:
MyTextBox_txt.text=this.MyDynamicVar;
if (this.MyDynamicVar="This is Red") {
MyTextBox_txt.textColor = 0xFF0000; // Make Text Red
} if (this.MyDynamicVar="This is Green") {
MyTextBox_txt.textColor = 0x00FF00; // Make Text Green
} else {
MyTextBox_txt.textColor = 0xFFFFFF; // Default Text to White
}
Thanks for everyone's help!
Dynamic Text Field Won't Change Color When Hovering
Hi,
I attached my .fla file (I think) which contains the problem.
It contains a dynamic textfield with hyperlinks. I want this link to change its color when a rollover occurs.
I thought I could just swap the last frame of my MC with a graphic which contains the rollover, but this doesn't work and I can't figure out why
Color Change And Autosize On Dynamic Text Field
I have a script that loads a .txt file to a dynamic textfield. I need to have the text change in color when the mouseover. I've created a button out of that textfield and created its rollover state. It works fine, but then i also need to automatically resize the textfield to fit nicely with the amount of text loaded.
It works fine with autoSize property if the textfield is not inside a button. But once i put the textfield inside a button, it doesn't work.
This is what i have:
a dynamic textfield inside a button inside a movieclip.
The scripts on root timeline:
Code:
loadVariables ("txtFiles/clientNames.txt","myClip");//this loads fine
_root.myMovieClip.myButton.myTextField.autosize = left;//this doesn't work
Help anyone? Or is there an easier way to have the text color change when mouseover a dynamic textfield?
Thanks in advance,
OnRollOver Font Color Change Of Dynamic Text
I have a movie clip that is acting as a button and the text is being pulled in by from an XML file. This text will be a clickable link. I'd like to change the color of the text in an onRollOver function but it's not working. Any suggestions?
I've tried:
Code:
myFormat_fmt = new TextFormat();
myFormat_fmt.color = 0xE50000;
mod1Pop.onRollOver = function() {
mod1Pop.mod1Title.setNewTextFormat(myFormat_fmt);
}
and it doesn't work. also tried putting that in the actionscript of the movie itself with no luck.
Dynamic Text Filed And Font Color Change.
How can i change font color in dynamic text box. Text is loaded from xml.
And i want to make thisway that when user rolls over this text box, or mc over this text box then font color change.
How To Change Dynamic Text Color Of Bullet Points
Hello,
Can someone please help?
I have added bullet points to my dynamic text in XML file, and can't seem to get them to be any other color than black.
Here is the code that is within the XML file:
<P><FONT FACE="Arial" SIZE="20" COLOR="#FFFFFF"><li>played with Clark and Pete when they were kids; Greg's dad built him a treehouse; never called Clark or Pete after parents got divorced</li></font></P>
The text is correctly displaying in white, however the bullet points are black.
Does anyone have any advice on how to change the color of the bullet point from black to white? Or is there another alternative.
Thanks in advance.
How To Change Color Of Dynamic Text Depending On Variable? Help Needed
I want to change the color of a dynamic text box depending on the variable's value.
For example, I have a dynamic text variable named "status1" which has a value that is loaded from a text file. If the value is "Yes" of status1, then I want to the color of status to be GREEN, if the value is "No", then I want to color to be RED.
Here is what I have right now (though it doesn't seem to work):
loadVariablesNum("data.txt", 0);
//THIS IS THE DATA INPUT FILE
if (status1 == "no") {
_root.status1.color = green;
}
Thanks.
Change Background Color
Greetings, can you change the background color of a movie by using actionscript and also have the new color fade in slowly? Would like to do this without clicking on a button. Thanks.
How Do You Change The Background Color
Can someone please tell me how to change the background color of a movie clip w/ actionscript? I swear I've seen the answer to this in another post, but I can't find it or figure it out! I'm quite handy when it comes to changing the color of an MC but I don't want to cheat by using an MC to fill the background.
Thanks.
How To Change The Background Color?
hi there I need a function that will change the backround color of my flash file. I tried a lot of this but none worked. I suppose someone will know here about this.
I have a flash file and I want to change the background dynamicaly the file will be on full screen but the actuall content will be centered, thus I want to change not only the contents background but the whole screen.
thanks in advnace
dimitris
How To Change Background Color?
I know it's possible to change your flash document's background color by going in the property inspector, but I'd like to know if there's actually a way to change it by actionscript?
Background Color Change?
Hey, I have a sort of simple question but it's hard to find a solution for it (well for me) I have a background that i want to change colour on every page ie. home = blue, about = pink, work = orange, contact = purple. For an example of what i'm after check out this site. http://www.earforce.nl
Does anyone know how to achieve this effect? is it the hue color change dynamically or mc alpha fades? I'm stumped
Thanks.
ps. im using flash 8
How To Change MC Background Color?
hi, everyone
It's the first post here.
I loaded a extern swf in the stage.
now I wanna to change its background color(not include the swf's border)
can anybody help me?
I am a newbie, any help will be very appreciated.
thanks.
btw, I can change the extern swf's color with ColorTransform class.
but it changes everything, including border's color and the background color.
the border and background are mixed together, I don't want that one.
so, can we have any other solution?
|