TypeError: xjsfl.init is not a function
  • tamttamt July 2011

    I know xJSFL will be awsome. But I can't install it success .

    Flash CS 5(language:zh-cn), Win XP(language:zh-cn).

    When I open Flash IDE, and db-click "xJSFL/install.jsfl", nothing happen.

    Then I try another way: open "xJSFL/core/install/install.jsfl" in Flash IDE, and run it by click the "run button", then I saw the xJSFL swf panel. Then I restart the Flash IDE and open the “xJSFL Snippets" panel, and got this in output panel:

    "TypeError: xjsfl.init is not a function".

     

    Because my operating system and FlashIDE are both "zh-cn", so is xJSFL only work on English operating system?

  • DaveDave July 2011

    Hey there,

    Great to see xJSFL making it all the way to China! There shouldn't be anything inherant in the framework that would limit it to a particular region (I'm not sure if there would be issues with double-byte characters; I'm really guessing) but let's try working through a few things.

    1.If you update xJSFL/install.jsfl to this...

    var uri = fl.scriptURI.replace(/[^\/]+$/, '') + 'core/install/install.jsfl';
    fl.trace('Running "' +FLfile.uriToPlatformPath(uri)+ '"');
    fl.runScript(uri);

    ...does the path printed to the output panel point towards the actual install file? I'm surprised that nothing ran.

    2. Do you get the entire bootstrap messages as illustrated here: http://www.xjsfl.com/support/setup/quick-start/installation ?

    3. What happens if you set up Komodo then type and run...

    xjsfl.init(this)?

    ... do you get the message

    > xjsfl: initializing...

    ... ?

    4. What happens if you run the JSFL:

    for(var i in xjsfl)
    {
    fl.trace(i + ' : ' + xjsfl[i]);
    }

    Do you get an Output panel full of xJSFL objects?

    If you don't have any luck, feel free to grab me on Skype and we can do a screenshare; my id is "dave [at] xjsfl [dot] com" (obviously replacing the [ ] tokens for real symbols)

     

  • tamttamt July 2011
    1. yes, it point towards the actual install file.
    2. output:
      TypeError: xjsfl.init is not a function
    3. no.
    4. output:
      name:xjsfl
      MM_path:C:\Documents and Settings\user\Local Settings\Application Data\Adobe\Flash CS5\zh_CN\Configuration\External Libraries\xjsfl.dll
      MM_loaded:true
  • DaveDave July 2011

    OK, looks like the Loader isn't running.

    Can you check that the following file exists:

    \Flash CS5\zh_CN\Configuration\Tools\xJSFL Loader.jsfl

    And, if so, run it.

    Then let me know. If we can't do it via the forum, might need to do a Skype screenshare.

  • tamttamt July 2011

    Hi, I found the "fl.runScript" fail because the splash text at header of the .jsfl file. I don't know it's correct call it "splash text header", What I mean is like this in the "core/install/install.jsfl":

    When I open the "core/install/install.jsfl" in Flash IDE and click "run button", it run success. But  when I use "fl.runScript" to run it, it just run fail and not any error is thrown. I know this is crazy, but I think the "fl.runScript" may have some trouble when it read the splash text header.

    So I try search all the splash text header in xJSFL komodo project, and replace them will "". And try re-run the "install.jsfl". And restart the Flash IDE. Finally, I saw the "> xjsfl: ready!" int output panel!

  • DaveDave July 2011

    Wow... that is weird.

    Does everything in the framework seem to work apart from that?

    For example, did you manage to do this tutorial OK?

    http://www.xjsfl.com/support/tutorials/scripts/script-basics

  • tamttamt July 2011

    Almost I can do this tutorial OK, except the "Adding xJSFL classes and using the folder structure".

    The error I got is: "ReferenceError: File is not defined".

  • DaveDave July 2011

    Whatever is happening, it looks like the xJSFL classes either aren't being loaded from disk properly, or aren't being stored / retrieved from the extension properly.

    I'm on skype now if you can get on in the next 10 mins, then we can work through the code interactively.

    If not, I will be back on again about 9:30 GMT.

     

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with OpenID Sign In with Google Sign In with Twitter

Sign In Apply for Membership

Tagged