Archive for November, 2009

Dealing with the NetStatus info codes

(November 16th, 2009)

I never liked dealing with the NET_STATUS info codes that NetStream generates, beacuse I always forget the different codes. And there is no built in class which holds the string constant as representations for the different codes. So I basicly did a very simple wrapping of the status codes from the Adobe Reference into a simple to use class.

Usage

protected function netStream_netStatus ( event:NetStatusEvent ) : void
{
        switch( event.info.code )
        {
                case NetStatusConstants.NETSTREAM_PLAY_START:
                        trace("Start!");
                        break;
        }
}

So if you are like me, with a memory like a pacific sea turtle, this might come in handy. Download it here here, or view the class here.

Bug in the sabreamf drupal module

(November 3rd, 2009)

I stumbled upon this bug while trying out the excellent sabreamf drupal module (which enables flash remoting support for drupal). The problem was that all method calls witch required arguments just failed. So after some peeking under the hood I noticed that the method name was added as a parameter, together with the regular parameters in the service call, something that in the end caused the service fail.

To correct this error, simply remove the $method variable from the call arguments.

Locate the file sabreamf.module in your sabreamf drupal module folder (not to be confused with the SabreAMF folder)

On line 66 replace this line of code…

return sabreamf_method_call($method, array($method, $arguments));

…With this

return sabreamf_method_call($method, $arguments);

All set!