ActionScript: Setting up ExternalInterface on Linux

Actionscript, Flash, Ubuntu

I have nearly completed my new portfolio site. I developed the Flash Movie on my Windows machine, but the rest of the development (Joomla, etc) has been done on my Ubuntu box. I’m using ActionScript’s ExternalInterface Class for this project. During integration, I learned that the Javascript code on Linux is a bit different than the code needed for Windows.

Continue reading

Share

ActionScript: Removing Event Listeners

Actionscript, Flash

I came across an interesting problem the other day with regards to AS3 garbage collection. I assumed that when an object is removed from the stage, everything is removed, including event listeners. This is not the case. I created a carousel class for my new portfolio site. The carousel displays images for a specific portfolio category (web, business cards, magazines, etc). When the user clicks a link for a different category, all images for the current category are removed and then the new images are loaded. But when the new images loaded, I received the error:

?View Code ACTIONSCRIPT
Error #1009: Cannot access a property or method of a null object reference.

After some testing, I found that the event listeners were not being removed.

Continue reading

Share

Creating a Multi-View Joomla Template

Joomla

I have nearly completed my new portfolio site. I built it using Flash and Joomla. I created a Flash application to display the actual portfolio (thumbnails, links, etc). I then created a Joomla component and module (gsPortfolio) that incorporates the Flash portfolio application.

When I created the Joomla template for my site, I designed it specifically for the display my portfolio. Unfortunately, this layout was not generic enough to accommodate secondary pages (my portfolio is displayed on the home page). After looking at the code of the JA_Purity template, I was able to figure out how to create multiple views in a single template.

Continue reading

Share

ActionScript: Using Lightbox With Flash

Actionscript, Flash, JQuery

I’m working on a portfolio site where I’m using Flash to display my work. When a user clicks on a link for a website that I designed, they will be taken to the actual website. But when the user clicks on the link for book cover or magazine, I want the large image to be displayed using lightbox (A JQuery Plugin). The primary reason is that I want to use lightbox is because the Flash movie has a height of 225 pixels – not nearly enough to display a large image. Surprisingly, with the help of ActionScript’s ExternalInterface Class and JQuery, creating this functionality was easier than I thought.

Continue reading

Share

ActionScript: Extending Custom Classes

Actionscript, Flash

Extending a custom class with ActionScript is fairly straightforward. As part of my gpAS3Library, I have a button class (gpButton) that extends a shape class (gpShapes). Originally (in my AS2 version), I instantiated the shape class from within the button class and the shape class was always a separate entity. Now that I have created the button class by extending my shape class, interacting with and manipulating the button is much more tidy and easier to maintain.

Continue reading

Share

AS3: Access URLRequest Return Data

Actionscript, Flash

I’m creating a new portfolio site using Joomla and Flash. I’ve spent this past weekend creating AS3 class packages (and converting some of my AS2 classes to AS3).

I began loading thumbnails using AS3′s URLRequest and URLLoader in my main application file. I decided to create a package that would request/load the thumbnails, but I needed to return the data from the URLRequest to my main application. I was able to accomplish it using the dispatchEvent method.

Note: This functionality is the basis for my gpUrlLoader class (part of my gpAS3Library).

Continue reading

Share

AS3: A URLLoader Class

Actionscript, Flash

I’m working on a Flash/AS3 application where I am loading various types of files (images, xml, etc). After writing the same code over and over again, I decided to create an AS3 class to use with my application. This class will load image, swf, text, xml, html, stylesheet, json, and sound files.

Continue reading

Share