Archive for the ‘Actionscript’ Category

Smooth(er) Timer-based Flash Scroller AS3.0

Wednesday, December 20th, 2006

Today I started working on a new daily animation piece which required a scroller. One thing led to another and I started writing a scroller class in Actionscript 3.0 working with Flash Professional Public Alpha. I wanted a scroller which could attach itself to any graphic and create two instance on each side of the original and then scroll either to the left or the right. For best results the graphic will have to the same size as the stage and an empty MovieClip can be used to position the resulting scroller on the screen.

After a lot of fiddling around I found that using the EnterFrame event would result in jerky scrolling so I started using the new Timer class in AS 3.0 and that gave better results although the is still some jerkiness. You can see in the test below, use the arrow keys to change the parameters.

If anyone is interested in the source, drop me a line.

scroller_as3.zip

Squid Tentacle Flash Animation

Friday, December 1st, 2006

Here is a freelance flash project that I finished recently. It is for the Open Intelligence Agency and I was subcontracted by Mesa to create the blinking squid animation and also the movement of the tentacles.

Originally the client wanted a wind effect in the tentacles which you can see in this post, but at the end they decided to go with an up and down motion. The animation of the tentacles is done using actionscript with a spring and constraint simulation, the blinking is done by hand with the timing determined by actionscript.

Tentacles in the wind

Thursday, September 7th, 2006

On and off for the last couple of weeks I have been working on a flash effect for a client. The brief was to create 12 or so tentacles which would respond to the movement of the mouse as if it was the wind. After a bit of research I discovered Flade which is a 2D physics simulation library for Flash, I did a number of tests for the client but in the end they decided not to go head with this particular effect but I still like it, it is like one of those executive toys.

Here is one of the tests:

[kml_flashembed movie="/gallery2/d/3184-1/Tentacles.swf" height="240" width="450" /]

EDIT:
I have been asked for the source for this, I didnt find exactly the one I was looking for but inside the following zip file you will find /examples/two boxes/twoboxes.fla, that will give you the general idea of how it is working. I also modified some of the primitive graphics routines to draw a solid black line, you will have to change things to suit your project.

tentacle_wind.zip

Rainbow Serpent Puzzle Game

Wednesday, September 6th, 2006
serpent_small.jpg

Well Actionscript 3.0 and the public alpha of Flash 9 is out and as a way of getting into the new features of Actionscript 3.0 I have been working on a little puzzle game for the past week or so.

It is based on the numbered-blocks puzzle game where you have one empty cell and you have to move the blocks around until you get all the blocks in order. Instead of using numbers on the face of the blocks I am using parts of an image. The images are randomly chosen from an album in my gallery, right now there are only a few images in there and they do not go with the “outback” look of the games interface so I will have to go through my photos and choose some more suitable images but for now they will be fine.

The game also has a Highest Score list which uses PHP and MySQL to store the scores in a database, thanks to Erwan for writing PHP script for accessing the database.

I am looking to add some background music and some sound effect to the game, if you have any pointers for suitable music then drop me a line.

OK here is the link for the game:

window_grab.jpg