videoPlayer, a reserved word?

I have been going crazy trying to determine why I could not add an FLVPlayback component to my AS2 application without creating an infinite loop. Apparently, I had a movie clip that contained the FLVPlayback I was attempting to add, which was named videoPlayer in the library. I'm happy I can rest now, but it leaves me wondering, is videoPlayer a reserved word?

Labels: ,

FileReference to download server-side file

I was asked today how to download a server-side file through the FileReference object. The issue was that the server-side file was executing before downloading. The FileReference object uses http, rather than ftp, to download files, so any server-side script will execute before being downloaded. You either need to zip it and use the zip as a download or use an intermediate server-side file to write and return a server-side file for download.

Labels: , , ,

Casting: String to Boolean

Convert the string value of a number to a Boolean with AS:

Boolean(Number("0"))

Labels: , ,

Consecutive onRelease/onPress bug

Here's an old issue that suddenly stumped me today. I have a button that acts as navigation and tends to be clicked consecutively in order to advance from screen to screen. The action would only register the first time unless the mouse was moved. Since I had such a hard time finding a solution online I thought that I would add mine to the few I found.

btn.onRelease = function()
{
this._focusrect = false;
Selection.setFocus(this);
}


Feel free to add your two cents, I would love to see other solutions.

Labels: , ,

Why defensive programming is important

The situation:
A flash movie that uses the ExternalInterface to receive data from the LMS through JavaScript.
Receiving the data just fine.

The issue:
The movie freezes as soon as the data is received.

The solution:
When the course initially launches the lesson_location is undefined. Apparently Flash freaks out when setting a variable to an undefined value through the ExternalInterface, so its as simple as setting the lesson_location to 0 in the JavaScript if it is undefined.

Labels: , , ,

Call for contractors

Studio Sedition is looking for a few top notch contractors to help with some ongoing web design and development work. If you are interested in finding out more details let us know what you know and why you think that you'd be a good fit: http://www.studiosedition.com/contact. Please allow us some time to get back in touch with you.

Labels: , , , , , , , ,

Flash CS3 Preview

Flash C3 can be previewed on the Flash Magazine web site. It looks amazing, from a design standpoint it integrates with Photoshop and Illustrator, even layers are supported! My favorite is the ActionScript editing and error checking, this has been an issue with Flash for many years and may finally be what all flash developers have been looking for. Check it out for yourself...

Labels: , , ,

JavaScript Tween Objects

Check out this JavaScript animation engine. For anyone familiar with the Flash ActionScript Tween classes this library looks just as easy to use. Happy tweening...

Labels: , , , ,