Hello,

I have a button in an swf that calls a javascript function within my pho page that opens a lightbox2 overlay and plays a video that's hosted on vimeo.

I am having issues with firefox and chrome; the lightbox starts to open, but then the URL opens and plays the video in fullscreen, not the lightbox window/overlay...

Here is the code; which I found on the web...

This is the code I place on the PHP page:

Code:
<script type="text/javascript">
function openLightbox() {
fireEvent(document.getElementById("videooverview"),'click');
}

function fireEvent(obj,evt){
var fireOnThis = obj;
if( document.createEvent ) {
var evObj = document.createEvent('MouseEvents');
evObj.initEvent( evt, true, false );
fireOnThis.dispatchEvent(evObj);
} else if( document.createEventObject ) {
fireOnThis.fireEvent('on'+evt);
}
}
</script>
This is the code for the link to the lightbox:

Code:
<a href="myvimeoURL" rel="lightframe[overlayWindowName|width:920px; height:540px; scrolling: no;]" id="vidoeoverview"></a>
This is the actionscript I place onto my button in my flash file:

Code:
getURL("javascript:openLightbox();", "_self");

Just some basic info of the environment:
Drupal 6
PHP
Flash file (SWF) saved as flash 10 and actionscript 2.0
lightbox 2 drupal module

Hopefully you can help...

Thanks