January 15th, 2007 § § permalink
I’ve started playing with JSFL, which is JavaScript for the FLash IDE. More specifically, I’m creating a custom panel that I hope will make hierarchical animation easier to do on the timeline (at least the way I do it).
Unfortunately, it doesn’t really seem possible to make a panel that updates itself when the selection in the IDE changes (the way the built-in panels do), at least not elegantly or reliably. I suppose it is possible, by having the panel constantly poll the state of the selection, but that seems like a waste of resources, and at least one person out there seems to be having problems with that technique, although I haven’t tried it myself in Flash 8 (looks like the bug still existed in 7.2). I may try it that way anyway…
What I really want are events that my panel can respond to: selection changes, elements being moved, etc.
Another issue I’ve run into: when setting an element’s transformation matrix, the element moves as expected, but the transformation point doesn’t move with it! This leads to some really strange tweening unless you manually reset the transformation point (I just double-click on it with the Free Transform Tool). This will make my panel a real pain to use.
Hmmm… doing some snooping around, it looks like it is possible to change the transformation point using the document.setTransformationPoint()
method. However, it only affects the selected elements, which means my code will have to select each element in order to fix it up. Rather messy, but if it works…
December 21st, 2006 § Comments Off on PlayStation 3 Flash and browser info § permalink
The “About Flash” page reports that the PS3 is running Flash Player 7.0.70.0.
The User-Agent is reported as “Mozilla/5.0 (PLAYSTATION 3; 1.00)”.
For what it’s worth :)
I have not run any Javascript or rendering tests or anything like that. I should see if anyone else has already.
EDIT: Aha! Someone has, and seems to have done quite an exhaustive job of it. Very handy, bookmarking now :)
October 20th, 2006 § § permalink
Yesterday, at Sony’s Gamers Day in San Francisco, Sony demonstrated the PlayStation 3’s web browser (which will be included free with the PS3), including the viewing of movie clips on YouTube. I am assuming that this means the PS3 browser has full Flash player capabilities.
I’ve done some quick googling but haven’t been able to find any details about the PS3 web browser (unlike the Wii’s browser, which is based on Opera). If it’s based on Mozilla (or some other existing, known browser source), it would make our jobs as web developers much easier. If not, it will be another platform to target, especially if the PS3 browser becomes a major player. I’m also curious about what version of Flash is running on it.
October 4th, 2006 § § permalink
This is the first in what I hope to be a series of articles about execution order in Flash. That is, when scripts can be placed on MovieClips, Buttons, timeline frames, event handlers etc, in what order will they execute when the movie is running?
A recent bug in my code inspired these investigations. The results are quite interesting, although I have not come to any hard-and-fast conclusions yet.
But first, a simple experiment:
In a new Flash movie, create a simple MovieClip consisting of two frames. Add some text or some other visual aid, if you like. Then add a script in frame 1 that simply reads: trace("Timeline 1, Frame 1");
In the library pane, make a copy of that MovieClip. Then edit the text inside it (so you can distinguish it from the first), and change the script to read trace("Timeline 2, Frame 1");
Now edit the first MovieClip, and drag an instance of the second into the first. Then place an instance of the first MovieClip on your stage.
I hope that made sense!

Here’s what it might look like in the Movie Explorer window:

You might also want to set the frame rate of the movie to 1 frame per second, so that it’s easier to watch all the trace()s in the output window.
Now run the movie, and stop it after a few frames have written to the output window. Take a look at the first lines of trace():
Timeline 1, Frame 1
Timeline 2, Frame 1
Timeline 2, Frame 1
Timeline 1, Frame 1
Timeline 2, Frame 1
Timeline 1, Frame 1
...
Notice anything unexpected?
At the very beginning of the movie, MovieClip 1’s script runs before MovieClip 2. But after that first frame, MovieClip 2’s script executes before MovieClip 1!
I don’t know the reason behind this, but Flash is full of interesting behaviour like this when it comes to execution order. I hope to explore this more in following posts, as well as providing a simple enhancement to trace()
that makes it easier to follow order of execution.
I’ve attached the sample FLA file in MX2004 format. Take a look and let me know what you think!