Despite this documentation to the contrary, Event.EXIT_FRAME does not exist in Flash Player 9/AIR 1.0. It was introduced in Flash Player 10/AIR 1.5. If you are writing a SWF that targets Flash Player 9, attempting to use the Event constant will fail, but if you hard-code the “exitFrame” string, it will appear to work—until you start getting complaints from people that still haven’t updated to Flash Player 10 that your events aren’t firing.

I suppose it raises a question about why one would ever choose to use the EXIT_FRAME event. According to Johannes Tacskovics, the EXIT_FRAME event occurs at the end of the lifecycle of constructing the current frame before it is displayed. This seems somewhat counter-intuitive, in that the name implies that the event would occur just before a frame is destroyed.

Either way, since I was looking for an event that would provide me with the ability to perform frame-exact synchronisation to MP4 video, this event was no more useful than ENTER_FRAME. (Adobe, for some reason, decided not to implement onCuepoint for MP4 playback.) Unfortunately, frame events like ENTER_FRAME don’t appear to correspond precisely to when a video frame is rendered, and Flash’s timers are not precise enough either, so the ultimate result was a player with overlays that were sometimes out-of-sync by one frame. Bad, but not disastrous. Still, it would be nice if there was a way to get frame-exact synchronisation with MP4s. Maybe someday…

0 Responses to this post

There are currently no comments.

Add a comment