Archive for the ‘Uncategorized’ Category

Rtmp protocol released

Tuesday, June 16th, 2009

Adobe finally released the RTMP protocol to the developer community, so reverse engineering it should no longer be needed if you wanna work with the flash networking protocol, but cannot afford Flash Media Server or are not working with a flash client.

http://www.adobe.com/devnet/rtmp/

This is great news, because now we (programmers) can all use the more difficult AMF0 and media streaming features of it!

We should be seeing an increase in live streaming applications now.

c# style trace

Tuesday, April 14th, 2009

Hi, just a little handy AS3 snippet I thought I’d share. It simulates the string.format from dotnet in a trace statement. I decided to name it tracef like printf in c (f = format)

tracef("my location = ({0}, {1}), my name is {2}", x, y, name)

Here’s the debug function:

private function tracef(msg:String, ...arguments):void
{
   for( var i:uint = 0; i < arguments.length; ++i )
   {
      msg = msg.split("{"+i+"}").join(arguments[i]);
   }
   trace( msg );
}

Btw, msg’s are bad for you, at least in your food, but that’s a different story.