Friday, December 31, 2010

Saturday, December 25, 2010

Sunday, December 19, 2010

Wednesday, December 15, 2010

Create a simple slideshow using AS3: Part 7

Today we'll create a slideshow similar to the one in photo slider tutorial, except that now we will make it loop and not go backwards to return to the first photo in the end of a cycle.

Monday, December 6, 2010

Creating an advanced preloader using AS3

Today we'll make an advanced preloader, which shows the total size of the file, how many kbs are downloaded, percentage, download speed and estimated remaining time.

Thursday, December 2, 2010

Create your own smooth scroll bar using AS3: Part 3

Today we'll create a rectangle slider between our arrows, that, no matter how tall is the slider, runs according to the scrolled content.

Saturday, November 27, 2010

Create a drawing application using AS3: Part 3

Today we will add the ability to draw lines, ellipses, as well as the ability to change between drawing modes and an erase button.

Tuesday, November 23, 2010

Monday, November 22, 2010

Thursday, November 18, 2010

Friday, November 12, 2010

How to create Mac-like buttons using AS3

Today we will learn how to create Mac-like buttons - the closer you move your mouse to the button, the bigger it gets.

Thursday, November 4, 2010

Monday, November 1, 2010

Saturday, October 30, 2010

Sunday, October 17, 2010

Saturday, October 16, 2010

Create a shooting game using AS3: Part 3

Today we will cover these topics: making an interval between bullet shots, creating enemy manager, spawning and moving enemies.

Thursday, October 7, 2010

Wednesday, October 6, 2010

Wednesday, September 22, 2010

Using the Button component: Part 3

In today's tutorial we will continue styling our buttons. Today we will learn how to set size and label placement of the button and what results will we get.

Saturday, September 18, 2010

Monday, September 13, 2010

Sunday, September 12, 2010

Friday, September 10, 2010

Working with XML data using AS3: Part 1

Today we will learn why and when should we use XML wtih Actionscript 3. To start things off, we will create some simple XML files.

Thursday, September 9, 2010

Wednesday, September 8, 2010

Tuesday, September 7, 2010

Skype in Flash (Actionscript 3)

Today we will learn how to call someone on Skype, start a chat, send a file, send a voicemail, add to contacts and view profile using Actionscript 3!

Saturday, September 4, 2010

Detecting focus on Flash using Actionscript 3

Sometimes it is needed to tell whether the user is focused on the Flash or not... in this tutorial, you will learn how to do that using AS3.

Friday, August 27, 2010

Working with Arrays in AS3: Part 4

In this tutorial we are going to learn how to turn a string into an Array and otherwise and also how to clone an Array.

Thursday, August 26, 2010

Wednesday, August 25, 2010

Working with Arrays in AS3: Part 2

In this tutorial we will learn how to gain access to every Array element using loop and how to find elements that match a specific criteria.

Wednesday, August 18, 2010

Tuesday, August 17, 2010

Many ways of splitting string in AS3

In this tutorial we will learn various ways of splitting strings to return a specific part or elements of the string.

Monday, August 16, 2010

Transformations in Actionscript 3: Part 1

Actionscript lets us apply different kinds of transformations to our objects. In this tutorial, you will learn how to apply colors to objects.

Saturday, August 14, 2010

How to create a color picker with sliders using Actionscript 3

In this tutorial you will learn how to create a different from previous tutorial color picker. This one has 3 sliders for 3 color channels.

Thursday, August 12, 2010

How to create a simple trading system - part 2

Today we continue working on our fallout-like trading system. We add prices for our items and an arrow, which shows how much money does a person have to pay.

Wednesday, August 11, 2010

How to create a simple trading system (exchange items between 2 lists)

This tutorial will teach you how to create 2 lists of several items, where user can put items from the first list to the second and vice versa.

Friday, August 6, 2010

Thursday, August 5, 2010

Tuesday, August 3, 2010

Monday, August 2, 2010

Working with files in Actionscript 3: Part 1

In this tutorial we will learn how to let users download files onto their hard drive through flash using the download() method.

Sunday, August 1, 2010

Using HTML in Flash text fields (AS3)

Did you know that you can apply HTML formatting to dynamic textfields in Flash? In this tutorial you will learn how!

Saturday, July 31, 2010

Sound class in Actionscript 3: Part 6

In this tutorial we will learn about computeSpectrum and stopping all sounds at once. We will create a working visualizator in Flash and enhance it to look cool. Here's what our final flash will look like:

Thursday, July 29, 2010

Wednesday, July 28, 2010

Sound class in Actionscript 3: Part 3

Today we will learn how to find out information about the mp3 playing, such as song name, album, artist and more.

Tuesday, July 27, 2010

Sound class in Actionscript 3: Part 2

In this tutorial, we will learn how to create a sound buffer, how to find out the size of our sound file and how to pause the song.

Monday, July 26, 2010

Sound class in Actionscript 3: Part 1

Sounds have an important role in all kinds of flash applications. Today we will learn how to play and manage sound in Actionscript 3.

Sunday, July 25, 2010

Friday, July 23, 2010

Thursday, July 22, 2010

Wednesday, July 21, 2010

Correct Flash embedding with HTML

If you want to embed a Flash movie into a website, you can simply use the Flash built-in publisher code, however it generates a really big XHTML code, which has errors according to W3 validator, here's the screenshot (click to enlarge):

Tuesday, July 20, 2010

Dynamically setting and showing FPS in AS3

In this tutorial we will learn how to set frame rate of our movie with AS3 during its playback and how to create a simple fps displayer.

Monday, July 19, 2010

Use appendText

In AS3, the TextField class has a new method called appendText. In this Actionscript 3 tutorial we will see why and how should we use it.

Sunday, July 18, 2010

Saturday, July 17, 2010

Mouse.cursor property in Actionscript 3

Sometimes it is needed to change the default mouse cursor to an already built-in cursor (hand, finger pointer, etc). Here's an example:

Friday, July 16, 2010

Restrict characters in input text field using AS3

Yeah, this is another tutorial about input fields :P
Say, you need to create a text field for phone numbers and you need to restrict every symbol but numbers. This question is asked alot, although the solution in Actionscript 3 is pretty simple:

Thursday, July 15, 2010

Clear text field when focused on

If you are making an input text field, it's often needed to add hints, such as "Enter your name here" and "Enter your email", etc. If you are a good programmer, you will make this default text dissapear when the field is clicked, like in this example:

Wednesday, July 14, 2010

Fullscreen toggling using Actionscript 3

Sometimes it is needed to create an option to view flash in fullscreen. In AS3, this can be done with just one line of code:

Tuesday, July 13, 2010

How to site lock a flash using Actionscript 3

There are many requests on site locking flash games and applications on the internet. There are many ways to do it, but I chose regular expressions for my code. Here it is:

Monday, July 12, 2010

How to save local data with SharedObject using AS3

Sometimes it is needed to save a piece of data on user's computer, for example to load application settings from the last visit, or to load a saved game. This can be easily done with SharedObject.

Sunday, July 11, 2010

Text embedding in Flash

If you are using dynamic or input text areas in your flash, it is important that you embed the necessary fonts. There are two main reasons why you should do that:

Saturday, July 10, 2010

Create custom context menu using Actionscript 3

Sometimes it is needed to change the default context menu. Although you can't remove right clicking, you can modify the menu items.

Friday, July 9, 2010

How to make a digital clock using Actionscript 3

Have you ever wanted to make your own digital clock? Today we are going to learn how to create one in Flash. Here's how our final product will look like:

Thursday, July 8, 2010

How to create a proper cursor using Actionscript 3

A lot of flashes have custom cursors in them. Basically, it is just a movieclip following the coordinates of the mouse, however, several problems might occur, such as:

Wednesday, July 7, 2010

Saving to clipboard using Actionscript 3

Flash and Flex application developers often need to make a button that would save a piece of text to the user's clipboard, like it is shown in the example:

Tuesday, July 6, 2010

Actionscript 3 Keyboard events

The Keyboard class is used to build an interface that can be controlled by a user with a standard keyboard. It might sound complicated at first, but once you understand what are you doing - it's as easy as creating buttons.

Monday, July 5, 2010

How to create a calendar using only Actionscript 3 - Part 3

In the previous 2 tutorials we have created a base for our calendar and added some functionality. Today we are going to add more stuff to it.

Firstly, add a new loop in the compute function, right after the loop that sets text for each cell:


Sunday, July 4, 2010

How to create a calendar using only Actionscript 3 - Part 2

In the previous part, we created a base for our calendar. Now, we have to make it work like a real calendar.

Firstly, find this line in your code and delete it:


Saturday, July 3, 2010

How to create a calendar using only Actionscript 3 - Part 1

Ever wanted to learn how to create your own calendar, using only ActionScript 3? Now you can!
In this tutorial, we will cover the creation of cells of a calendar, and setting it up for work in future.

First, let's create one cell.
To do this, we will create a text field and edit it to look like a cell.

Friday, July 2, 2010

Returning random numbers using Actionscript 3

Generating random numbers is often needed when developing a game or an application. That was very simple to do in AS2 with the built-in random() function, which returns a random number ranged from 0 to the entered number. In AS3, it's a little more complicated. There is only one built-in function for that, Math.random(), which returns a random number n, where 0 <= n < 1. Let's create a function that will simplify the randomizing process for us (to make it work like in AS2):


Thursday, July 1, 2010

How to check if e-mail is valid using Actionscript 3 and regular expressions (tutorial)

A lot of people, especially when creating forms, need the flash to check, whether the entered e-mail is valid. This tutorial explains how to do that in Actionscript 3. Here's what we're going to make:

Wednesday, June 30, 2010

Basic 3d using ActionScript 3

With the come of AS3, a new axis Z is introduced, allowing the users to work in 3d world. The following example lets you rotate the picture using the X, Z and Y axises:


Tuesday, June 29, 2010

AS3 Beginner Tutorial - part 3: Mouse followers

Let's create a simple mouse follower.

1. Create a movie clip on frame 1 with an instance name of "Cursor" without quotes.
2. Open the actions tab for frame 1.
3. Use this script:

Sunday, June 27, 2010

AS3 Beginner Tutorial - part 1: Introduction

This tutorial is meant for people who are unfamiliar with Actionscript 3 and want to start learning it. In this tutorial we will see what's new in AS3, take a look a the variables, learn how to make simple buttons, preloaders and mouse followers.

Saturday, June 26, 2010

AS3 Adding zeros to score

A lot of games have this feature, and the question has been asked on some flash game development forums recently: "How do you make your score appear with zeros in the beginning? Like 000350 and 003500."


Here's the code:


A coder's blog

Developing flash games and utilities is my hobby, and I plan on becoming a real programmer in future. I've noticed that I have more and more to say about this topic, so from this moment this blog is dedicated to ActionScript 3.0 tutorials, reviews, articles, etc...

Enjoy your stay!