Thursday, May 08, 2008
flash 9 audio
The supported audio formats for external audio in Flash 9 are MP3 and FLV.
Using Sound in ActionScript 3: Part I
how to make actionscript 3 play generated pcm wave data - Wacky and wild.
soundwriter
SoundWriter is a neat little ActionScript 3.0 library that lets you create your own sound files for Flash 9 on the fly.
Flash SoundTransform
Something I just ran into with Flash: If you want to change the volume of a Sound object, though the SoundChannel you get when you press play and then through the SoundTransform object, you have to instantiate a SoundTransform object and apply it to your SoundChannel, like this:
mySoundTransform = new SoundTransform;
mySoundTransform.volume = 0.5;
mySoundChannel.soundTransform = mySoundTransform;
Tuesday, May 06, 2008
ERR
Runtime errors in Flash 9.
I was stumped for quite a while this afternoon about the error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Flash5$/mouseMoveListener()
I just turned out that I had redeclared a variable inside the new() constructor, like this:
class Zoomer extends Sprite {
private var box:Sprite;
private var dragleft:Sprite;
public function new() {
super();
var dragleft = new Sprite();
}
function mainMove (e:MouseEvent):Void {
dragleft.x = e.stageX;
}
That var shouldn't be in there, it should look like this:
class Zoomer extends Sprite {
private var box:Sprite;
private var dragleft:Sprite;
public function new() {
super();
dragleft = new Sprite();
}
function mainMove (e:MouseEvent):Void {
dragleft.x = e.stageX;
}
stribe
The Stribe is a really neato controller for music with 1024 invididually addressable LEDs and using softpots for control. All plans are available from the inventor, Josh Boughey. Nice.
Monday, May 05, 2008
getBytesLoaded
getBytesLoaded is not in ActionScript 3, it was removed. Instead use URLLoader and the bytesLoaded property.
Subscribe to:
Posts (Atom)