;

PDA

Click to See Complete Forum and Search --> : script to change htm b/ground color?


scotland
10-07-2002, 02:07 PM
Hello All!

Q. Can I call a serverside script ( perhaps using getURL ) to change the background color of the .htm file that has my swf embedded into it?

I'm just like that fly walking through the barrel of honey - stuck!

A. ---------------?!?

Would appreciate a little pointer here,

Cheers,

Scott

catbert303
10-08-2002, 07:00 AM
It could be done with javascript

in between the <head> and </head> tags of the page add this function

<script>
function changeBG(col) {
document.bgColor=col;
}
</script>

then in flash you could use something like

getURL("javascript:changeBG('red');");
or
getURL("javascript:changeBG('#ff0000');");

Ilya
10-09-2002, 03:38 PM
Hi !

And why not to say just:

getURL("javascript:document.bgColor='#ff0000'; void(0);");

without editing HTML page ? :)