Code Hinting for SWCÂ’s in PrimalScript (Unity Client Classes Example)

Recently I started playing with Unity, a great XML Socket server product. One of UnityÂ’s cool features is it provides you with a bunch of AS2 classes that you can use to build pretty complex application. These classes are provided as a SWC that you include in your flaÂ’s library.

When I sat down initially to write some code, I didnÂ’t get any code hinting in my favorite editor PrimalScript since the classes were distributed in an SWC. SWCÂ’s are just zip files which contain a bunch of files that support the component. The majority of the SWCÂ’s contents are .asi files which provide interfaces and class information to the compiler for type checking. They are very similar to regular classes except they donÂ’t include any of the implementation, only the interface of each class.

PrimalScript includes support for ASI files so, with little effort, you can get full code hinting for SWCÂ’s.
Continue reading

PrimalScript special pricing and new beta out

Sapien will be running a New Year’s Eve special on PrimalScript. As far as I know they wonÂ’t be advertising this anywhere but on the 31st of December from 9:00am till 11:59pm, pacific time, you will be able to purchase the download version PrimalScript 3.0 for $99. Before anyone asks, yeah it is the 3.0 release but you will get the 3.1 release for free once that is out of beta. They canÂ’t really sell beta software.

Also, a new build of PrimalScript is available. If you are using the beta you probably want to upgrade. Here is a list of changes in this the new build.
Continue reading

The PrimalScript gold mine: lots of hidden gems

I’ve received a bunch of questions about PrimalScript since the public beta was release and most of them deal with just getting started. I thought I would prepare a short intro to PrimalScript that some people might find helpful.

PrimalScript is a fast and fully featured IDE. It supports many many languages, as such you may find some things in there that you may have no use for (A good example is the windows scripting features). After installation there is very little you will have to do to get PrimalScript working–it automatically adds the Flash MX 2004 help files and will detect the AS Class path.
Continue reading

Undocumented Flash Player 7 Features: Recursion limit and script timeout

I couldnÂ’t sleep for some reason Sunday night so I decided to look through the File Format Specifications that Macromedia published recently. To my surprise there are a few things in there that I found interesting.

The cool chapter to check out is the “What’s New in Macromedia Flash (SWF) File Format 7”. In this chapter, there is mention of “ScriptLimits” which is a tag that sets the Maximum recursion depth and the script timeout seconds of a swf. Usually the MaxRecursionDepth is set to 256 as anyone who’s had the player loop a few too many times, and the ScriptTimeoutSeconds is responsible for that dialogue that pops up after 15 seconds.

It turns out that in the new player you have the ability to control those settings, wherein before you had to always make sure your movie behaved within those restrictions. I donÂ’t recommend people modify these settings, but if it is ever needed itÂ’s good to know it is there. Also there is mention of the default value of ScriptTimeoutSettings which apparently varies by platform (between 15 to 20 seconds). IÂ’m not sure if this is for Mac/Windows or actually for low-performance devices like pdaÂ’s but I didnÂ’t know about this variation before.

There are some other interesting things in there. If you have never looked at the file format specs, I definitely recommend it if you canÂ’t sleep and feel like getting deep into the byte code of your precious swfÂ’s.