Notes: Math Optimizations
This is some more stuff migrated from the Labs Wiki. Below is just some aggregated tips and tricks I’ve found on other blogs or websites.
Extract Colors
Not really an optimization per se, but just how to extract color values.
//24bit var color:uint = 0x336699; var r:uint = color >> 16; var g:uint = color >> 8 & 0xFF; var b:uint = color & 0xFF; //32bit var color:uint = 0xff336699; var a:uint = color >>> 24; var r:uint = color >>> 16 & 0xFF; var g:uint = color >>> 8 & 0xFF; var b:uint = color & 0xFF;
Compile Timestamp – Timestamp your SWFs!
- Compatibility: ActionSctip 2.0 / ActionScript 3.0
- File Size: About -Kb
- Change Log
Description
Compile Timstamp is a Flash extension that adds a new layer to your fla with a trace of the filename and compile timestamp. Used with FlashBug, this allows you to easily check the version of your online swf. This was created because the servers we used at work often cached our files on multiple servers. So it was difficult to tell which version we were actually looking at.
Sample
Try Compile Timestamp (You will need to FlashBug open to see the trace)
#### index.fla - 01/17/2008 11:46:39am
Features
- Seamlessly adds a timestamp to your SWF when published
- Contains the time, date, and name of the FLA
Notes: Flash 9 Gotchas/Bugs
This is also migrated over from labs. This was a list of bugs and gotchas I’ve run into over during my time as a Flash developer. I’m sure the best play to look would be Adobe’s Bug tracker but it doesn’t hurt to have a concise list of things to watch out for.
Bugs/ Gotches
-
Bug
wmode="opaque"or"transparent"disablesKeyDownactions (not true in 9,0,60,0 beta) and disablesMouseWheelactions
Black Box – Flash Secure Login
- Compatibility: ActionScript 3.0
- File Size: About -Kb
- Change Log
Description
BlackBox is a Flash-based login application. We built this much for the same reasons Comet was. We didn’t have anyway of doing a secure (read SSL) connection so we made our own next best thing. Whats funny is that in the end, the method we “ingeniously” came up with is almost the exact same method used with POP servers to send email.
This is an older project pulled from Labs and is currently password protected. This might change later, it might not. I wouldn’t hold your breath on this. This was made becuase a friend of ours worked at a company that didn’t allow any IM programs and we were too cheap to setup a server.
Features
- Secure login – Session based
- Easy to setup
Comet – Flash-Based Chat
- Compatibility: ActionScript 3.0
- File Size: About -Kb
- Change Log
What’s New
- New black theme
Description
Comet is a Flash-based chat application. It is a stand-alone application and does not require a server application in order to function. It does require PHP 4+ to function though.
This is an older project pulled from Labs and is currently password protected. This might change later, it might not. I wouldn’t hold your breath on this. This was made becuase a friend of ours worked at a company that didn’t allow any IM programs and we were too cheap to setup a server.
Features
- Muli-user chat without backend server
- Easy to setup
- Secure login