Note: when running the page as a local file, Flash might flag the ActionScript to JavaScript calls as unsafe, in which case the "security settings for content developers" will need tweaking. This works without warning when the page is on-line.