Saturday, June 30, 2007

Sound and NetStream bytesTotal is zero until the entire file is loaded in IE

The bytesTotal property only returns the total number of bytes after the sound or video file has completely loaded in both IE and Safari. However, in Firefox bytesTotal will return the total number of bytes in a sound or video file as soon as the file begins to load. Further the loadProgress, ProgressEvent.PROGRESS, event of the sound object does not fire as it should in Internet Explorer and Safari. Adobe makes no mention of this in their documentation! To show load progress in browsers other than Firefox the bytesTotal/getBytesTotal properties cannot always be used. You may need to have the total bytes loaded from XML or elsewhere.

Thursday, June 14, 2007

Magna Cum Laude Complete!

Today, final grades posted assuring that I will graduate Magna Cum Laude with a Bachelors of Science in Computer Science.
(Suma Cum Laude is not offered by Western Washington University, making Magna Cum Laude the highest academic honor awarded.)

Its has been 3 years since I graduated from junior college with a Presidents Medal across degrees in digital media communications and an associate of arts. During the years at WWU, I spent my time delving into advanced physics, mathematics, and computer science exploring the underlying academics on which our interactive arts are founded.

Tuesday, June 12, 2007

flash.media.Microphone.rate What are the acceptable bit rates (bitrates)?


Adobe appears to have forgotten to publish the acceptable values for the flash.media.Microphone.rate property in the ActionScript 3.0 edition of their documentation.

The Adobe documentation on the rate (bitrate) property is limited to the following,
“The rate at which the microphone is capturing sound, in kHz. The default value is 8 kHz if your sound capture device supports this value. Otherwise, the default value is the next available capture level above 8 kHz that your sound capture device supports, usually 11 kHz. “

But, what If you want a rate (bitrate) other than 8 or 11 kHz ? If you are looking for the acceptable bit rates look no further. I dug this out of a tech note.

Sampling rate

Approximate data rate

5

5.512 kHz

1378 bytes/sec, or 11.025 K bits/sec

8

8.000 kHz

2,000 bytes/sec, or 16 K bits/sec

11

11.025 kHz

2756 bytes/sec, or 22.05 K bits/sec

22

22.050 kHz

5,513 bytes/sec, or 44.1 K bits/sec

44

44.100 kHz

11,025 bytes/sec, or 88.2 K bits/sec

Labels: ,

Monday, June 11, 2007

Adobe Flash Player Settings Dialog Box Does Not Appear

I was creating a flash mp3 recorder application today and the Adobe Flash Player Settings dialog box, which gives the user the option to allow his microphone to be streamed back to the server, would not appear. It turns out that my SWF was too small for the settings box to show up. A SWF size of no less than 214 x 137 pixels is required for the settings dialog box to appear.

I got no warning and no error. It would be nice if the window would show up at any size. A warning would also have been fine. Even just shading the window as normal would have indicated that the setting dialog box was just off screen. Instead I got nothing.


Labels:

Friday, June 8, 2007

Slow SWF Publishing Due To Embedded Fonts

Quick Note:
Don't Embed too much font in an FLA file until you are done developing the Flash Application. Embedding fonts can cause extremely long compile times. (Embedding under 75 characters shouldn't cause too much of a slow down.)

Thursday, June 7, 2007

Can’t convert FLV to MP3 due to a vcen.dll error?

When using Total Video Converter on a web server to convert Nellymoser FLV (but not MP3 FLV), you may encounter an error in vcen.dll. You cannot usually invoke the command line version of Total Video Converter directly from your web application. You must make a Windows Service that performs the conversion. We made a service that converted all Nellymoser FLV files written to a specific folder to MP3 files. We were able to do large number simulations conversions this way.

For more information on Total Video Converter see my tutorial on using the Total Video Command line application to convert Nellymoser FLV files to mp3 or wav files.

I will post an example application with tutorial, that walks you through the entire process of doing the Nellymoser FLV to MP3 conversion with Total Video Convert and setting up the Windows Service as soon as possible.

Wednesday, June 6, 2007

ReferenceError: Error #1065: Variable SimpleMP3Player is not defined.

I needed to make a simple flash mp3 player in about two hours today. I quickly setup my classes, launched my application, and this is the error that I got:

ReferenceError: Error #1065: Variable SimpleMP3Player is not defined.

I had set the linkage, in the linkage properties, of a symbol to point to the class SimpleMP3Player.

The class was written as follows:
package
{
import flash.display.*;
class SimpleMP3Player extends MovieClip
{

function SimpleMP3Player()
{
trace("MP3 Player instantiated");
}
}
}

I checked the adobe live docs and read:

1065 Variable _ is not defined. You are using an undefined lexical reference. For example, in the following statements, the statement trace(x) generates an error because x is undefined. However, the statement trace(y) doesn't generate an error because y is defined:

trace("hello world")
trace(x) // x is undefined
var y
trace(y) // No error, y is defined.

It didn't take too long to see that I had simply forgotten to declare the class SimpleMP3Player as public. Nevertheless, there could have been a much better error for this. When you take your compiler classes, they always teach you to include common errors in your parser so you can provide useful error messages. Apparently the Adobe AS3 developers weren't paying attention.

Friday, June 1, 2007

Microsoft Labs Introduces Photosynth

Microsoft Labs has created an amazing new piece of interactive technology called Photosynth. In the presentation below, we see Photosynth connect images gathered from flicker to reconstruct an, almost, 3D environment. While most of what you see is built on very complex graphics algorithms, the effects and the user experience could be preconstructed in Flash. Also, it raises questions about a future SilverLight, Photosynth integration.





Labels: