Click to See Complete Forum and Search --> : Using HTML Javascript from a Flash Movie


Trevor
10-20-2003, 09:32 PM
Hi all.

What I have is a JavaScript msgWindow=window.open..... command that is in the .html document. Also there is a flash movie that loads (it's a button pannel).

What I want to happen is when one of the buttons is clicked in the Flash movie, I need the msgWindow function in the .html file to called.

Do I need to send a "message" from Flash to the .html or can I incorporate the JavaScript into my flash document and take it out of the .html.

Thanks everyone.

Jona
10-20-2003, 09:38 PM
on (release) {
  getURL("javascript:function_name();");
}


[J]ona

Trevor
10-20-2003, 09:51 PM
Thanks alot.

It works perfectly.

Jona
10-20-2003, 10:06 PM
You are welcome.

[J]ona

Trevor
10-21-2003, 09:46 AM
On kindof the same topic.

I tried taking the code I have in the .html function:
msgWindow=window.open("request.html","request",'toolbar=no,width=302,height=450,directories=no,status=no,scrollbars=yes,resizable=no,border=0,menu bar=no');


when I put it into the Flash document like this:
getURL("javascript:msgWindow=window.open('request.html','request','toolbar=no,width=302,height=450,directori es=no,status=no,scrollbars=yes,resizable=no,border=0,menubar=no');");

it works, I get the window to open.

The only problem is that the Flash document resides in the upper frame of the 2 frame .html document. When this function is called, the seperate windows is opened and the upper frame displays a blank page with "[object]" writen at the top. Not sure why.