Something Wrong with the System

A Flash/Actionscript blog

Flash Pie Chart complete in Flash AS3 AND Flex!

Get Adobe Flash player

Before I begin I’d like to point out that you can buy this 3D Flash Pie Chart for $10 from this link.

About half a lifetime ago I posted about the Pie Chart I was working on.

I spent a hell of a lot of time turning that AS3 Pie Chart into a proper component. Adding a lot of behind the scenes functionality. Making it Flex compatible. Making sure it was 100% code based. As well as writing up a bunch of documentation.

What I was left with was a Flash Pie Chart which looks almost exactly like the one I did in September except this one has a lot of useful functionality for developers and is much more CPU efficient.

I’ve been selling the Pie Chart component on Activeden (formerly Flashden) and folks seem happy: a 5 star rating and lots of positive feedback!

Anyway if you’re in the market for an AS3 based Pie Chart you can get an awesome one written by me. It’s only $10.

Also, I’m sorry I haven’t posted in such a long time. I recently bought my first condo and haven’t had time to work on side projects! Things are starting to settle down now, and I’m already thinking of a new swarm based project.

March 11th, 2010 by Peter Organa
Posted in Flash Components, Programming, Super Cool | Comments Off

Making AS3 components is harder than I’d imagined…

I’ve updated the Flash Pie Chart, made it more awesome and put it up for sale on ActiveDen as a Flash component and Flex Class!
Check it out! It’s pretty rad!

So as I wrote earlier I’m working on transforming my 3D Pie Chart into a proper AS3 component.  Holy crap, it’s harder than I thought!

By far the most useful resource I’ve found is this one written by Jeff Kamerer from Adobe.  The document is divided into 9 parts (it’s a small book!) and covers:

I’ve trudged my way through the first 3 parts and… GREAT SUCCESS!  I’ve got my Pie Chart publishing from a component inspector window (shown on the left).

The bit of code that caused me the most grief is the section that pertains to the dataProvider.  It seems that if I want custom parameters in my Component Inspector I need to create my own DataProvider classes.

[Collection(collectionClass="ca.organa.Data.Collect", collectionItem="ca.organa.Data.ComponentInfo", identifier="sliceLabel", name="Pie Chart Data")]
 public function set dataProvider(value:Collection):void {
 if (_dataProvider != null) {
  _dataProvider.removeEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange);
  _dataProvider = value;
  _dataProvider.addEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange, false, 0, true);

Jeff covers the topic here.

I’ll post about components again once I’ve gone further into this stuff.  My next challenges are going to be getting live preview working, and getting a proper colour picker in the component inspector (is that even possible?). Read the rest of this entry »

September 8th, 2009 by Peter Organa
Posted in AS3, Flash Components, Programming, Source Code | Comments Off

My AS3 3D Pie Chart

I’ve updated the Flash Pie Chart, made it more awesome and put it up for sale on ActiveDen as a Flash component and Flex Class!
Check it out! It’s pretty rad!

First an FYI, this is a showing off post.  I’m not sharing the source for this as I’d like to explore the idea of selling the Pie Chart as a Flash Component.

Recently at work I’ve been doing on a bunch of charts (mostly analytics style lines graphs).  When I was finished, I thought to myself: “Well I haven’t done a Pie Chart yet”.
Ultimately, it took me 5 times longer than I would have ever expected, but I did create a fully functional 3D Pie Chart!

  • This is a true 3D Pie Chart with rotation.
  • This is done completely with Flash’s draw API, I don’t make use of Flash10 3D features or Papervision
  • The Pie chart is resizable and all the data/colours are externally configuarable.  You can even change the view angle.

Read the rest of this entry »

September 4th, 2009 by Peter Organa

Zoom In/Out Image viewer (.swf & source)

First of all, I made it to ten posts! W00, I really wasn’t sure if I’d make it this far.

Recently at work, I had to write an AS3 image viewer with zoom and pan capabilities. It was a lot harder than I had anticipated. I decided to write another (much better) version for the blog. I’m hoping that by releasing this code I’m saving a couple people a lot of grief.

You can zoom in/out with the buttons in the bottom right corner, or by using your mouse wheel (Mouse wheel might not work on a Mac! Let me know if it’s an issue or if you have a solution).

After the break you can see the application in action.

I’ll also try to explain some of the ActionScript parts I found interesting.

Read the rest of this entry »

May 18th, 2008 by Peter Organa