Sunday, August 8, 2010

BitmapData Glow Trails


Many people have created trails using BitmapData so today I actually learned how to do it. This is really fun stuff!
[as]import mx.transitions.easing.*;
import mx.transitions.Tween;
import flash.display.BitmapData;
import flash.filters.*;
import flash.geom.ColorTransform;

var bmd:BitmapData = new BitmapData(600,400,true,0×00000000);
this.createEmptyMovieClip(“bmdc”,1);

this.createEmptyMovieClip(“ballc”,2);
ballc.attachMovie(“ball”,”ball”,0);

var bf:BlurFilter = new BlurFilter(5,5,1);
var gf:GlowFilter = new GlowFilter(0x0099CC,30,35,35,1,1,false,false);
bmdc.filters = [bf,gf];
var ct:ColorTransform = new ColorTransform(.5,.9,.2,.99,1,1,.7,.99);

bmdc.attachBitmap(bmd,0);
function moveIt(who) {
var tw:Tween = new Tween(who,”_x”,Normal.easeOut,who._x,Math.random()*Stage.width,2,true);
var tw2:Tween = new Tween(who,”_y”,Normal.easeOut,who._y,Math.random()*Stage.height,2,true);
var tw3:Tween = new Tween(who,”_rotation”,Normal.easeOut,who._rotation,Math.random()*720,2,true);
tw.onMotionStopped = function() {
moveIt(who);
}
}

this.onEnterFrame = function() {
bmd.draw(ballc);
bmd.colorTransform(bmd.rectangle,ct);
}

moveIt(ballc.ball);
[/as]

Vectorized Video with Illustrator CS2


Here’s a sneak peak at the newest tutorial I’m working on for gotoAndLearn(). It shows how to turn normal video files into 100% vector shapes for use in Flash 8. This is accomplished using nothing more than Adobe Illustrator CS2. You can also do this type of video with Flix Pro, but by using Illustrator, you can actually do a much better job. This technique can produce a whole range of special effects and can create extremely small filesizes if optimized correctly. See the example below which is just a video file of me talking. The y of the mouse controls the scale so you can see that it’s all vector!

Sorenson Squeeze 4.3 Demo Tomorrow!


I’ll be doing a casual demo of the new Sorenson Squeeze 4.3 compression Suite over at the Sorenson booth at 12:00 tomorrow. That’s assuming my flight doesn’t get delayed. It’s really bad weather here right now. But either way I will be doing it a couple of times during the conference. I will just be showing the basic workflow of how I work with Squeeze and why why I think its the best encoding tool out there. And no I don’t work for Sorenson whatsoever :-)
This will be really casual so feel free to come by with any questions on Flash video and Sorenson Squeeze.

French XML Files in Flash


I often work on international projects here at Stanford and I’ve always had trouble with all of the accented characters. I would usually embed the specific character into the textfield but this was often tedious. So below is a string of all of the French accent characters that you can copy and paste into the embed box.
â? ? ùæçéèêëîïôœùûü«»ÜÛÙŒÔÏÎËÊÈÉÇÆÄÂÀ
Also You have to make sure that you save your XML file in UTF-8 format.
Just in case you need to do some French sometime :-)

Flash Video CD-ROM Now Available!


Flash Professional 8 Video Integration is now available over at Lynda.com. The price is $99, which considering how many hours I put into it, is a pretty good deal. Buying the CD-ROM gives you all of the exercise files unlike the basic Lynda.com online subscription. If you want to know about Flash video, this is thing to get! And I just want to give a special thanks to Stefan Richter for helping with the Flash Media Server section.
For those of you who helped out with this project, I won’t be able to send you your free copies until I get them in. Hopefully it will be very soon.

Video iPod Flash Tutorials!


I’ve just finished my first experiment with creating Flash tutorials for the video iPod and am really happy with the results. Now you can learn Flash on the train, in the doctor’s office, on a plane, etc. This first tutorial shows you the basics of creating scrubber and slider bars which have thousands of uses inside of Flash. I’m not sure if these will be downloadable from the gotoAndLearn() site or if I will get a separate domain name for these. But for now, download the first tutorial and let me know what you think. Click on the image below to download the ZIP file which contains the iPod-ready video tutorial.
Give me your feedback

Need iTunes – iPod Help!


So if you saw my last post, I am now doing Flash tutorials for video iPods. But I myself am a total newbie when it comes to iPods, iTunes, etc. I’m having some weird issues that hopefully someone can help me with:
1) Sometimes I add a video with iTunes and it shows up fine in the videos -> movies -> directory. Other times when I undock my iPod it puts all my music AND videos into the music folder and if I try to play a video, all I get is the audio.
2) If I create a site for these tutorials, how can I set it up through iTunes so people can automatically get them? Like I said I’m new to the whole Mac world.
3) Also can anyone who has downloaded the tutorial and watched it comment on the quality and if there were any bugs?
Thanks so much

After Effects and BitmapData Fun!


Here’s another experiment using trails with BitmapData. This time I exported a text animation from After Effects and used that as the source. Lots of cool possibilities here!

BitmapData Random Flower


Just more fun with the BitmapData and ColorTransform classes. Click on the image below to see the animation or click here. Thanks to Janice Joplin for the 60′s soundtrack as this has a very psychadelic feel. And only 9.5k!
[as]#include “lmc_tween.as”
import flash.filters.BlurFilter;
import flash.display.BitmapData;
import flash.geom.ColorTransform;

var bmd:BitmapData = new BitmapData(Stage.width,Stage.height,true,0xFFFFFF);
this.createEmptyMovieClip(“bmdc”,1);
bmdc.attachBitmap(bmd,0);

var bf:BlurFilter = new BlurFilter(5,5,1);
bmdc.filters = [bf];

var rr:Number = Math.random();
var gr:Number = Math.random();
var br:Number = Math.random();

var ct:ColorTransform = new ColorTransform(rr,gr,br,.9,rr,gr,br,.9);
this.createEmptyMovieClip(“holder”,2);
holder.attachMovie(“flower”,”flower”,0);
holder.flower._x = Stage.width/2;
holder.flower._y = Stage.height/2;

function moveIt() {
rr = Math.random()+.5;
gr = Math.random()+.5;
br = Math.random()+.5;
ct = new ColorTransform(rr,gr,br,.99,rr,gr,br,.99);
holder.flower.rotateTo(holder.flower._rotation+Math.random()*100,.3,”easeOutQuad”,0,moveIt);
holder.flower.scaleTo(Math.random()*230,.3,”easeOutQuad”);
}

this.onEnterFrame = function() {
bmd.draw(holder);
bmd.colorTransform(bmd.rectangle,ct);
}

moveIt();
var s:Sound = new Sound();
s.loadSound(“joo.mp3″,true);
s.onSoundComplete = function() {
s.start();
}[/as]

Actionscript 2.0 Cheat Sheet Flashpaper


This is a nice cheatsheet of all the Actionscript 2.0 classes and methods. I believe it was created by Mike Chambers. See the FLashpaper version below.

leebrimelow.com Fractal Slideshow


I made a slideshow of those awesome images that I mentioned in the previous post athttp://www.leebrimelow.com. You can click on the music bars to change the track. I love these images!

Flash Professional 8 Video Integration Now Live!


Flash Professional 8 Video Integration is now live over at the Lynda.com online learning library. The CD-ROM version will be available in a couple of weeks. This title is an in-depth look into using video in your Flash projects. I pretty much covered everything in these tutorials so if you want to learn Flash video, this is definitely the place to go. Those who aren’t members of Lynda.com can still view some of the movies for free.
Check it out at over at Lynda.com.
Let me know what you think of it :-)