Freelance Flash Games News

a place for news about flash, the site, and more

Entries for the ‘Flash Actionscript’ Category

Code Bits: Set Interval

Set Interval is a fairly simple function that can operate separate of the timeline. Instead of counting frames, it will count milliseconds. This is useful for establishing a timer or making your game the same on all computers, regardless of framerate. Here is an example of it in use:
Timer = setInterval(function () {
seconds -=1;
}, 1000);
Okay, [...]

Comments (2)

Code Bits: Random

Making things random in a game can be very important. There many different ways to use this important method that I will be going over today.
The random method can be used for a variety of things. It is called when you want to generate a random number. This randomly generated number can be used to [...]

Comments (4)

Code Bits: Variables

Variables are an important aspect of coding in actionscript. In fact, they are essentially what makes a game. Variables are used to store data. They can store numbers, words, or whether something is true or false. In this article I’m going to be going over each type of variable in AS2 and their use.
1. Boolean
Booleans [...]

Leave a Comment

Code Bits: Timeline

For this code bits article, I’m going to be explaining how to control the timeline. Included code bits will be stop(); play(), and gotoAndPlay();. While there are other ways to control the timeline, I find these to be the most useful. Now to explain each one.
The stop(); command will stop the timeline on a specific [...]

Leave a Comment

Code Bits: if statements

Ever had a bit of actionscript code that you didn’t understand, or wish you new more about. Well, I’m going to start explaining bits of AS2 code in my next few posts. The code posts will be spread out between my normal posts, so you’ll know if it is a a bit of code when [...]

Comments (2)