JSFL – The following Javascript error(s) occurred

When you're working with JSFL, you may notice that Flash doesn't always provide the most useful error messages. Many times when a JSFL error occurs, Flash spits out this message: "The following Javascript error(s) occurred: "

It then displays exactly nothing.

Obviously, saying that the following errors have occurred and then showing blank text isn't very helpful. In some cases, you can get Flash to actually display the error simply by dragging and dropping the JSFL file from the explorer window into the Flash IDE.

For a simple example, I put a bad return in one of my JSFL files. When I ran the actual panel in Flash and hit the error, I got the "The following JavaScript error(s) occurred:" message followed by nothing. But when I drag and drop the file into the IDE, I see the following in the output window:

The following JavaScript error(s) occurred:

At line 26 of file "ImportBG.jsfl":
return loadBG();
SyntaxError: invalid return

A small tip, but it can come in handy!

Bookmark and Share

4 Responses to “JSFL – The following Javascript error(s) occurred”

  1. Jospeh says:

    Where exactly is the facebook like link ?

  2. Nuno Monteiro says:

    You officially rock my world!

    Many thanks for the tip!
    I was going crazy over the same situation… It’s ridiculous that flash syntax error alert does not point out the line where the error is.

  3. Rhuno says:

    Thanks, Nuno.

    Glad to hear this helped you out. It is a bit odd, isn’t it? haha

  4. thienhaflash says:

    Nice findings man, I was pulling my hair very hard for this one !

Leave a Reply

Subscribe to RSS feed FGS5 Badge