Archive for July, 2006

Creating 3D Carousels III Tutorial

In this last installment we set the release states for the icons in the carousel. When one is clicked on, all the other icons scale back and a paragraph of text is displayed. This text is also being read in using XML. What you end up with is a cool, little Flash site. Check it out at http://www.gotoandlearn.com.

Enjoy!
Lee

Creating 3D Carousels II Tutorial

I have uploaded Creating 3D Carousels II which starts off where part one ended. In this tutorial I show how to create a dynamic, XML-driven carousel of icons. I also show how to implement tooltips that follow the path of the icon that spawned it. I am planning on doing a part three which will turn this carousel into a mini Flash site. Check it out at http://www.gotoandlearn.com.

Hope you like it!
Lee

Creating 3D Carousels Tutorial!

I just uploaded a new tutorial called Creating 3D Carousels that shows how to use the Math.sin() and Math.cos() function to build a slick looking 3D carousel. For some reason, people just love carousels. I’ll admit that I love them too. This is something that your client and boss will love, regardless of how useable it is :-) . See the finished product below and use your mouse to control the rotation.

This tutorial is over 30 minutes long and is around 50 megs so make sure that you free up enough browser cache. The tutorial can also be downloaded using the new link in the Now Playing panel. Check it out at http://www.gotoandlearn.com.

Hope you like it!
Lee

Using Custom Classes Tutorial

I just uploaded a new tutorial called Using Custom Classes that explains the basics of how to find, organize, and implement custom Actionscript classes into your Flash projects. First off we look at how to set up an organized directory structure for all of your Actionscript files. Then I give you a few tips for finding Actionscript classes on the web, as well as showing you the basics of decompiling. Lastly, I show you how to setup your Flash environment so that you can begin using all of the cool classes that you find. Check it out at http://www.gotoandlearn.com.

Lee

WPF and Flash 9 Integration!

That’s right, it’s not a typo! This experiment started out as me simply trying to learn how to include Flash in a WPF project. There are many resources out there for doing this. Once I got that done I decided to take it further by incorporating some of the great new Actionscript 3 features in Flash Professional 9. If you saw my other experiments where I took audio spectrum data from After Effects and used it drive to WPF animations, you’ll remember me wondering if we could do this type of analysis on-the-fly. Well after a bunch of research I found out that it is possible but *very* complicated.

Then last week Adobe released a preview version of Flash Professional 9 which supports Actionscript 3 It contains a new computeSpectrum() function that will do this very type of real-time audio analysis. I have done a few experiments using this and it is FAST! So this experiment is a WPF app that embeds a Flash 9 SWF. That SWF is playing and analyzing a music file. It is sending that information to the WPF app using the ExternalInterface API. The WPF app is then using that data to do some 3D animation on the 4 torus meshes which I built in ZAM3D. It also includes the Trackball class so you can zoom and rotate the objects as they animate.

Unbelievably it works like a charm! And not only that, but it is really fast and could probably handle much more data traffic between these two rival technologies :-)

Below is a rundown of the process I used and exactly what is happening here:

  1. The WPF app creates a regular windows form containing the Flash ActiveX control. It doesn’t actually get added to the visual tree however.
  2. It then loads the SWF file into the ActiveX control. I am hosting the SWF online because I couldn’t figure out how to include it with the build.
  3. The SWF file first loads the music file which is also hosted online. Due to sandbox restrictions you can only analyze files on the same domain.
  4. It then creates an EnterFrame event which analyzes the music file. The computeSpectrum() method returns 256 channels of audio data. Since I’m only using 4 graphics in WPF, I break the data into four bands and average them so that I end up with four bands of information.
  5. The SWF then calls a C# function and sends the data as XML using the ExternalInterface API.
  6. Lastly, I’m using this audio data to perform RotateTransform3D transforms on the four 3D shapes

This could open up so many possiblities as you can basically use Actionscript 3 in your WPF apps. Flash acts as the data provider to your application for things like animation and rich media. Of course I have no idea about performance or scalability. But it’s still a potential workflow for certain things.

You can get the application by clicking on the screenshot above and the source is up there too. The June CTP and Flash 9 are required to check it out.

Lee

gotoAndLearn() Sound Spectrum Challenge!

It’s time for another contest over on the forums and this time it will be based on the new AS 3 computeSpectrum() function. As you’ve probably read in my earlier posts, this function allows you to analyze a sound file and use it to create sound-driven animations. Go on over and check out all the rules and details. The good folks over at Lynda.com have generously donated some great prizes for the top entries and I’m working on getting even more. Now go read some bytes!

Lee :-)