ActionScript 2.0 :: Dynamic Changing Movieclip Color And Text Color?

Jul 28, 2009

I have a movie clip where it contains an instance of text

I able to change the movie clip and text color individually

but when i try to change both at once the text color is same as movie clip color

ActionScript Code:
myColor = new Color(myMovieClip);
myTextColor= new Color(myMovieClip.myText);

[Code].....

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Changing Text Color & HTML Background Color

Jun 18, 2009

So i'm working on this website and I want to be able to switch out the entire color scheme on the website everytime a button is pressed, I've stepped away from flash for awhile and actionscript 3 is new me. Plus I haven't quite found any truely useful stuff on forums yet.
 
What i can't figure out is when a button is pressed the HTML background color changes to one of 5 preselected colors (that alternate ever time the button is pressed). Then for each background change the text changes too as it is part of a entire new color scheme.
 
What I've managed so far is to change the color of the background thats within the Flash file. What i did was to make a movie clip that plays to a next frame and stop everytime the button is pressed. Now i just need to also get to change the HTML color and the font colors.
 
//"homeText" being the name of dynamic text field and "Button" the name of the button and "background" being the movie clip that is the background within the flash file.
  
Button.addEventListener(MouseEvent.CLICK, Button_CLICK);
function Button_CLICK(e:MouseEvent):void{
background.play();    homeText.TextFormat(color "0x000000");}
  
I'm not sure if my code is just sloppy or if i'm completely going the wrong route here.

View 1 Replies

ActionScript 2.0 :: Changing Dynamic Text Color?

Nov 23, 2005

I have an array made up of nodes pulled from an XML file. Is it possible to change the text attributes (i.e. color or alpha) of one of these chunks of text.

So a very typical situation. XML is loaded into arrays. The text is loaded with a for loop into an empty movieslip. Looks like this:

text_obj.xmlNode1[n]

So lets say I want to do something to the color of array position 1. I set up a little function....

dummyButton.onPress = function(){
text_obj.xmlNode1[0].color = 0xff0000;
}

Seems like it should work, but doesn't Can I do this with dynamic text? Is there a workaround? I basically need to call out portions of the text during an animation. Think animated text highlighting.

View 2 Replies

ActionScript 1/2 :: Changing The Color Of MC Changes The Color Of The Text?

Dec 16, 2009

My buttonMC is build of:

1. shape (a rectangle gray color) converted to MC named = Bar

2. (on top of 1) DynamicText named = buttonText converted to MC named = buttText in order to change the color of the shape I decleard a veriable
 
cButton = new Color(this.Bar);
 
I then add actionscript onRollOver
 
cButton.setRGB(nRed << 16 | nGreen << 8 | nBlue);
 
but it also changed the color of the text so I added a veriable for the text field
 
tButton = new Color(this.buttText.buttonText);
tButton.setRGB(0xFFFFFF);but that didnt help

this is bad becuse the text on the screen is unseen.

View 5 Replies

ActionScript 2.0 :: Dynamic Text Field - Changing Color Of Some Words?

Aug 10, 2010

Is it possible to change part of the text in a dynamic text field using Actionscript? For example can I change the color of some words that are in the middle of a sentence?

View 5 Replies

ActionScript 2.0 :: [Flash 8] Changing Color Of A Dynamic Text Field?

Feb 13, 2008

I have a xml menu bar with the menu titles in black. This titles are loaded from an xml file into a dynamic text field inside a movieclip. Well, i would like to set the color of the menu items to red when clicked and back to black when any other menu item is clicked. I know there is a way with actionscript (i have been going on circles around the color class the hole afternoon ) but i cant find it (i admit, im quite a dummy with AS).

View 2 Replies

ActionScript 3.0 :: Changing Color Of Text In A Movieclip On Click?

Feb 4, 2010

I'm looking to change the color of text in a movieclip when the user clicks it(IE it'll turn red for wrong, and green for correct). I've set it up so it can do other things, like gotoAndPlay, I just can't get it to change color. Here's what I've got so far for AS. The movieclip on the stage with the text in it is called q1, for question 1.

Code:
stop();
q1.addEventListener(MouseEvent.MOUSE_DOWN, navPress);
function navPress(event:MouseEvent):void{

[Code]....

View 3 Replies

ActionScript 2.0 :: Make A Dynamic Text Boxes Border A Certain Color Along With Background Color

Oct 18, 2003

How would I make a dynamic text boxes border a certain color, along with background color.

View 1 Replies

ActionScript 2.0 :: MovieClip Menu - Changing Color Of Text OnMouseOver

May 16, 2004

My menu(code is by scotty)has 3 movieclip buttons, with text. I broke apart the text to change the color onMouseOver. Problem is the button only works when the mouse is pointed over the actual text, so it doesn't work properly, because the text is obviously very small. I can't put a "field" behind it, because it will become part of the MC, and thus will change color.
Here's the example: [URL]
File is here: [URL]

View 2 Replies

ActionScript 2.0 :: Changing Color Objects - Stay The Same Color That User Selected After Going To Another Scene?

Aug 5, 2004

i'm doing a school project of mine and i am having trouble doing the changing color objects. here is an axample of the script that i;m using:

on (rollOver) {
var colorful = new Color("_root.shapes");
colorful.setRGB(0x003366);
}

For this script it does change color, but how do i make it to stay the same color that user selected after going to another scene?

View 2 Replies

Flex :: Changing The Background Color And Border Color On Selection On A Tilelist?

Apr 23, 2010

I am using a tilelist I want to change the border color and the background color of the tile on selection.

View 1 Replies

ActionScript 2.0 :: Changing Lots Of Movieclips Color And Border Color Separately?

Dec 23, 2008

I am in the making of a isometric level editor, and I have about 15 movie clips with more to come. I want to let people change the color of tiles to what they want from a list of colors, so how can I let them change the color of a tile dinamicly with actionscript so that it changes a tile's color while preserving changes of "shadows"? I mean I have let's say a cube and to make it look 3D I need to change each face to make a feeling of 3D and not a flat one.

View 1 Replies

ActionScript 2.0 :: Interactive Coloring Book - Large Blank Box At The Top Of The Color Pallet Isnt Changing Color?

Apr 27, 2009

i have been doing this tutorial http:[url]..but i am stuck on PART 8, i have done everything the tutorial has said so far (although my image and the colors used are different) but the large blank box at the top of the color pallet isnt changing color when i click on any color from the pallet.

Also this tutorial doesnt say what version of flash and actionscript is best suited for this.Currently i am using CS4 & Action Script 2.0 but i don't know if this is correct. below there is a link to the fla. file that Coloring_Book.fla.

View 1 Replies

ActionScript 2.0 :: Way To Change The Color Of An Object WITHOUT Changing The Color Of A Glow?

Sep 22, 2011

I have a few movie clips that change color when they are rolled over and rolled out of which is great and works correctly but now I have add glows to those buttons to serve as borders or a stroke and when you roll over the buttons the color and the filter color changes.

View 3 Replies

Flex :: Color Of Icon When Changing Color Of Button?

Sep 16, 2011

I have a button with an icon. I want to have the button in gray so I change the chromeColor but when I do that, the icon became darker.On the left the button without changing the color, on the right, the gray button with and darker icon.How can I have a gray button without changing the icon color?

View 2 Replies

ActionScript 2.0 :: Changing Color Of Each Letter In Dynamic TextBox

Sep 19, 2007

I have a problem changing the colour of text in a dynamic text box. I have created a dynamic text field with the following text in it: jjj fff jjj fff. I then have an input text box below it. The user has to type the letters it sees in the text box above. If the user types a j the text in the textfield turns green, to indicate that the user entered the correct letter, if the user inputs the incorrect letter in comparison with the text above the text above (e.g: turns red.).

I want to program the text in the text field so that only the letter that they were supposed to type turns either green or red, depending on whether they typed the correct letter in the input box. For example. if the user inputs a 'j' in the input box, the first j in the text field above, will turn to green, then if the user types in an f, the j in the text field above will turn to red, as the user was supposed to type a 'j'. How can I control each letter colour of the textfield.

View 8 Replies

ActionScript 3.0 :: Dynamic RSS Viewer - Changing Label Color

Feb 24, 2010

I am building a dynamic RSS viewer in actionscript 3. I wrote a flex application to create the xml code, now I load the xml into my flash application. Now the user of my flex app can pick a color for a thread. I import this hex value into flash to assign a background color of a movieclip. The problem is that the movieclip also has dynamic text in it. With my function changeColor() I seem to be changing this font color as well. I have tried to solve it by using a TextFormat but no luck.

Code:
for each(var channel:XML in rssInfo.channels.channel){
var menuItem:MenuItem = new MenuItem();
changeColor(menuItem,channel.color);
menuItem.x = 512 + i*120;
menuItem.y = 718;
[Code] .....

View 2 Replies

ActionScript 3.0 :: Changing Color Of MovieClip With CSS

Dec 1, 2010

I am just looking for something that " Is it possible to change the color of a movieclip through css"? I can use css for changing text color but how I use it for movieclip.

View 7 Replies

IDE :: Changing The Color Of A Text?

Jan 9, 2009

I want my text change if the answer is true ..I have the following line but it doesnot work

PHP Code:
_root["sonuc"+i].htmlText='<font color="red">good job</font>';

View 1 Replies

ActionScript 3.0 :: Changing Color Of MovieClip To Gradient

Jul 8, 2009

I was wondering if there was anyway of changing the internal colour of an mc to a gradient?

View 3 Replies

ActionScript 2.0 :: Changing MovieClip Color On Stage

Aug 30, 2011

I have a problem, no I already have the code and here is what I am using (MC is the original movieclip on the stage while MC1 and MC2 are child movieclips within MC)

Code:
var ob1color = new color("_root.MC.MC1");
var ob2color = new color("_root.MC.MC2");
ob1color.setRGB(0x00FF00);
ob2color.setRGB(0x00FF00);

That code works perfectly fine it's just that if I animate MC1 and MC2 within MC it doesn't work I would have to group those 2 into a seperate movieclip called MC3 in order for the animation to work. I mean it's great I found a way around it but is there anyway to NOT have to have that MC3 in order for the animation to work? Because working with so many Movieclips can get so annoying this is my hierarchy.

Code:
[Stage] > [MC] > [MC3] > [MC1 MC2 animation]
That MC3 is an un-needed movieclip other than to work the animation. Is there any way I can fix that? I Also have to change the code to look like this
Code:
var obcolor = new color("_root.MC.MC3");
It's looking like you can't apply a color change AND animate an object.

View 7 Replies

ActionScript 2.0 :: Return MC To Original Color After Dynamic Color Change?

Apr 21, 2005

How is it done? All I've seen on the web is how to change the color. Well how about going back. I'm talking about a MC with many colors. I can't just change back to a single hexadecimal color.

I can accomplish the change as it passes over a frame, but I can't get it to change back.

In the frame is this:

Code:
cHurtColor = new Color(_root.compMC);
cHurtColor.setRGB(0x00FF33);

View 6 Replies

ActionScript 2.0 :: Return MC To Original Color After Dynamic Color Change

Apr 21, 2005

All I've seen on the web is how to change the color. Well how about going back. I'm talking about a MC with many colors. I can't just change back to a single hexadecimal color.I can accomplish the change as it passes over a frame, but I can't get it to change back.[code]

View 6 Replies

ActionScript 1/2 :: Changing The Color Of A Movieclip With A Variable Sent From Javascript?

Jan 11, 2010

I'm trying to change the colour of a movieclip.I want to send a variable from Javascript within the html that the swf will be embeded in.I'm not quite sure where to start with this but this is my code:
 
[code]...

View 3 Replies

ActionScript 3.0 :: How To Add Bevel Filter On MovieClip After Changing Color

Dec 13, 2011

When I change color with
var blue:ColorTransform = new ColorTransform();
blue.color = 0xFF00B8E7;
MovieClip.transform.colorTransform = blue;

I add this
var myBevel:BevelFilter = new BevelFilter();
myBevel.type = BitmapFilterType.INNER;
myBevel.distance = 3;
myBevel.highlightColor = 0xFFFFFF;
myBevel.shadowColor = 0x000000;
myBevel.blurX = 5;
myBevel.blurY = 5;
MovieClip.filters = [myBevel];

The result is, only color changed. How can I add this bevel over or on the new color that I changed? It seems like that the bevel takes all colors as the new color that I changed, not taking the one I specified
myBevel.highlightColor = 0xFFFFFF;
myBevel.shadowColor = 0x000000;

View 0 Replies

ActionScript 3.0 :: Changing Text Color On Mouse Over?

Apr 9, 2009

I think I'm really close to getting my multiple choice question to work! Here's what it does:

1) Read my question, possible answers, and correct answer key from XML.

2) Print the question, 4 answers, and 4 radio buttons on the stage.

3) Clicking the submit button on the stage, checks the answer. The user gets feedback based on whether they are right or wrong.

1) When the user mouses over an answer, I want to change the text color.

Currently, only the color of the last answer is changing colors, and it's changing colors if I mouse over any of the answers.

Here's my code:

Code:
import fl.controls.RadioButton;
import fl.controls.RadioButtonGroup;
var qLoader:URLLoader = new URLLoader();

[Code].....

View 1 Replies

Actionscript 3 :: Changing Partial Text Color

Oct 19, 2011

I've got a string in AS3 composed of two elements that is dynamically assigned to a textField. I want to make one element one color and the other a different color. Code below: allInfoForSchedules = data[j].weekDay + " " + data[j].scheduleType + "."; I can make the entire string change color but not just one part of it.

View 1 Replies

ActionScript 2.0 :: CreateTextField And Changing Text Color

Apr 13, 2007

What I am trying to do is: have a dynamically created text field change color when i roll over a movieclip. This is what I have: a movie clip with this code:

Code:
this.createTextField("header", 99, 10, 10, 100, 300);
header.autoSize = true;
header.embedFonts = true;
var my_fmt:TextFormat = new TextFormat();
my_fmt.size = 50;
[Code] .....

The dynamically created textfield (lets call it "header") works fine. However, i cannot seem to get the text field to change color once you roll over the instances. I've tried using "
Code:
on (rollover) {
this.header.textColor = 0xFFFFFF;"
}
but no such luck....

View 4 Replies

ActionScript 2.0 :: Changing Color When Getting Echo Text From PHP

Oct 11, 2007

I am trying to change the text color when getting echo text from php:
Have defined in MC a dynamic field: EmailStatus
"Submit" back command from php:
Code:
lv.onLoad = function() {
_root.pages.Mail.EmailStatus = this.msg;
};

And echo from PHP
PHP Code:
echo "&msg=Your mail was sent";
How can I make "Your mail was sent" another color instead of already chosen color for that field?

View 3 Replies

ActionScript 3.0 :: TextField Text Color Changing (not Animated)

Apr 24, 2009

Say I have a class that extends TextField and I want to have it set a default text color to black (0x000000) when initiated. Easy enough. But then say, when the XML finishes loading and the user has decided to change the color of that textfield to red (0xFF0000), what would be the easiest way to change the text color of that field? The only way I can think to do it is to change the textformat color via public method? Would this be correct or is there an easier way?

[Code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved