Currently Browsing: Actionscript

AS 3 Performance Monitor

Here’s a simple performance monitor you can add to your flash projects. You simply pass in a display object and an optional boolean. The boolean enables the auto start, by default it is set to true. You will notice the implicit setters and getters which gives you a bit of control of the monitor display. You can stop and start the monitor if need be. You will also notice when you hit a memory leak, it...

AS3 Code Snippets

The code snippet repository is my contribution to the community. These are functions that I tend to re-use and could easily be made into static functions and placed into a utility class, but I’ll leave that up to you. Check back often, for I while keep updating this posting when I have time between gigs. Remove Children from a display list /* Method: removeAllChildren Parameters: inDsp:DisplayObject Returns:...

AS3 Simple MVC

Here’s my idea of a simple MVC with the designer in mind. I originally wrote it in 2007 in AS2 with the help from a good friend Pete Rice. I revised it a bit and re-wrote it in AS3. Like I said it’s simple! It focuses on what designers know best, the timeline/MovieClip. It’s perfect for micro-sites or small RIA’s, its also ideal for single developers. It accomplishes what an MVC sets...

AS 3 Simple Video Player

On my last freelance gig, I created a simple Flash video player for a landing page. I took the existing code and extended it to create a SimpleVideo class that could be useful for Flash newbies or designers. I added the ability to pass in a MovieClip where a designer could create a stylish interface and load the video player into it. The first example below, loads up an flv and starts playing it. I added the...

Back In The Game

So, I took the plunge and decided to take a contract with an advertising agency (Euro RSCG) to create flash pieces for a pitch. At first, I was wondering why I would do such a thing knowing that the work would be a bunch of banner ads and micro-site landing pages. The bane of my existence, I’m used to building RIA’s with Flash not the annoying things that people complain about Flash. Nevertheless,...

MVC the Model-View-Controller Pattern

The time has come, I’m in need of a new portfolio website. I have started the planning stages of my interactive application architecture. I have chosen to use the MVC pattern vs the MVP (Model-View-Presenter) or the PAC(Presentation-Abstraction-Control). I have been using the MVC for the past 3 years and I have acquired a great admiration for it. Well what is a MVC pattern? In a nutshell the MVC pattern...

AS 3.0 blur filter using the Tween classes.

Here’s another AS 3.0 test I scripted up just for fun. As you know the Tween engine in flash will only allow you to tween properties of a MovieClip. I on the other hand have been using the tween classes to tween filters and just recently transform color. It’s just another way to create an animation with out an OnEnterFrame Event or using the Timer Event. The example below loads up an image in a...

AS 3.0 Color Transform Animation.

As I start to test out ideas for my new portfolio site, I scripted up an example of how to change color on shapes or MovieClips in AS 3.0. Well, it first started out as a basic Color Transform but then it evolved into a sort of color pusher, (if you will). I scoured the internet to make sure I was not re-inventing the wheel. I found some code snippets from Senocular which helped out a lot. The result is a square...
Page 3 of 41234
Coding Color | 2009 All Rights Reserved.