Skip to main content
Known Participant
April 13, 2009
Question

load and unload events

  • April 13, 2009
  • 1 reply
  • 493 views

hi,

i want make a flash application for web in which when someone open the page which contains my flash, at that instanse a load event should be called and when someone closes the window or change the site, it unload things..means a unload event must be called......

how to achieve that....??

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
April 13, 2009

code placed on the first frame of your fla will execute when the first frame of your swf loads.  so, no special load event is needed.

there is no justbeforeclose event in flash so you must use javascript to detect that and you can use the externalinterface class to communicate between flash and javascript.