Getting Started

Categories:Quick Start

If you've come here directly from installing xJSFL, "Hello!". This page will tell you how to start using xJSFL straight away, with some links at the bottom for where to go next, so you get the most out of the framework.

Running scripts

There are two main ways to run scripts using xJFSL.

  1. Running pre-made scripts from the Snippets Panel
  2. Writing and running scripts from Komodo Edit

For help in running code from other IDEs, see here.

Designers: Snippets Panel

The Snippets Panel is a new way to access and run your JSFL scripts. It displays a hierarchical list of hard drive folders you specify, allowing you to manage different sets of scripts, even customising them with icons and tooltips.

The panel is installed with references to 2 folders to start with:

  • xJSFL/user/jsfl/snippets/
  • {flash}/Configuration/Commands/

You can or delete folders as you wish. To run script, double-click on it. To see more options, such as editing or revealing script locations on your hard-drive, right click a folder or file.

More information about writing, packaging and running Snippets, click here.

Developers: Komodo Edit

If you've not yet installed Komodo Edit, click here for installation instructions.

Once installed, here's a very brief intro to writing and running xJSFL scripts in Komodo Edit:

  1. You can write and run scripts from anywhere on your hard disk
  2. The first line of any xJSFL script must be xjsfl.init(this);
  3. Add any (x)JSFL code afterwards, e.g alert('Hello world!');
  4. Press CTRL+Enter to call Flash and run the script.

For a more detailed example, see the tutorial Writing an xJSFL script.

The following variables and functions will always be available after an xjsfl.init():

  • $dom - shortcut to fl.getDocumentDOM()
  • trace() - shortcut to fl.outputPanel.trace()
  • clear() - shortcut to fl.outputPanel.clear()

More core functionality is discussed here.

Next Steps

7 Responses to Getting Started

  1. banwenxiaoyu says:

    发生以下 JavaScript 错误:

    TypeError: xjsfl.modules has no properties

    发生以下 JavaScript 错误:

    TypeError: xjsfl.modules has no properties

    > 发生以下 JavaScript 错误:
    TypeError: xjsfl.modules has no properties
    : Initializing
    发生以下 JavaScript 错误:

    SyntaxError: unterminated string literal

    发生以下 JavaScript 错误:

    TypeError: xjsfl.modules has no properties

  2. Dave Stewart says:

    Not sure. Do you want to re-ask this question in the forum, as it’s the best place to continue a dialog, and I’ll attempt to help there?

  3. banwenxiaoyu says:

    Forum can not post? xjsfl snippets Panel is empty? Output error

  4. banwenxiaoyu says:

    Installation problem? I do not know the problem is not Chinese?

  5. Dave Stewart says:

    OK, I’ve approved your membership – I forgot there was a double-check on there. You will need to ask questions in full English though – I don’t really understand what you’ve asked me so far – sorry!

  6. mels says:

    I want to reinstall this. The uninstall from the commands menu doesn’t work (no error but doesn’t uninstall). Tried installing it from the new location, no succes. Tips ?

  7. Dave Stewart says:

    Sorry about that. The latest Beta solves all these issues (I think), so download and install that branch from GitHub.

    You’ll need to delete the following files / folders in the Flash/Configuration folder:

    /Configuration/Commands/xJSFL/

    /Configuration/External Libraries/xjsfl.bundle (Mac) or xjsfl.dll (PC)

    /Configuration/Tools/xJSFL Loader.jsfl
    /Configuration/Tools/xJSFL.ini

    /Configuration/WindowSWF/xJSFL Sample Module.swf
    /Configuration/WindowSWF/xJSFL Snippets.swf

    Any more issues, jump on the forum.

    Cheers,
    Dave

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>