Question
action script to change background colour of html page
Hi, I'm trying to create a button in my flash move that would
be able to change the background colour of the html page that holds
it. I have posted this question on another site and someone gave me
this code to use:
<html>....<head>
<SCRIPT LANGUAGE=JavaScript>
<!--
function NEWbg(newcolor) {
document.bgColor=newcolor;
}
//-->
</SCRIPT>
Button action in flash :
on(release){
getURL("javascript:NEWbg('#FFFFFF')");
}
/////////////////////////////
or from flash w/o any code in html :
on(release){
getURL("javascript:document.bgColor='#FFFFFF'; void(0);");
}
The problem with this is that it brings up a dialogue box about flash security settings when you press the button which obviously won't do. does anyone know another method? I'm using action script 1. Thanks in advance.
<html>....<head>
<SCRIPT LANGUAGE=JavaScript>
<!--
function NEWbg(newcolor) {
document.bgColor=newcolor;
}
//-->
</SCRIPT>
Button action in flash :
on(release){
getURL("javascript:NEWbg('#FFFFFF')");
}
/////////////////////////////
or from flash w/o any code in html :
on(release){
getURL("javascript:document.bgColor='#FFFFFF'; void(0);");
}
The problem with this is that it brings up a dialogue box about flash security settings when you press the button which obviously won't do. does anyone know another method? I'm using action script 1. Thanks in advance.