ActionScript 3.0 :: Change MovieClip Background?
Dec 5, 2011
this is a movieClip with a textField placed over it. I would like to change the movie clips color when clicked, but not the text color.
var myColorTransform = new ColorTransform();
myColorTransform.color = 0xFFFFFF;
mc.transform.colorTransform = myColorTransform;
When I try the code above it changes the whole movie clip color, text included. Is there a way to just change the background movieclip color and keep the text un changed?
View 12 Replies
Similar Posts:
Oct 15, 2009
I have the following package[code]...
1. The class instantiates and adds a number as text on top of the image that I created the MovieClip class from
2. As the main class of the fla rotates images it calls the loadItem() function of each corresponding button.
3. That function starts the timer and, on each tick of the timer, the background image changes.
What is happening right now with this code is that the new image (that I want to be the background image behind the text) is coming in on top of the text.
Is there a way to simply replace the image currently loaded into the MovieClip.
View 2 Replies
Feb 2, 2005
If I have a piece of a function that is telling Flash to:
// show a hover color
var col = new Color(this.background);
col.setRGB(0xf4faff);
How do I tell Flash to call a MovieClip as opposed to setRGB for the background MovieClip?
View 4 Replies
Apr 18, 2010
I am wondering if there is an easy way to allow the user to change the background image on the stage by clicking a button. I have several different background images (they are just different colors, each on its own layer) and I want to have small buttons of each color that can be clicked to change the background to that color.
View 6 Replies
Oct 25, 2011
i've downloaded flash template, and i would like to change background picture,
View 2 Replies
Oct 25, 2009
I am attempting to change the background of a pre-developed slide show a client sent over. In the attachment the original background is gray (called "back"). I want to change it to the background called "bluebg". It works (somewhat) when I import it to the same layer that the gray background is on and convert it to a movie clip, but it covers up the navigational buttons on the top right side of the movie. It appears that these pieces are a part of the background and not on their own layer, but they are clearly flash elements required to make the show work properly, so I am unable to replace the background with the blue and keep those navigational items. Can someone take a look and tell me what I could be doing wrong? Or better yet what I can do to achieve the feat of apply the new blue background?
View 2 Replies
Jul 17, 2009
i've downloaded flash template, and i would like to change background picture?
View 6 Replies
Jan 9, 2009
Here is my ongoing portfolio. Only the CONTACT and CHINATOWN is functional at the moment. You see when you click between the two how the background on the .SWF changes and not the HTML? How do I make that change as well? I don't want to make a huge movie.
View 8 Replies
Aug 19, 2009
I created a flash application which loads in many other little flash applications (.swf files) based on menu selections. When I change one of the little applications the changes are viewable except when I change the background color.
After the first time I view the application, the background color changes do not carry over to the main app. I run the little ones stand alone and they show the new color, then I run the main app and any other changes I have made are there but not the color change. When I remove the file and the load fails, the old backround color still displays in the container movie clip the .swf was previously loaded into.
I have tried several different options and the only thing that worked was renaming and copying and deleting and making a big mess. There has to be a way to force a refresh of this mysteriously saved color. doesn't there?
View 3 Replies
Nov 19, 2009
when I load an external .swf into my current stage, its background color becomes like the one of current stage.
View 2 Replies
Oct 31, 2010
Developing website using flash CS4. how to change background picture through AS3 .
View 2 Replies
Feb 22, 2006
I finaly got the code I needed to change the colour of my background but it clearly needs altering. At the moment it works but I have to click the button twice for the colour to change. Now for once I see that this makes sense because I have onRelease twice!
This code is on the button:
on (release) {
home_btn.onRelease = function() {
var myColor:Color = new Color (this._root.background1);
myColor.setRGB(0xFF8844);}
However i'm unsure how to alter the code correctly....I assume the second onRelease needs to change to something else? I tried just: home_btn = function() { but am really just guessing.
View 2 Replies
Jun 6, 2003
I got this code from Kax. This allows me to change colour of my background. This use to work on my movie but now is just not working anymore!Since i created a button loading a .swf file this has stopped working, Any suggestions anyone?[code]I understand that I have to replace "myMovieClip" with the name of my clip!
View 14 Replies
Mar 17, 2007
I'm trying to change background colour
var color:Color = new Color("stage");
color.setRGB(0x000000);
its currently purple, how come it doesn't change
View 5 Replies
Apr 17, 2007
I want to make 2 buttons and when 1 press the first the Background Color be blue and bypresssing the second the background will be green
View 2 Replies
Oct 2, 2010
I often use white text which is nearly impossible to see with the default white background for the text editing box. There must be a way to change it, but i have spent many hours looking for it.
View 1 Replies
May 16, 2009
I'm new to flash in general, and wanted to try making a game using it. It's surprisingly addicting (I've gotten to the point of having an endlessly scrolling background with a moveable ship) but am having some trouble.I am currently making my first flash-based game using actionscript 3.0. However,I've come across a hurdle that I have not overcome: changing stages.I am making a SHMUP (it doesn't look very good, but I'm making it for experience) which has everything going from left-to-right ala R-Type.I have an endlessly looping background, but at the end of the stage I want to change the background, as well as all the enemies (they get upgraded per level) and enemy spawning positions.
how to change my background to simulate a different stage?how to make the new stage's spawn points different from the old one? Do I need to use another .as file for it, or do I just need to modify the code I have
View 3 Replies
Nov 8, 2009
how can i change accordion menu bar background or text ?
View 5 Replies
Feb 11, 2010
I'm trying to find out if there is a way to get an animation to stream in the background and not reset or change when there is a frame jump or scene change. I just want it to become the permanent background.Kind of the way a sound can be set to loop and stream non-stop so long as you don't go back to the frame in which the sound started.
View 3 Replies
Dec 30, 2008
We I have a preloader that plays behind my transparent movie clip and I want to change the stage to black
when I go to Full Screen. From what I have found most people use a black box but that won't scale in FS.
So does anybody have another solution for changing the background color with AS.
View 10 Replies
Jun 28, 2006
I just went through the ActionScript tutorial for the jigsaw puzzle found here: [URL] I would like to change the image used for the background and the puzzle pieces, and am running into problems. I can change the background for the work area with no problem, but the puzzle pieces are still displaying the original artwork.
View 6 Replies
Aug 13, 2010
I am building a website in flash and was wondering if it is possible to change the background size for each page of a website that I build in Flash?I know how to change the template background etc. but I changed the background size to a bigger size on page 3 and now the whole site is like that.
View 2 Replies
Oct 26, 2010
I have a moviclip and I want to change its background color on mouse over event. I think that I have to use ColorTransform, but I've not understood how to use it, I've not understood how the multipiers and offsets work. At beginning the background is #000010, I want to change it to #000030. The moviecip's instance name is borse_mc, how to apply the change to it?
View 2 Replies
Jan 13, 2011
I'm looking or a way to change my HTML background color trough Flash. here is the code i'm using
[Code]....
View 3 Replies
Aug 30, 2011
I can't change background color on mouseover.I dont know if the right code isdocument.getElementsByTagName("a").style.backgroundColor = "#FFFFFF";
HTML & CSS:<span></span> inside the </a> tag does not work, so I am forced to use <div> to label the buttons.I just use 669px instead of 666px so that you can see the pixel difference. I just want the<div id="nav"> content right aligned but if I don't use float everything gets inheritedbackground color and also gets unstructured, if I use float the buttons get reversed, is there an alternative way because this could cause cross browser problem.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en-US">
<head>
[code]....
I dont't want to overoad the css, thats why I have not use unordered list.I have a preference for table tag because it is older than div tag.
View 3 Replies
May 24, 2010
I am quite new to AS3 and I have never worked with classes, so I am encountering a couple of problems.
I'd like to center a movieclip, have it so that it doesn't scale. And then I'd like to add a background color that stays there no matter how I scale the browser.
Can someone please explain me this in babysteps? Since I don't know how to implement a class and make it work with my fla.
View 2 Replies
Aug 7, 2010
I am using pure AS3 to build my project. I was wondering if there are anyways to change the stage background color through AS3...
View 5 Replies
Sep 6, 2010
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:
View 2 Replies
Oct 7, 2010
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?
View 2 Replies
Oct 16, 2010
A standard Flash CS5 document with one layer called background. The document is associated with a class called 'Game' which extends MovieClip.
I am executing some logic in the 'Game' class after calling an 'Initialize' method.
I want to change the background color of the document at runtime to something else (e.g., a different color, a gradient, or a picture).
View 3 Replies