Remember when you were a little kid and you’d be out playing with your friends and you’d find a stray cat, and he’d follow you home (amazing how cats follow you when you feed them). You would beg and plead with your mom, “Please Mom, can we keep him?” She’d say yes, as long as you promised to take care of it, then you’d go on your merry way. Sometimes it would turn out that the cat was perfect for the family and everyone loved it. Occasionally, that cat you brought home would get into the house and cause all sorts of problems. We had a cat like that, I called it the cat from Hell.
iBrent, what does this have to do with programming? Well, I’ll tell you.
I like to help answer people’s questions about Flash at a number of forums, and often I see posts where they start out by saying: “I found this code on the internet, and…” (“can we keep him?”) then they go on to explain how it doesn’t work, or they don’t know how to adapt it to their project, etc. This is all well and good, accept the problem with Actionscript code is you never know if you have a nice kitty or a cat from Hell.
Do you see the picture now? 😀
Why is it that when we find what looks like helpful code, then bring it home with us, it ends up ruining the furniture? Two reasons:
1. Poor writing. This can be hard to spot especially when we are just starting out in Flash. The problems arise when we want to expand on the existing code, and we run into all sorts of problems because of how it was written. How can we avoid this? Look at who wrote it. Where did you find it? Within a forum? How many posts has the author made? What kind of responses does the author receive? This should give you some indication of what to expect when you want to take that code home and use it in your project.
2. Old Actionscript. This is by far the biggest reason code won’t work, or doesn’t make sense for new Flash users. Most all the cool innovations and features are created with Actionscript 2.0 or higher. Before Macromedia (Adobe) released Actionscript 2.0, everything was referred to as Actionscript. Rarely, if at all do we see a reference within the code to Actionscript 1.0. So we have to do some detective work, and make sure what version of Actionscript we are dealing with. Here is a little checklist I’ve come up with that may help in understanding what version the code is written for. Understanding this will get you a lot further along as you try and adapt it to your work:
a. Check the Date. Most of the code snippets we find online are found in forums or blogs, and most of the time there is a date associated with the post. So, if we know that Actionscript 2.0 was released around September 2003, with the release of Flash Player 7, chances are if the date is pre-2003, it’s Actionscript 1.0.
b. Check for strict data typing. If it’s difficult to determine the date when the post was given, look for strict data typing. In Actionscript 1.0, there is no way to strict data type a variable or object. In Actionscript 2.0 you can, and it looks like this:
var n:Number = 0; or var aList:Array = new Array();
Notice the colon after the var n, and var aList, followed by the data type. This is called strict data typing. It is used by the compiler to check that you haven’t mismatched any data types. (like assigning a number to a string variable)
So, the next time you’re out online playing with your friends and you come across a stray piece of Actionscript code, know what you’re bringing home, before it ruins the furniture! 🙂
Here I show you a cool tool for use in JSFL scripting.
I show you how to customize the icons found in the tree component.
You can download the .fla and .xml files used in this tutorial here.
This tutorial shows you how to key out a blue (or green) screen background from video and export for use in Flash 8 and higher.
Part 1 deals with After Effects, Part 2 (coming soon) will show you how to import the video into Flash and play with the alpha channel effects.
Here I introduce JSFL, the scripting language for the Flash authoring environment. I’ve created a traceBitmap script that converts a sequence of bitmap frames into vector graphics.
You can download the traceBitmap.jsfl script here.
In this tutorial I discuss the differences between creating your own movieClip buttons and using the button component.
Well, I got the site up sooner than planned, but with fewer tutorials than I intended to start out with.
I look forward to adding more to this list, and I intend on making a few more changes to the overall look and feel of the site.
The next step is to get the flv player up and running, and get more tutorials out there.
Thanks for being so patient!
P.S. Happy fourth of July to my fellow Americans!
So here I am early on Monday morning and realizing how much there is to get done with this website! I put the deadline of July 4 out there so I would force myself to get this done. I’ve been wanting to share what I’ve learned (and make good use of Camtasia Studio that I bought last year!), so with that I am setting an official time that this website will appear.
Official Launch Time: 10:00pm MDT, July 4, 2006.
Please keep in mind that this website is continually developing and so you may see things change a bit over the next few months.