Flash color change?
- Started
- Last post
- 5 Responses
- jevad
Anyone here got any leads on how I would go about changing the bg of a flash movie, and also changing the bg of the supporting html page to the same color at the same time?
- versa0
an easy way would be to use a function like this ( writing fast sorry )
//------------------------------...
function changeBgd(whichColor){
var bgdColor = new Array();bgdColor[0] = "#555555";
bgdColor[1] = "#006688";
bgdColor[2] = "#eeffff";document.bgColor = bgdColor[whichColor];
}
//------------------------------...in your html holder page, and call it from the .swf in question ...then in the past i have just emulated a seamless change between bgd of html page, and bgd of .swf, by setting a full span MC the width and height of my stage, and colored it the same as my html bgd .... then just use a pre-built setRGB based function to change the .swf's bgdMC accordingly at the same that you call the js function
there should be a Stage.color property to use, shouldn't there?
- jevad0
niiiiiice.....
^_^
Hitting WP for first lifts tomorrow morning dude : )
- versa0
i might see you there .... did that make sense ?
- jkosoy0
you could always make a MC of a rectangle the size of your stage aligned at 0,0 and then just use myMovieClip.beginFill (i think thats the command).
wait...
can't you make a swf transparent, at least for IE on PC (which is like 90% of whats being used out there anyway)? in that case, just use a JS function to pick a random BG color and the flash movie will react accordingly.
- jevad0
shit dude if you're gonna be there for reals let me know and lets hook up...