# Change bg color

**URL:** <https://forum.kirupa.com/t/change-bg-color/118266>\
**Category:** Uncategorized\
**Created:** [August 4, 2004, 3:19am UTC](https://forum.kirupa.com/t/change-bg-color/118266 "2004-08-04T03:19:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pixeldude](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@pixeldude](https://forum.kirupa.com/u/pixeldude)\
**Post date:** [August 4, 2004, 3:19am UTC](https://forum.kirupa.com/t/change-bg-color/118266/1 "2004-08-04T03:19:42Z")

</div>

ello everyone…can anyone point to me how to change the bg color dynamically when we press the button as u can see here [http://www.itworks.com.pt](http://www.itworks.com.pt)

hope someone can give a hint…tq… :ninja:

---

<div class="post-metadata">

**Author:** ![dr\_ew](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@dr\_ew](https://forum.kirupa.com/u/dr_ew)\
**Post date:** [August 4, 2004, 3:49am UTC](https://forum.kirupa.com/t/change-bg-color/118266/2 "2004-08-04T03:49:13Z")

</div>

hmmm really nice transitions on that site, but I would think that its not changing bg colour dynamically, but through loadMovie with nice bg graphic in the loaded movie…  
But, say u wanted to change the bg colour, you could make a new mc that covers the entire stage, give it an instance name of bg. then make a button, and put the following code on the button. This code will make it grey.  
[AS]  
on(release){  
myColour = new Color(\_root.bg);  
myColour.setRGB(0xCCCCCC);  
myMC.color  
}[/AS]

---

<div class="post-metadata">

**Author:** ![pixeldude](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@pixeldude](https://forum.kirupa.com/u/pixeldude)\
**Post date:** [August 4, 2004, 6:06am UTC](https://forum.kirupa.com/t/change-bg-color/118266/3 "2004-08-04T06:06:07Z")

</div>

ok…tq dr.ew for the reply…emm i’ll look it to…

---

<div class="post-metadata">

**Author:** ![mjULTRA](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mjULTRA](https://forum.kirupa.com/u/mjULTRA)\
**Post date:** [August 23, 2004, 8:27pm UTC](https://forum.kirupa.com/t/change-bg-color/118266/4 "2004-08-23T20:27:57Z")

</div>

Kirupa recently made a color tutorial that is pretty basic, but explains how to set up this effect. [http://www.kirupa.com/developer/actionscript/color.htm](http://www.kirupa.com/developer/actionscript/color.htm)

I was wondering if there is a small way to modify this, to allow the color change to be a transition between two colors, and not an instant change…

Does anybody have a clue as to how to accomplish this??

---

<div class="post-metadata">

**Author:** ![paddy1](https://avatars.discourse-cdn.com/v4/letter/p/e36b37/32.png) [@paddy1](https://forum.kirupa.com/u/paddy1)\
**Post date:** [August 23, 2004, 8:42pm UTC](https://forum.kirupa.com/t/change-bg-color/118266/5 "2004-08-23T20:42:09Z")

</div>

Couldn’t you just use

```auto
endcolour //or some equivalent as in end_x for movement

```

---

<div class="post-metadata">

**Author:** ![mjULTRA](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mjULTRA](https://forum.kirupa.com/u/mjULTRA)\
**Post date:** [August 23, 2004, 9:26pm UTC](https://forum.kirupa.com/t/change-bg-color/118266/6 "2004-08-23T21:26:29Z")

</div>

Im not sure what i could and couldn’t use, as i am an actionscripting bonehead… however… i found this thread by searching [actionscript.org](http://actionscript.org)

[http://www.actionscript.org/forums/showthread.php3?s=&threadid=25756](http://www.actionscript.org/forums/showthread.php3?s=&threadid=25756)

In the second post, there is some actionscript, as well as a neat little \*.FLA file to download… it solved my problem…

---

<div class="post-metadata">

**Author:** ![Mad\_Flasher](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@Mad\_Flasher](https://forum.kirupa.com/u/Mad_Flasher)\
**Post date:** [August 24, 2004, 9:53pm UTC](https://forum.kirupa.com/t/change-bg-color/118266/7 "2004-08-24T21:53:06Z")

</div>

just add the goto command to your buttons, then send it to the appropraiate frame label were there will be a movie clip that loads the backfround

hope it helps
