Groups | Blog | Home
all groups > flash actionscript > april 2004 >

flash actionscript : Can I change Main Background Color?


William Douglas Knak Filho
4/29/2004 9:53:53 PM
Is there possible to change Main Background color dynamically? I have build
a generic Pre-Loader to load my site banners dynamically and randomly, and
when the banners are loading, I show my site logo and a load progress
status... but my problem is that pre-built banners with color background
different form my preloader don't keep they're color and frame rate... so my
Preloader don't work correctly...

sorry by my English... any Ideas? (no for my English, for preloader ;-)

thanks,

--
William Douglas Knak Filho - Analista de Sistemas
DELPHI · INTERBASE · SQL SERVER · ASP · HTML
delphi@via.com.br · www.via.com.br/william
ICQ: 22464714

To think:
"Threre are 10 kinds of programmers: who understand and who don't
understand binary numbers..."


kglad
4/30/2004 1:42:30 AM
you can't change the background color of a movie, but you can accomplish the
same effect as controlling the background color by placing a movieclip (on the
bottom layer of your movie) that covers the stage on the main timeline and
using a color object to control this movieclip's color.
DylanTZ
4/30/2004 9:20:26 AM
Hello

I have two buttons on stage, and two black (0x000000) MCs. One is with the
Instance name part1 and the other part2.

I want to test if part1 is black, then turn it to green, else, if part1 is a
bluish color (0x98A5F5), then turn part2 to green.

I WILL NOT WORK - I HAVE TRIED EVERYTHING

can u please help

CODE: -

on(release){
if (_root.part1 == 0x000000){
myColor = new Color(_root.part1);
myColor.setRGB(0xA5DB84);

}else if (_root.part1 == 0x98A5F5){
myColor1 = new Color(_root.part2);
myColor1.setRGB(0xA5DB84);

}
}

Thanks

Dyl
kglad
5/1/2004 1:08:20 AM
dylan, i already answered that question on another thread that you must have
initiated. use:

on (release) {
if (_root.myc1.getRGB().toString(16) == "0") {
myc1.setRGB(0xA5DB84);
} else if (_root.myc1.getRGB().toString(16) == "98a5f5") {
myc2.setRGB(0xA5DB84);
}
}
AddThis Social Bookmark Button