View Full Version : Help with Showing/Hiding DIVS from within Flash

05-05-2007, 02:01 PM
Hello all,

I'm a web designer, but don't take an awful lot to do with the code and rarely do any Flash stuff. I can use a bit of Flash and do some basic animation... Using Flash MX

My problem:

Have a Flash movie with some buttons in it. This is embedded in a HTML page which has a few Layers in it. I want the user to be able to click the button from within Flash and for this to make the DIV in the HTML visible. I also need it to hide any other DIV that is visible. Basically it's a Flash map with dots on it, when the user clicks a dot it will bring up a DIV in the HTML with the address on it. There are about 50 of these dots so naming all the DIVS to close inside the Flash button is not something I want to be doing.

I'll tell you what I had done. I worked on this project a year or so ago and had some of it working. Now I've come back to it, it doesn't seem to be working anymore. I think I may have altered some things...

What I did was had a HTML page with some DIVs in it with graphics and some text. I gave the DIVs id's, say 'test' for instance and then on the buttons in flash I put in

on (release) {
getURL("java script:showDiv('test')");

This doesn't seem to be working now. Also set the wmode to transparent in the embedded flash file in the HTML. Although this was working before it didn't solve my problem of closing this or other DIV's if I was to click on another button in Flash.

Help would be greatly appreciated.


05-06-2007, 05:12 PM
Ok weird one...

It works only when its live. It wasn't working when I tried it locally... However I do still have a problem that I can remember always having from I started doing this. If I click and show one of the DIV's and then close it using the close button I have in the DIV itself its grand, then I can do this again and its grand, but on the third time of trying when I click on one of the buttons instead of showing a DIV it goes to a blank page? If I refresh I can start all over again. If I do not close the DIV's I can keep clicking the buttons and showing all the DIV's no problem.

Anyone any ideas?