Flasm bytecode issue with beta player
There is an issue with the new Flash beta player and movies optimised using Flasm macros. The ActionScript speed increase of the new player has come at a cost: the player seems to ignore certain bytecode combinations, which could not occur using normal ActionScript, compiled in the Flash MX IDE.
In this thread on SWFCoders mailing list, Casper Schuirink provides a quick workaround.
Observations on new #strict mode
The new beta player makes official a compile-time pragma called, #strict, which forces your script to adhere more closely to the ECMA-262 standards. According to the release notes, that means identifiers are case-sensitive, non-empty strings evaluate to true and undefined will become "undefined" when converted to a string. The feature also works in earlier players but, in my basic tests, it did not cause identifiers to become case-sensitive in any but the new beta.
There is huge potential for conflict here though. The pragma affects all child clips of the clip in which it was declared and Macromedia haven't yet mentioned a pragma that reverses the effect. In particular, if it is specified in a component, it will affect the whole movie because #initclip scripts are executed in the _level0 context.
There are a couple of important points that arise directly from this. Firstly, companies will need to enforce an internal policy on the use of #strict to prevent these conflicts. Secondly, those building components for public distribution will have to make sure that it works in both modes, since forcing users of the component to use #strict could break an existing movie.
I also have some concerns about the compatibility of Macromedia's own components with this mode. When setting text style properties, for example, the components search for style properties begnning with "text" and then chop this portion off. Developers have been encouraged to specify text styles using capitalisation like this: "textFont" and "textColor", but, when using the #strict pragma, you need to use "textfont" and "textcolor" instead. How many developers would guess that? Also, I recall seeing inconsistent identifier capitalisation in one or two of the Macromedia UI components' class definitions, though I don't remember which ones.
With all that to consider, I'm not sure if we will see #strict getting used very often - unless, perhaps, a #loose pragma is also revealed (I already tried everything I could think of ;-)).
New Flash Player - This is a BIG one!
Just when I thought I was going to have another day with nothing to blog about, this pops up. This is perhaps the most significant minor build of the Flash 6 player to date (6.0.60.48). It is only a beta version, so should only be used for developer testing, but check out those features!
Not only does this version fix a few bugs but adds several new features:
- #strict pragma to force better ECMA-262 compliance
- Increased ActionScript performance
- Greater control over accessibility features via ActionScript
- Windowless mode for Netscape 7.0
- Dependent Runtime Shared Libraries
- Customizable HTTP headers for XML and LoadVars objects
Macromedia have also done their best to encourage us all to test the new player thoroughly, by offering a choice of prize, from a pretty decent selection, to the top two bug-finders.
Download the new player here.
[ via mesh ]
Flash blogs international!
There seem to be more and more Flash and web design sites cropping up, which are in all kinds of languages other than English. This can be only a good thing, and should provide an impetus for Macromedia to extend multilingual support even further in future products.
For instance, from my referrers list, webtag, an Iranian blog and nomaster, which is in Spanish.
bug with super
I just wasted a lot of time because of this bug. Basically, if you invoke a method of an object inside a 'with' statement, super does not work correctly inside that method.
Here is a very simple example:
MySuperClass = function(){}
MySuperClass.prototype.func1 = function(){
return "super - ";
}
MyClass = function(){}
MyClass.prototype = new MySuperClass();
MyClass.prototype.func1 = function(){
trace(super.func1() + "method!");
}
a = new MyClass();
// works ok
a.func1(); // super - method!
// no go
with(a){
func1(); // method!
}
Flash drawing API methods
A new article by Ric Ewing just appeared on desdev. It features a number of useful drawing functions, which use and extend the drawing API.
There are also some drawing methods available on the FlashCoders wiki.
New Flash Player stats
New stats have just been released, showing that there are more web users that have the latest player than those who do not.
Although the figure tops 60% for Europe and Asia, Canada and the USA are lagging behind with 57% and 53% respectively. These figures are pretty disappointing for me; believing unofficial speculation from those "in the know", I was expecting at least 70% across the board.
The way that this information is presented is sneaky actually. The figure that is repeated over and over through the study, is 97.8%, which counts any Flash version - the version 6 statistic took quite a bit of searching to track down.
[ via flashmagazine ]
FUIComponentClass dictionary - in your reference panel!
Jesse Warden has very kindly converted my FUIComponentClass dictionary into a Flash MX extension, which adds the info to your reference panel in Flash.
Get it here.
MMUG blog
I just stumbled across this blog today, which is run by Sheila Farrel from the London MMUG. It doesn't have a huge amount of content, but it seems to be focussed on news about upcoming user group events and special offers for user-group members, so it offers a slightly different slant than many of the other MM-related blogs.
