On Tue, Dec 9, 2008 at 2:07 PM, wkolcz <[EMAIL PROTECTED]> wrote:
> Can someone show me how to write a javascript function that calls to a
> Flex/AS function before a browser window closes?
>
> In my AS contructor I have:
> if (ExternalInterface.available)
> ExternalInterface.addCallback("tagWithClosed",windowClosed);
>
> I tried something like this, but I don't know how to actually invoke the
> correct function name. The swf is FXVideo.swf, the swf id is FXVideo and the
> .as file is FXVideo.as:
> <SCRIPT LANGUAGE="JavaScript">
> window.onbeforeunload = closingWindow;
> function closingWindow()
> {
> FXVideo.tagWithClosed();
> }
> </SCRIPT>
>
> I would greatly appreciate it if someone could help me write this. Project
> due tomorrow.
Hi wkolcz,
try not to post the same message more than once. If people don't take
the time to answer it is because the information is easily available
on the net. What you are asking is easily found on google. Here is
what I found doing a search on flex + javascript:
http://blog.paranoidferret.com/?p=25
Good luck, and try to search on google before posting your question.
It is faster than waiting for someone to reply.
All the best,
Fidel.