A JavaScript function should be invoked through Flash' fscommand() method. However, in r13170 and r13244 (the nightlies I tested this in), it is not. A testcase is available at <http://tests.novemberborn.net/browsers/safari/fscommand-redraw/callback-not-working.html>. This bug was observed with Flash 8.0.22.
Created attachment 6997 [details] Contains the testcase linked to in the bug description.
Created attachment 6998 [details] Crash log.
My bad, appended a file to the wrong bug report.
Alert pops up for me using r13150.
I could reproduce with r13247.
Created attachment 7031 [details] proposed fix