View Full Version : Flash Control HTML BG Image

04-15-2007, 08:51 AM
Can Flash control the bg image on a HTML page? I basically have 6 menu items within Flash and when the user clicks on a new button, I want the bg to change, the bg is inside a the HTML page... I realise I could just add the bg image to the Flash file, but want to keep the combo of HTML and Flash... Any ideas?

04-18-2007, 04:43 AM
I have had success with the externalInterface class. It's not in the regular documentation, but it is online. You can use it to call javascript functions directly from the Flash movie.

04-20-2007, 04:14 PM
Do each of the buttons in your flash link to a new HTML page? If so, why not just change the background through HTML or CSS?

04-20-2007, 04:19 PM
I don't know much about Flash, but Javascript can do this easily.

04-20-2007, 10:46 PM
You could pass variables from flash to html and vice versa using this:

swfsource?mybg=1 in every instance the source is used in the html embed and object tags. mybg would be the variable with a value of 1.

You could then write a javascript function that displays a specified bg depending on the variable passed from flash.

Hope this helps