Archive for January, 2008

31Jan

[AS 3] Timing Methods with Timer and setInterval

2 comments so far

I have been wondering how the setInterval method was integrated in to Actionscript 3 so I wrote up a little application to demonstrate a persistent timer. The movie was just made to trigger a function every 2 seconds


Here is my document class for this movie:

package
{
import flash.display.Sprite;
import flash.utils.setInterval;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import [...]

30Jan

[AS 3] Flash Cookies with the Local Shared Object

No comments

Since the sharedObject method in Actionscript has proved itself to be very useful in the past (like my .mp3 player to play across multiple .html pages), I wondered how it was implemented in Actionscript 3. I found some nice code over at adobe and made some slight modifications so you wouldn’t have to refresh your [...]

29Jan

[AS 3] Drawing Lines across the Stage

No comments

Today I just wanted to display a defined numer of lines with various angles to span across the stage.. nothing too exciting here, but this will be the groundwork for some future projects that I have going on:


Here is the basic Line.as file:

package {
import flash.display.Sprite;
import flash.display.Graphics;
import flash.geom.Rectangle;

public class Line [...]

28Jan

[AS 3] Squishing Effect

1 comment so far

So Gahlord from over at www.n0d3.org has been wanting to see a squishing effect applied on an object (ball) upon a collision (right wall). Below is a simple animation to demonstrate. The effect can be influenced by changing the objects mass as it calculates the spring distance.
Squishing effect:


Here is [...]

Categories: Actionscript 3, Physics
25Jan

[AS 3] Keyboard Events with Acceleration

No comments

Here is just a simple interactive animation. You can control the wheel with your left and right keys. When the object is off the screen, it will wrap around to the other side. You can view the project here in a new window, click the flash movie to activate.I created a new wheel class that [...]

Categories: Actionscript 3, Physics