Jul 1, 2008
Adobe just dropped a bomb as far as I’m concerned. They’ve announced a collaboration between Google and Yahoo to bring fully searchable SWFs. Ted on Flex reveals the best part:
The cool part is that this also covers dynamic data loaded in from requests to a server, these are typically ignored in both AJAX and SWF applications.
This is going to open the door for a lot of the cool and useful things we’ve been wanting to do for clients at Figaro, but have had reservations about because of SEO implications, and I’m sure many RIA houses out there feel the same.
Combine this news with a tool like swfaddress to provide deep linking into your applications and BAM! you have a killer combo. Let’s just remember to keep our apps classy and tasteful, guys and gals. This news isn’t cause to go hog wild with flash like the late 90s, early 2000s restaurant site debacle.
Jun 11, 2008
I’m toying with the idea of distributing the Space Survivor game as an AIR application rather than embedded in the space survivor site (or concurrently with). Took me a while to find information about how to build an AIR app from just AS3 source, so I thought I’d share. Requires Flex Builder 3:
- Create a new Flex Project and specify that it is a Desktop application

- Follow your normal project-creation procedure
- After the project is created, Make a new Actionscript file - name it whatever you want. Make sure your Class extends Sprite or MovieClip.
- Right click the newly created .as file and mark it as your default application:

- Copy and past this, or write something similar in your main AS file:
-
package
-
{
-
import flash.display.NativeWindow;
-
import flash.display.NativeWindowInitOptions;
-
import flash.display.Shape;
-
import flash.display.Sprite;
-
import flash.display.StageScaleMode;
-
-
public class SpaceSurvivor extends Sprite
-
{
-
public function SpaceSurvivor()
-
{
-
var options:NativeWindowInitOptions = new NativeWindowInitOptions();
-
var mainWindow:NativeWindow = new NativeWindow(options);
-
mainWindow.activate();
-
mainWindow.title = "Space Survivor v0.0.1";
-
mainWindow.width = 1024;
-
mainWindow.height = 768;
-
mainWindow.stage.scaleMode = StageScaleMode.NO_SCALE;
-
var shp:Shape = new Shape();
-
shp.graphics.beginFill(0×0000FF);
-
shp.graphics.drawRect(0,0,100,100);
-
shp.graphics.endFill();
-
mainWindow.stage.addChild(shp);
-
}
-
}
-
}
- Finally, hit the Run or Debug button and voila! You’re good to go.
Also, look for more information here about petitioning Adobe to make a ‘Run as Desktop App’ an option for new Actionscript projects.
Jun 9, 2008
Spent a few hours this past weekend sqeezing every last bit of efficiency out of a starfield generator for Space Survivor. Fortunately, this was made extremely easy with Richard Lord’s very fine Flint Particle System.
The basic concept:
- Set up 4 particle emitters just outside the 4 edges of the screen
- Feed the Starfield a velocity vector from your ship’s movement engine
- use the velocity vector to give each generated particle a velocity opposite that of the ship
- use the built-in garbage collector of the Flint Particle System to destroy stars that go off screen
There are still some issues with it, like pre-filling the screen with stars, but here’s a demo of it in action. Code is below the fold:
[Read more]