Archive for June, 2006

Intel Mac public beta of Flash Player 9

Emmy Huang, Product Manager for Flash Player at Adobe, posted that the public beta site is up for the beta version of Flash Player 9 (9.0.18.0) for Intel-based Macintosh.

Head on over to her blog and check it out!

Adobe Developer Week session videos

I completely missed this last week, but just spotted it on digg.com.
Ted Patrick, a Flex Evangelist at Adobe, posted last week on Adobe Developer Week Sessions which were recorded a couple of weeks ago. Head on over and watch a few sessions via Breeze.

Event.ID3

Listening for ID3 tags in ActionScript 3.0 is slightly different from ActionScript 2.0. In ActionScript 2.0, you used the onID3 event handler to detect when the ID3 information was detected, as seen in the following example:

var url:String = "http://www.helpexamples.com/flash/sound/song1.mp3";
var mp3:Sound = new Sound();
mp3.onID3 = function() {
var songInfo:Object = this.id3;
trace("ID3 loaded");
trace("\t artist: " + songInfo.artist);
trace("\t track: " + songInfo.track);
trace("\t comment: " + songInfo.comment);
trace("\t songName: " + songInfo.songName);
trace("\t album: " + songInfo.album);
trace("\t genre: " + songInfo.genre);
trace("\t year: " + songInfo.year);
}
mp3.loadSound(url, true);

In ActionScript 3.0, you instead use the addEventListener() method and a URLRequest object to load the sound, as seen in the following example:

var url:String = "http://www.helpexamples.com/flash/sound/song1.mp3";
var request:URLRequest = new URLRequest(url);
var mp3:Sound = new Sound(request);
mp3.addEventListener(Event.ID3, id3Handler)
mp3.play();

function id3Handler(event:Event):void {
var song:Sound = Sound(event.target);
var songInfo:ID3Info = ID3Info(song.id3);
trace("ID3 loaded");
trace("\t artist: " + songInfo.artist);
trace("\t track: " + songInfo.track);
trace("\t comment: " + songInfo.comment);
trace("\t songName: " + songInfo.songName);
trace("\t album: " + songInfo.album);
trace("\t genre: " + songInfo.genre);
trace("\t year: " + songInfo.year);
}

Developer Center super update

In addition to the release of Flex 2, Flex Builder 2, Flash Player 9, Flash Professional 9 ActionScript 3.0 Preview, and everything else, the Developer Center managed to publish oodles of articles. So if you’ve already downloaded the trial software, and want to know where to start, read on….

Continue reading…

Movable Type 3.3: Ready for [almost] release!

Six Apart have put the lid on the MT3.3 beta and are calling the product “ready for release”. It seems like the front page is still offering up MT 3.2, but you should be able to grab 3.3 tomorrow.

To read more about Movable Type and all the new/awesome features in 3.3, head over to the beta site.

[“Movable Type 3.3: Ready for release!” Six Apart]

SoundMixer.computeSpectrum()

I was playing around with ActionScript 3.0’s new SoundMixer.computeSpectrum() method last night, and managed to build this simple example:

var url:String = "http://www.helpexamples.com/flash/sound/song3.mp3";
var request:URLRequest = new URLRequest(url);
var s:Sound = new Sound();
s.addEventListener(Event.COMPLETE, completeHandler);
s.load(request);
var song:SoundChannel = s.play();
song.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
var ba:ByteArray = new ByteArray();

var gr:Sprite = new Sprite();
gr.x = 20;
gr.y = 200;
addChild(gr);

var time:Timer = new Timer(50);
time.addEventListener(TimerEvent.TIMER, timerHandler);
time.start();

function completeHandler(event:Event):void {
event.target.play();
}
function soundCompleteHandler(event:Event):void {
time.stop();
}
function timerHandler(event:TimerEvent):void {
SoundMixer.computeSpectrum(ba, true);
var i:int;
gr.graphics.clear();
gr.graphics.lineStyle(0, 0xFF0000);
gr.graphics.beginFill(0xFF0000);
gr.graphics.moveTo(0, 0);
var w:uint = 2;
for (i=0; i<512; i+=w) {
var t:Number = ba.readFloat();
var n:Number = (t * 100);
gr.graphics.drawRect(i, 0, w, -n);
}
}

(** Sorry about the lack of formatting. I’m working on getting the blog restyled, and adding a bunch new AS2 and AS3 examples.)

UPDATE: Tom Green wrote a great article on the SoundMixer class over on Community MX, check it out: Sound Visualization in Flash CS3.

Adobe releases Flex 2, Flash 9 AS3 Preview, bunch of other stuff

It’s a big day for Adobe. Over the past 12 hours, we’ve released:

Please feel free to check them all out and give us feedback. We also have new articles up on the Developer Center, and documentation posted up on LiveDocs (Flex 2, ActionScript 3.0 Language Reference, Programming ActionScript 3.0).

Whew!

First Post!

Welcome to yet another Adobe employee blog!
My name is Peter deHaan, and I work at Adobe as a documentation writer for Flash and various things “ActionScript”. Over the next few weeks i hope to post a lot on ActionScript and migrating from ActionScript 2.0 to ActionScript 3.0. I’ll also see if I can create a few examples which look a bit closer at some of the new features in ActionScript 3.0, such as RegEx, E4X (the *NEW* XML in ActionScript 3.0), and things like the Timer class, and the flash.net package. I’m a former ColdFusion enthusiast (CF-thusiast, if you will) so forgive me if I’m a bit biased towards CF in my examples. ;)

Finally, I’ll try and shed the default Movable Type template and find something a bit more visually appealing (and functional), and see if i can add individual RSS/Atom feeds for categories and comments.

If you have any questions/comments/flames, feel free to leave them in the comments. The documentation folks always enjoy hearing what we’re doing right (and wrong) and how we can improve the documentation.