# Layers, javascript, and actionscript

**URL:** <https://forum.kirupa.com/t/layers-javascript-and-actionscript/174429>\
**Category:** flash\
**Created:** [January 5, 2006, 4:53pm UTC](https://forum.kirupa.com/t/layers-javascript-and-actionscript/174429 "2006-01-05T16:53:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![metazai](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/metazai/32/1509_2.png) [@metazai](https://forum.kirupa.com/u/metazai)\
**Post date:** [January 5, 2006, 4:53pm UTC](https://forum.kirupa.com/t/layers-javascript-and-actionscript/174429/1 "2006-01-05T16:53:05Z")

</div>

Greetings!

Trying to get the last frame of my javascript to replace the layer my flash is in with a static html layer on the page.

Here’s the layers:

```auto
 
<style>
#flashopen {
 position:relative;
 width:906px;
 height:471px;
 z-index:1000;
 left: 0px;
 top: 0px;
 visibility: visible;
}
#Layer2 {
 position:absolute;
 width:906px;
 height:471px;
 z-index:1000;
 left: 0px;
 top: 0px;
 visibility:hidden;
}
</style>

```

Here’s the actionscript:

```auto
getURL("javascript:flashopen.style.visibility=none;"); 
getURL("javascript:Layer2.style.visibility=visible;");
stop();

```

As to the error, Firefox says flashopen and Layer2 are not defined. IE says ‘visible’ is undefined.

I’m confused, and need another few sets of eyes on this. Any help or comments would be appreciated.
