Calling JavaScript Using getURL

Let's start simple. Say we have a Flash movie with a single button on it. This Flash movie is on a very simple Web page with a little JavaScript function in it. Let's take a look at the Web page in Example 19-1.

Example 19-1. Simple Web page
 <html> <head> <title>JavaScript and ActionScript</title> <script language="javascript"> function showAlert() { alert("zap"); } </script> </head> <body bgcolor="#336699"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=550 HEIGHT=150> <param NAME=movie VALUE="javascript1.swf"> <param NAME=quality VALUE=high> <param NAME=bgcolor VALUE=#336699> <embed src="javascript1.swf" ...

Get Advanced JavaScript™: Insights and Innovative Techniques now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.