Specifying Script Files


You can specify one or more external script files containing scripts to use with objects in a document that will be saved as an SVG file.

  1. Click the Specify Script Files Namo WebCanvas icon property interactivity script Specifying Script Files button on the Script tab of the Interactivity window.
  2. Click Add in the Specify Script Files dialog box.
     Namo WebCanvas script jsfile define 2 Specifying Script Files
  3. Click the Browse… button to find and select a script file (*.js). Click OK.
    Namo WebCanvas script jsfile define 1 Specifying Script Files
    Ex) Script file content – a script which makes a message appear when an object is clicked
     
    function ClickMessage()
    {
        alert(‘Click’);
    }
  4. Confirm that the selected script file appears in the Specify Script Files dialog box, and then click OK.
  5. Now you must specify a script for a document or object
  6. Select a document or object and specify the script.
     Namo WebCanvas script define 2 Specifying Script Files

Namo WebCanvas reference Specifying Script Files If a script has more than one line in it, end each line with a semicolon (;).

Namo WebCanvas reference Specifying Script Files When you save the document as an SVG file, you must save the SVG file in the same folder as the script file.

Namo WebCanvas top Specifying Script Files

Specifying Script Files