Programming examples:

(posted October 17, 2008) - Bacterial chemotaxis animation (this is somewhat heavy on object oriented programming) -- download three files chemotax01.as, chemotax01.fla, and bacteria.as, and put them into a folder. Then open all three in Flash. To run the animation, choose Control: Test Movie from menu (or press "apple / return"). Or you can view the source code as a jpg file in your browser: chemotax.as - bacteria.as

(posted June 20, 2008) - This example uses Adobe Flash CS3 (released in 2007). We will use an "object oriented" format, which is more useful than the previous way.

Download the following three files and put them all into a folder: rand00.as - fluorophore.as - rand00.fla
Open them all in Flash CS3. Build and test the animation by pressing the apple key and return key at the same time. Or you can go to Controls: Test Movie in the top menu bar. This animation is quite simple - it should look like this.

The second example has a means for entering parameters and uses some object oriented features. Download these three files and put them into a new folder: rand01.as - fluorophore.as - rand01.fla. As before, open in Flash and then build and test the animation. In this animation, the dots change their diffusing velocity depending on whether they are close to another dot. The animation should look like this.

--

Personal background
As a physics undergraduate, I learned the use of sine, cosine, vectors, calculus, matrices etc. As a cell biologist, I have done mostly experimental lab work involving microscopes, but I have intermittently done some side programming for "fun". Most of it was graphical animations using Basic on PCs. In recent years, I tried doing some graphical programming in Image J, Matlab, etc but found that I had the most affinity for Flash / action script (on Macintosh). I did some using Flash 5 in 2003 for a project on cdc2/cyclin activation, but then let that go for a while. In November 2006, on a trip to Japan, I had a conversation with Jean-Pierre Ozil about Flash, which made me want to start up again. I did some Flash visual animations in January 2007 for a journal club on duplication of centrosomes, then re-started action script programming in February. The first completed one was of dynamic instability of microtubules. This was using Flash MX / actionscript 2. In October 2007, I decided that I had to learn actionscript 3. This is compatible with the intel processor on new Macs and it is much faster. There is definitely an advantage for using the object oriented capabilities that are new in actionscript 3. Another advantage is that all of the code is on one page rather than attached to objects on the stage, and there is no need to use the "timeline", at least for the animations I have been doing. I enjoy the moment when a difficult animation finally begins to work ("nerdvana").