Arg! Desperate! how can I use external javascript files to open a pop up window?

ok, here’s the deal:

despite the fact that I’m way newb at this whole flash business, I’ve been able top put up this entirely flash developed site.

everything’s pretty much done; however, for reasons I won’t be going into now, at some point there was the need to have the images in a gallery popping up and the preferred way to do it would be using a javascript thingy such as lightbox2.

I started doing some research on the subject of how to make it happen using external js files. I came across lots of tuts on using javascript and flash, but very few on how to do so using external files and none of them was very helpful.

if any of you people out there know about a conclusive tut on this stuff, please provide it to me; or if you’re willing to help, even better!, I’m going nuts, desperate and out of time on this.

so basically, I have a button somewhere in my fla file that has this code associated to it

experiencia_btn.onRelease = function () {
getURL(“javascript:lightbox(’ file that will load ')”);
}

I then placed the following code on the html file that bears the swf file (wich is the actual site) in between the head tags

<script type=“text/javascript” src=“js2/lightbox.js”></script>
<script type=“text/javascript”>
window.onload = function(){
lightbox.init();
};
function lightbox(page) {
lightbox.open(page);
};
</script>

I placed the js files in a folder named js2; this js2 folder is in the same “mother-folder” as the html file and the swf file.

I tried it and… nothing happened, really… I’m a bit exhausted and by now I can’t figure out what the hell I’m doing right, wrong or anything in between. :wasted:

please help. thanks!

p.s.: dunno if this is the proper forum to post this particular thread, but thought it could harm to post it here. if by any reason it must be replaced or moved, go ahead and do it.

The fastest reply I can give you is to go to the tutorial
http://www.kirupa.com/developer/flash8/centered_popup_window.htm
that code works fine there, 'been using it for a while without any trouble.

sending you also my own bit of code:

in the .fla on the button

mybutton.onRelease = function() {
getURL(“JavaScript:popupvideo();”);
};

and inside the head of the html file

<SCRIPT LANGUAGE=“JavaScript”>
function popupvideo() {
window.open(‘mysource.htm’,’’,‘toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=370,height=320,left=250,top=100’);
}
</script>