PDA

View Full Version : Changing HTML page properties


bkrenzer
07-22-2004, 11:47 PM
I want to change the bgColor of my HTML page from inside my flash movie but don't know JavaSript well enough to figure it out.

I am a designer very versed in ActionScript but am at loss when it comes to JavaScript.

Any ideas on how to do this?

Even if you just give me the JavaScript I should be able to figure out how to apply it to my flash movie. Obviously, I am looking for the widest possible browser support.

thanks

Cota
07-23-2004, 02:27 AM
This should help, javascript code:

backColor[0] = '#FF0000';
backColor[1] = '#00FF00';
backColor[2] = '#0000FF';
backColor[3] = '#FFFFFF';


function changeBG(whichColor){
document.bgColor = backColor[whichColor];
}


and to run the function from flash:

getURL("javascript:changeBG(2)");