Actionscript

Super Easy Email Validation AS2

I needed a quick and easy way to check for the basics of an email address.

Read More

1180 Call to a possibly undefined method navigateToURL

1180 Call to a possibly undefined method navigateToURL If you get the above error when trying to run your flash actionscript 3 file, you are obviously trying to use the navigateToURL() function but have not imported the flash.

Read More

How to use a Timer in Actionscript 3

It is really easy to create a Timer in Actionscript 3.

Read More

Actionscript 2 – PHP Data Transfer

In the below example we will use Actionscript 2 to call a remote PHP file that will return data to it.

Read More

Actionscript2: Split string by line length with & without word-wrap

Split string into sentences by max line length. This uses a character array but doesn’t use word-wrapping.

Read More

Error 1046: Type was not found or was not a compile-time constant: Event.

Error 1046: Type was not found or was not a compile-time constant: Event.

Read More

Add a date to a date in Actionscript 2

I needed to work out a date range according to the date 3weeks away from the current date.

Read More

Add a month to selectable date range – Date Chooser – Actionscript 2

I have been working on a project where I need to select a date range starting today and ending a month from now, so the user cannot select anything in the past or over a month from now.

Read More

hitTest and Actionscript2

if (mc.hitTest(_root._xmouse, _root._ymouse, true))) { trace("hitTest Run"); }

Read More

Limited numeric input in flash actionscript 2 textfield

If you want to only show numeric characters in a textfield in flash actionscript you can use the following code:

Read More

Enable / Disable Cursor Hand in Actionscript 2

If you have a movieclip that by default has the hand cursor showing on RollOver and you don’t really want this, you can disable it by doing the following:

Read More

Calling event functions from movieclips in actionscript 2

In a flash movie I usually have a frame of actionscript that controls all elements in the file to keep everything in one place.

Read More

Security error: securitySandboxError with Flash

You have a flash uploader and you get this error:

Read More

Capitalize First Letter in Word – Actionscript 2

You have a string and you want to capitalize the first character but have the rest of the word in lowercase.

Read More

Stage align and Stage scale in actionscript 3

If you want to position the flash top/left and not have it scale when you resize it’s bounding box window, you can set the following code.

Read More

Remove an onRelease Handler

After creating a onRelease handler in Actionscript 2 as follows:

Read More

Online Flash IDE Anybody?

Anyone up for an online Flash IDE? Take a look at this:

Read More

Papervision Event Listener Idea

The problem: While working on a Papervision3D Flash Project I had a problem where a back button that sits above the 3d canvas and acts as a main navigational item was required to change Events according to where the site was in 3d space at the time.

Read More

Don’t cache my swf files!

I often have issues where ‘dumb browsers’ cache my published swf files and when they dynamically populate they don’t always update.

Read More

Clear an array in Actionscript 3

I personally really like this way of clearing an array’s elements:

Read More

Change combobox font size in Flash Actionscript

Ever needed to change the font size of a standard flash combobox component?

Read More

Transparent swf in html

So you have now placed a swf file into your html page and you want to be able to see through it.

Read More

Papervision error 1046

Error: “1046: Type was not found or was not a compile-time constant: InteractiveScene3DEvent.

Read More

Trying to get variables into flash from the browser!

Ever wondered how to get variables from an html page to a flash element?

Read More

Flash Tweening

tween is an actionscript class and can be used after importing the core files.

Read More

Animate with Actionscript [part1]

// Created by Andrew Odendaal // // :: DESCRIPTION :: // Animate a ball moving to the top // of the screen/stage and back again // // :: HOW TO USE :: // create a circle shape, convert to a movieclip(mc) and // place the registration point at the bottom center.

Read More

How to load xml into flash using actionscript 2

Create an xml object: var myXmlObject = new XML(); Perform action when xml file has been loaded:

Read More

Uppercase text in Actionscript

var lowerCase:String = "sample text"; var upperCase:String = lowerCase.toUpperCase();

Read More

Actionscript 3 equivalent of PHP’s print_r

A brilliant version of print_r for actionscript: http://dev.base86.com/solo/47/actionscript_3_equivalent_of_phps_printr.html

Read More

Global variables and functions in Actionscript 2

In order to reuse a variable from a different timeline within the same fla file you will need to register the inital variable or function as a _global.

Read More

Actionscript conflicting class name

I had a problem today where I got a flash source file from one of my developers’ and I couldnt compile it because it said that there was a conflicting class name, however, it turned out to just be a timestamp issue.

Read More