Flagstone Software

Bugs & Issues

Version: 2.0.4
Updated: 3rd Jan 2007

Current Issue Status Fix Due
1501763.Newline does not delimit statements. Open Open
1616274.on() and onclipevent() statements are not interchangeable. Open Open
1616292.function names are case sensitive. Open Open
Recently Fixed Status Release
1616266.duplicate definitions in event handlers. Open 2.0.5
1616257.for..in statements do not support var keyword. Fixed 2.0.5
1560065.updateAfterEvent() cannot be called with no arguments. Fixed 2.0.4

Current Issues

1501763. Newline does not delimit statements

The parser in Macromedia Flash allows newline characters to delimit statements. The statements:

a = 1
b = 2

are valid ActionScript however Translate requires explicit semi-colons to terminate a statement, e.g.

a = 1;
b = 2;

Root Cause

The parser rules recognize newlines as whitespace rather than as statement delimiters.

Workaround

There is no workaround. All statements must be terminated with a semi-colon. Block statements such as those which form the body of an if or for statement are not affected.

When will it be fixed?

This is a tough one to fix. Several different ways of preprocessing the script to replace line-breaks with semi-colons have been examined. None gave simple or consistent results.


1616274. on() and onclipevent() statements are not interchangeable.

The on() and onclipevents() can be used in Macromedia flash to define the event handlers in buttons and movie clips. The application provides the context (events are bound to a physical object) and so the statements can be used interchangeable to define the event handlers for an object.

This is not possible with Translate since the scripts are compiled as stand-alone code so the different types of statement are important to determine which data structures should be generated for the compiled code.

Root Cause

The root cause is the design of the ASParser class which uses a single method to compile the different types of scripts.

Workaround

There is no workaround. The on() statment must be used to define event handlers for buttons and onClipEvent() must be used to define event handlers for movie clips.

When will it be fixed?

It is not clear how this can be fixed unless the API is change to provide methods to explicitly compile scripts for the different types of object.


1616292. function names are case sensitive.

when referencing built-in functions such as gotoAndStop the name used in Translate is case-sensitive. In Macromedia flash the function names are ~ case insensitive. This means that

gotoAndStop();
gotoandstop();

are treated a two different functions. The first function is recognized by Translate as a reference to the built-in Flash function while the second is not - instead it is treated as a call to a user-defined function.

Root Cause

The ASNode class contains a table of built-in function names. This table is searched using a case-sensitive comparison.

Workaround

There is no workaround.

When will it be fixed?

This will be fixed as soon as possible. Not release is currently set since this also requires a new set of test scripts to be written.


Recently Fixed

1616266. duplicate definitions in event handlers.

When compiling the code for button and movie clip event handlers:

on(mouseDown)
{
    function fn(x) {
       return getPropery(x)+1;
    }
        
    xLocation = fn("_x");
}
    
on (mouseUp)
{
 	yLocation = _y + 1;
}  

the definitions for functions and the table of strings defined in the handler for mouseDown events were repeated in the definition of the event handler for mouseUp events even though they are not used. The table of strings is now cleared so that the scope of names is restricted to the enclosing on() statment. This change was also implemented for movie event handlers defined using onClipEvent() statements.


1616257. for..in statements do not support var keyword.

for..in statements can now be written using the var keyword:

for (var a in b) 

1560065. updateAfterEvent() cannot be called with no arguments.

The built-in function, updateAfterEvent() can now be used without passing an argument.