New Political Flash Game – taterboy
October 8th, 2008 | Filed under: Flash AS2 to AS3

I like to at least add a post once a week, but this past friday I had an idea for a quick flash project. Like everything quick, it never is. Finally here is the result of that idea.

WhackyVoting

Read More »

Technorati Tags: , , , ,

| No Comments »

Is AS3 Ready For Prime-Time? (part 3) – taterboy
September 27th, 2008 | Filed under: Flash AS2 to AS3, Tips

Targeting Loaded swfs and Streaming

As we move into the Object Oriented mindset, communication between a host and loaded swf can be a little controversial. Though using bubbling events is great for easy plug and play type communication, establishing a direct connection to pass information can be more efficient.

As a comparison, to load an swf into an AS2 project, all you have to do is tell a MovieClip to load an swf and then that MovieClip will take on all the attributes of the loading swf. To access the loaded timeline you use, MovieClip.gotoAndPlay(2);

In AS3 all loaded swfs are loaded into a loader object that is added to a container. To access the timeline of a loaded swf you would use an instance of the Loader Object’s content.

var loadedSwf:Object = Loader.loaderInfo.content; 
//or 
var loadedSwf:Object = Loader.contentLoaderInfo.content; 
 
//then: 
loadedSwf.gotoAndPlay(2);

Here are a few things to keep in mind when communicating with loaded swfs with AS3.
Read More »

Technorati Tags: , , , , , ,

| 1 Comment »

Easy Custom Scrollbar Class for TextFields (AS2) – taterboy
September 17th, 2008 | Filed under: Design, Flash AS2 to AS3

Here is the twin brother of the Easy Scrollbar MovieClip Class that works with TextFields. It does not require the masking and is perfect for Input TextFields. It has all the features of the MovieClip version except for easing. TextFields scroll one line at a time which is not very smooth.
Read More »

Technorati Tags: , ,

| 1 Comment »

Tampa Flash, Flex and AIR Developers Group – taterboy
September 16th, 2008 | Filed under: General Info

The Tampa Flash, Flex and AIR Developers Group has launched their website with their first meeting scheduled for October 7th, 2008 at 7:00 PM. They have some cool things planned and some great sponsors. The meeting will be held at the Art Institutes of Tampa and refreshments provided by the International Culinary Schools.

Greg Wilson, from Adobe, will be the presenter for the inaugural event and we can expect frequent visits from Adobe representatives in the future. Find out more at www.tffadg.com and RSVP if you are in the area.

Technorati Tags: , , , , ,

| No Comments »

Easy Flash Custom Scrollbar Class (AS2) – taterboy
September 10th, 2008 | Filed under: Flash AS2 to AS3, Tips

I know there are some really nice scroll components similar to this on the web, but I think this still has merit. It seems like every job comes with a different scroll bar design, the buttons and scroll bar can be any shape, size or configuration. While most Flash scroll bar components are easily skinned, this is kind of the opposite of skinning. You create the artwork, convert each item to a MovieClip, then apply the class. The code wraps the artwork instead of the artwork skinning the code.

This class started around 3 years ago and has been modified for many different projects and continued to evolve into what we have today. It is not perfect, but it can handle most jobs needing custom scroll bars.
Read More »

Technorati Tags: , ,

| 21 Comments »

Session Variables and AMFPHP – taterboy
September 3rd, 2008 | Filed under: Flash AS2 to AS3, Tips

In normal uses PHP and other server/scripting languages are able to store variables for later usage. Due to the fact that the these pages are not actually living in a browser, remoting is one of the exceptions where variables do not live between calls. We have to plan out our Flash to PHP conversations as if PHP has very short term memory and include all the needed data to complete every transaction. For instance, if you have to store information in a database using a userID, even though you have just recieved that userID from php, your next php call will have to include the userID because PHP just can not remember.

Here is a demo of using PHP session variables to temporarily store and read data. Even though normal variables vanish, session information is live and well.
Read More »

Technorati Tags: , , , , , , ,

| No Comments »

Try.. Try.. Try.. Error Supression – taterboy
August 27th, 2008 | Filed under: Flash AS2 to AS3, Tips

One of my favorite statements is try..catch..finally.

When building web applications, we as developers need to plan for the unexpected. We know the web does not always behave at the same level of consistency for all users. This does not take into account client systems which can compound minor glitches.

There are also times that you need to compile code that is reliant on external variables. If all the conditions are not returned in a valid format AS3, being very strict, will throw an error and not complete the remaining code sequences as intended.
Read More »

Technorati Tags: , , , , , ,

| No Comments »

Flash and Javascript Communication – taterboy
August 20th, 2008 | Filed under: Flash AS2 to AS3, Tips

Passing Flash variables to Javascript, passing Javscript variables to Flash, Calling Flash functions from Javascript.

There are a few conventions for getting Flash and Javascript to communicate like fscommand, getURL, LocalConnection, URL-encoded variables, FlashVars, SetVariable and TCallLabel to name a few.

Here is a little demo using Flash’s External Interface and Javascript. It is more elegant then most of the procedures I have used in the past. Between External Interface and FlashVars, you should be able to fill most of your needs.
Read More »

Technorati Tags: , , , , ,

| No Comments »

ActionScript 2 (AS2) SuperLoader – taterboy
August 13th, 2008 | Filed under: Tips

Here is an AS2 version of the SuperLoader. It works just like the AS3 version found in the Custom HTML Templates post.

Quick Use:
1. Add loaderbar.swf and mainLoader.swf to your current project directory.

2. In the html file for your current project, replace the src and movie parameters to mainLoader.

3. Then add [,'flashVars','swfURL=FlashProjectToLoad.swf'] to the load script.
Read More »

Technorati Tags: , , , ,

| No Comments »

Simple Hex Color Changer w/ ColorTransform – taterboy
August 6th, 2008 | Filed under: Flash AS2 to AS3, Tips

I was first introduced to the ColorTransform class while reading the AS2 to AS3 migration documentation about setRGB(). I was immediately impressed with the features, but intimidated when I saw the constructor and all the offset, color and alpha arguments. I just needed to change the color of something, nothing special, no gradients, no alpha, no space shuttle landings, just a simple hex color change.

So here is a simple color change utility that is a lot closer to what I am used to.

function paint(obj:Object,color:Number):void{
	var ct:ColorTransform = new ColorTransform();
	ct.color = color;
	obj.transform.colorTransform = ct;
}

source here

Technorati Tags: , , , ,

| No Comments »