Flash player notified on browser close or change page (as3)

后端 未结 3 1875
我在风中等你
我在风中等你 2020-12-15 13:20

I have to detect in my flash if the user closes his browser or goes to another page and the flash is not accessible anymore. How do i achieve that ?

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-15 14:08

    You could use a combination of Javascript and Flash to achieve what you're looking for.

    Use Javascript to detect when the user navigates away from the page. Use the javascript event to call into your Flash movie using ExternalInterface. Once your code is called, you can handle the event as needed.

提交回复
热议问题