# Javascript & flash

**URL:** <https://forum.kirupa.com/t/javascript-flash/30402>\
**Category:** flash\
**Created:** [September 8, 2003, 12:02pm UTC](https://forum.kirupa.com/t/javascript-flash/30402 "2003-09-08T12:02:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alimirza](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@alimirza](https://forum.kirupa.com/u/alimirza)\
**Post date:** [September 8, 2003, 12:02pm UTC](https://forum.kirupa.com/t/javascript-flash/30402/1 "2003-09-08T12:02:56Z")

</div>

I’ve found that script which changes the bgcolor of html background.

```auto
<script language="JavaScript">
<!--//The function is quite simple, it takes one argument, "newBgColor" 
//and passes it as the value of the "bgColor" property of the "document" 

objectfunction changeBgColor(newBgColor) {
	if (window.document && 
window.document.bgColor) {	
	document.bgColor = newBgColor;
	}}--></script>

```

[AS]  
on (press) {  
getURL (“JavaScript:changeBgColor(’#336600’)”);  
}  
[/AS]

is it possible to change background images instead of colors?  
If yes could you please help me out here.

Thanks.  
:run:
