# DIV ontop of flash

**URL:** https://forum.kirupa.com/t/div-ontop-of-flash/263693
**Category:** web dev
**Created:** [June 18, 2008, 11:32am UTC](https://forum.kirupa.com/t/div-ontop-of-flash/263693 "2008-06-18T11:32:34Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![rollwithit80](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rollwithit80](https://forum.kirupa.com/u/rollwithit80)
#### Post date: [June 18, 2008, 11:32am UTC](https://forum.kirupa.com/t/div-ontop-of-flash/263693/1 "2008-06-18T11:32:34Z")

</div>

Hi Guys,  
I have an embedded flash file that contains a button when clicked displays a div object over the flash file by setting the div visibility attribute to visible. This is done by activating a javascript.

I have also taken into consideration the z-index of the div ad setting the flash to

\<param name=“wmode” value=“transparent”\>

It works fine and the div objects displays over the flash.

However, I have a slide show running in the background, and whenever the slide show changes to the next image the div objects disappears. I’m not sure how to prevent this. Does anyone have any ideas?

Much appreciated.

d:bounce:

---

<div class="post-metadata">

### Author: ![Maqrkk](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@Maqrkk](https://forum.kirupa.com/u/Maqrkk)
#### Post date: [June 18, 2008, 11:42am UTC](https://forum.kirupa.com/t/div-ontop-of-flash/263693/2 "2008-06-18T11:42:19Z")

</div>

Is the slideshow inside the Flash?

---

<div class="post-metadata">

### Author: ![rollwithit80](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rollwithit80](https://forum.kirupa.com/u/rollwithit80)
#### Post date: [June 18, 2008, 11:44am UTC](https://forum.kirupa.com/t/div-ontop-of-flash/263693/3 "2008-06-18T11:44:52Z")

</div>

yes. its inside flash

---

<div class="post-metadata">

### Author: ![rollwithit80](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rollwithit80](https://forum.kirupa.com/u/rollwithit80)
#### Post date: [June 18, 2008, 11:46am UTC](https://forum.kirupa.com/t/div-ontop-of-flash/263693/4 "2008-06-18T11:46:57Z")

</div>

here is a link [http://www.frozenmoments.com.au/](http://www.frozenmoments.com.au/)  
to what i am working on. Sorry there are no loaders yet so it may be a bit slow.

If you click on the cart icon on the side, calls a div over the flash file. You will see it appear till the slide changes,

thanks

---

<div class="post-metadata">

### Author: ![rollwithit80](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rollwithit80](https://forum.kirupa.com/u/rollwithit80)
#### Post date: [June 18, 2008, 12:37pm UTC](https://forum.kirupa.com/t/div-ontop-of-flash/263693/5 "2008-06-18T12:37:33Z")

</div>

btw, the images in the slide show are externally loaded

---

<div class="post-metadata">

### Author: ![actionAction](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/actionaction/32/3987_2.png) [@actionAction](https://forum.kirupa.com/u/actionAction)
#### Post date: [June 19, 2008, 6:00am UTC](https://forum.kirupa.com/t/div-ontop-of-flash/263693/6 "2008-06-19T06:00:38Z")

</div>

I can tell you that at the very least you need your main\_flash.php to have this change

OLD:

```auto
<script>
var xmlHttp = createXmlHttpRequestObject();

```

NEW:

```php
<script type="text/javascript">
var xmlHttp = createXmlHttpRequestObject();
//response must be defined outside of your function calls because you are
//attempting to access it in a function it hasn't been defined in
var response;//This is the import change

```

---

<div class="post-metadata">

### Author: ![rollwithit80](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rollwithit80](https://forum.kirupa.com/u/rollwithit80)
#### Post date: [June 20, 2008, 12:01am UTC](https://forum.kirupa.com/t/div-ontop-of-flash/263693/7 "2008-06-20T00:01:33Z")

</div>

[quote=actionAction;2345423]I can tell you that at the very least you need your main\_flash.php to have this change

OLD:

```auto
<script>
var xmlHttp = createXmlHttpRequestObject();

```

NEW:

```php
<script type="text/javascript">
var xmlHttp = createXmlHttpRequestObject();
//response must be defined outside of your function calls because you are
//attempting to access it in a function it hasn't been defined in
var response;//This is the import change

```

[/quote]

Thanks for the response, I made the relevant changes suggested. I think this fixed the problem for IE browsers as the div probably didn’t appear at all because the ‘response’ variable wasn’t declared. But firefox seemed to ignore this error.

Still by making this small change, it didn’t change or fix what I am trying to achieve. My div still appears on top of my flash, however, the slide show still makes the div disappear when the slide show changes image. It pushes the div behind.

Thanks

d

---

<div class="post-metadata">

### Author: ![rollwithit80](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rollwithit80](https://forum.kirupa.com/u/rollwithit80)
#### Post date: [June 22, 2008, 11:51am UTC](https://forum.kirupa.com/t/div-ontop-of-flash/263693/8 "2008-06-22T11:51:22Z")

</div>

More to the point. Is it possible to have a div object over an embedded flash object that wont hide when an event or action occurs inside the embedded flash file? If so can someone show me an example?

thanks

Daniel
