Get Adobe Flash player

The AS3 Class Lab

What is your approach to Flash?

There are many ways to create a Flash project and no single one is the perfect solution. If you use Class files, or want to get some exposure to them, read on.

The reasons I prefer to use Class files in my Flash projects are: (1) Reusability, (2) Greater control, (3) Less clutter in your code.

When should you create a Class? Anytime you find yourself typing in the same set of instructions over and over. Classes can be complex or simple in their nature, but if you have a repetitive task, consider making it into a Class and simplify your coding by just referring to that Class with a single line of code.

The Tutorials

The tutorials presented here are given with no guarantees and no strings. Use them as you will. The basic idea of each tutorial is to show how different elements can be used to create a single thing, such as a word bubble, and are intended to be a starting point for you to make something that does exactly what you need it to. So, feel free to bend and twist the code and make something wonderful of your own. I try to be as thorough as I can, but if you have any questions feel free to contact me direct, or leave a comment at the bottom of the tutorial you are asking about. And, if you have a tutorial in mind that you would like to see, let me know and I'll see what I can work out.

AS3 ToolBox

The AS3 ToolBox is a free starter kit of custom made components which have been designed to be easy to use, skin and customize. To get you going I have included the Button, Check Box, Radio Button, Slider, Color Picker, Icon Button, ComboBox, and Calendar.

Read the whole Tutorial

XSlider - A Custom Component

This all about freedom. The freedom to make components that do what You want for a change. The freedom to add a new feature whenever you need one. The freedom to use any development environment you want without compromise or sacrifice. The freedom to fly like an eagle. Well, maybe not, but that's up to you, isn't it? What we are going to do is make a slider component from scratch using 100% code.

Read the whole Tutorial

Spell Checker for Flash

Yes, that's right - for Flash, not Flex. Adobe's beta project Squiggly is in it's prerelease 6 version. I wanted to add this capability to a Flash project I was working on and had a hellva time finding out anything about using it in Flash. The official Squiggly page states: "While the included UI class requires the Flex SDK, the core spell checking engine can be used in pure Flash applications without any dependency on Flex packages." This gave me hope, and, as you may have suspected, I did finally find my way.

Read the whole Tutorial

Auto Complete for Flash

Recently a client asked me if I could put together an AutoComplete feature as part of the Content Management System I am building for them using AS3. Google has made this feature very popular in recent times, and so I thought it would be an interesting exercise to do in Flash.

Read the whole Tutorial

Pagination in Flash - Part 2

In the first tutorial we used the number of items to move through the pages, and that works fine for small amounts of data, but what if you have hundreds of items to look through, or you are displaying pages and pages of text? In those cases it would be better to move through the data by page numbers, and that is what we are going to do here.

Read the whole Tutorial

NextPrev Class

The NextPrev tutorial deals with pagination in Flash, a situation I seem to run into more and more these days. My usual course of action was to serve up the data to a PHP page and let it deal with paginating the results. But Flash has so much more to offer than the traditional html page, that I decided to recreate the process in Flash, which is a bit ironic in these days of HTML5 trying to being everything Flash is. The resulting code was a natural for a Class, or at least it was after I copied and pasted it into a few different projects.

Read the whole Tutorial

InfoBox Class

The InfoBox class creates a pop-up box which can contain an image, a title, a description and a link. It comes in handy in spots where you need to display additional information, but don't have the room, or don't want to dedicate the necessary space. With just a few lines of code, you can add it to any project.

Read the whole Tutorial

WordBubble Class

The WordBubble class is a fairly simple class that pops up a WordBubble that you can use for a variety of things such as a tool tip. This class is also designed to be a jumping off point to create other types of pop-ups.

Read the whole Tutorial

ContactForm Class

This is a class that sets up and operates a simple Contact Form. You can use it in 2 ways - either to make a standalone contact form movie, or as part of another flash movie. It uses PHP on the back-end to deliver the email to you.

Read the whole Tutorial

SlideShow Class

This class allows you to easily add a simple slide show to any Flash movie. It requires you to set the Photo Array, Interval, and the X and Y of the slide show.

Read the whole Tutorial

DBHelper Class

This is a very small class that performs a commonly used task and is very easy to update as per future requirements. If you interact between Flash and a database very often, you will immediately see its usefulness.

Read the whole Tutorial

Warning: date() []: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in /home/xtydigi/public_html/footer.php on line 2