• : Function ereg() is deprecated in /home/sysadmin/reverend/codeofpaint.com/modules/paging/paging.module on line 92.
  • : Function ereg() is deprecated in /home/sysadmin/reverend/codeofpaint.com/modules/paging/paging.module on line 92.
  • : Function ereg() is deprecated in /home/sysadmin/reverend/codeofpaint.com/modules/paging/paging.module on line 92.
  • : Function ereg() is deprecated in /home/sysadmin/reverend/codeofpaint.com/modules/paging/paging.module on line 92.
  • : Function ereg() is deprecated in /home/sysadmin/reverend/codeofpaint.com/modules/paging/paging.module on line 92.

Welcome To CodeOfPaint.com, a place to learn computer programming using Adobe Flash and Actionscript!

Mission Statement:

This site is a resource for you to learn basic computer programming techniques using Adobe (formerly Macromedia) Flash ®.

This site is geared toward Graphic Designers and other people who may already have some experience with Flash, but are looking for some help learning how to use Actionscript code to make their websites and applications more interactive and robust.

Many Actionscript sites assume that the user is already familiar with programming concepts, and expect you to understand the jargon. Our goal is to explain things to you in plain English, so that you understand the underlying concepts instead of simply copying someone else's code.

Don't be afraid of scripting with Flash. It's fun... And it's as easy as a new "Code of Paint". Eye-wink

Site Conventions:

All scripts on this site will be written in Actionscript 2 unless otherwie noted. Comments have been disabled for articles, since the only use was by eejits peddling their filth... User registration is required for the posting forums.

NOTE:

Our posting forums are being reworked, and will be available soon.

Resources:

  • Basics Actionscript basics including flow control, logic control, variable types, variable scope, and addressing hierarchy.
  • Code Bits Useful (and not-so useful) code snippets with full descriptions. You may copy this code and use it for yourself if you like, or use them as ways to learn something new.
  • Fun Stuff Games and fun little bits.
  • Forums A place for you to ask questions, suggest new topics, and discuss Actionscript programming.

Donate:

If you find anything on this site to be helpful, please consider using our Tip Jar link on the right side. You can use a PayPal account, or major Credit Cards.

HTML Text

When Flash Player 7 was introduced, Macromedia added some very powerful features into their TextField object. Most notably, the ability to display a lot of HTML formatted text, including images. And you can even use Cascading Style Sheets!

Paint By Numbers - Dynamic color manipulation in Actionscript and Flash

Here is another fun bit that I wrote several years ago in Flash 5 and Actionscript 1.0. We've all seen the old Paint By Numbers pictures that we used to get as kids. I decided to try to replicate the idea in Flash.

The thing that makes this more interesting than most of the Paint By Numbers pages on the net is that you can mix your paint colors, creating basically any color that you wish.

Galaxy Game - A fun game writtten in Flash 5 and Actionscript 1.0

This is a fun little "game" that I wrote mostly on an airplane on my way to a Flash Forward convention in San Francisco back in 2001.

There is no goal to this game but it can be fun to play with for a bit. It allows you to grab planets that are in orbit around the sun and throw them into a different orbit. And you can add more planets and watch them collide.

Barcodes in Flash. Dynamically generating UPC barcodes using Actionscript.

Do you have a Shopping Cart program that uses Flash, and you need to display or print receipts with product Barcodes? One solution would be to have jpg files of all the barcodes and load them into Flash.

However, I will show you how to dynamically generate and display barcodes using Actionscript and a barcode font. This can save you a lot of storage space and bandwidth, and will generate vector barcodes, which will look smoother and print better than a jpg file.

XML 101. How to use XML in Actionscript to store data for your Flash applications.

XML may sound scary to people who don't have a computer programming background, but if you're familiar with HTML, you already have a good idea of how XML works.

Both HTML and XML are markup languages. HTML is short for "Hypertext Markup Language", XML is short for "Extensible Markup Language". They both use similar tags to help give more information about the content they surround.