There are several ways to run scripts. The most common ways are explained in this section. How To run a script that you are currently viewing or editing: Right-click (Command-click on the Macintosh) and choose Run Script. Click the Run Script icon on the Script window toolbar. This option lets you run a script before [...]
Archive | JavaScript RSS feed for this section
How to Save JSFL files with Flash CS5
May 30, 2010
You can have JSFL scripts available within the Flash authoring environment by storing them in one of several folders within the Configuration folder. By default, the Configuration folder is in the following location: Windows® Vista™ and Windows® 7™:boot drive\Users\username\Local Settings\Application Data\Adobe\Flash CS5\language\Configuration\ Windows XP:boot drive\Documents and Settings\username\Local Settings\Application Data\Adobe\Flash CS5\language\Configuration\ Mac OS® X:Macintosh HD/Users/username/Library/Application Support/Adobe/Flash CS5/language/Configuration/ [...]
How to invoke JavaScript function from a Flash file.
January 5, 2010
Define JavaScript function in HTML page: function coloritem(itemname,itemcolor) { itemname.style.color = itemcolor; } Assign ID to the object: <h3 id=”t1015″ style=”color:#000000;”>How to invoke JavaScript function from a Flash file.</h3> Call JavaScript function in Flash using OnClick action: javascript:coloritem(t1015,’#FF0000′); Export Flash file (“File” > “Export Flash SWF File”) to the same folder where HTML page is [...]
How to Use FSCommand with the browser.
January 5, 2010
FScommand doesn’t work when the movie plays in a browser. FScommand works only with Macromedia standalone projector. This tutorial describes how to create a “quit button” and use fscommand to communicate with the browser Example of fscommand:quit SOLUTION Step 1: Add the following JavaScript handler to your HTML page: <SCRIPT LANGUAGE=JavaScript> <!– function flashMovie_DoFSCommand(command, args) [...]
How to close browser window from a Flash file without prompt.
January 5, 2010
How to close browser window from a Flash file without prompt. Note: In Flash Player 8 this method will give a security warning. Use FSCommand method. Call JavaScript function in Flash using OnClick action: javascript:window.opener=self;window.close(); You can also use: javascript:window.close(); but the browser will prompt to confirm. Creating “Close” button Choose “Insert” > “Symbol” command [...]

May 30, 2010
2 Comments