What Is Server-Side ActionScript?

Server-Side ActionScript is more accurately JavaScript—it is built entirely using the Rhino JavaScript parser (http://www.mozilla.org/rhino). The Rhino implementation of JavaScript was a project begun by Netscape for a never-used all-Java browser. The Rhino project took on a life of its own, however, and is now an open source project housed at the Mozilla web site. Rhino is essentially a JavaScript parser built in Java. For that reason, it is a perfect fit for ColdFusion MX and JRun 4. Macromedia used the Rhino engine for the Server-Side ActionScript implementation in both ColdFusion MX and JRun 4. Currently, these are the only two platforms that support SSAS (the .NET, Java, PHP, and Perl versions of Flash Remoting don’t support SSAS).

Tip

Flash Communication Server has its own implementation of JavaScript as Server-Side ActionScript, but it is based on the Mozilla Spidermonkey JavaScript engine (written in C). It offers no interoperability with Flash Remoting SSAS. You can find more information about Spidermonkey at http://www.mozilla.org/js/spidermonkey.

SSAS files have an .asr file extension and reside within a ColdFusion or JRun 4 web directory. The .asr files can be viewed in any web browser as plain text files unless you take precautions, such as adding the .asr file extension to the list of excluded file types in your web server.

An SSAS file consists entirely of functions, which become the methods of the remote service that you call with ...

Get Flash Remoting: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.