10
Nov
06

VitalStream + ActionScript3 = NetScream Object

As I’m getting into flex2 more I decided to upgrade my multimedia classes to ActionScript3. I use VitalStream for streaming media Not far into it I received the following error:

Error #2126: NetConnection object must be connected.

This would happen whenever I tried to connect to the VitalStream Server.

After digging a little I saw that it was an object encoding error.
After pulling out some hair I started looking around on LiveDocs I found the following:

Connecting exclusively to a server that was released prior to Flash Player 9, such as Flex 1.5 and FlashMedia Server 2. In this scenario, set the static defaultObjectEncoding property to ObjectEncoding.AMF0.

var netConnect:NetConnection;
netConnect = new NetConnection();

netConnect.objectEncoding = flash.net.ObjectEncoding.AMF0;
Setting the encoding correctly upfront will fix your problems and save you some hair.

Thats it for now.

-s


1 Response to “VitalStream + ActionScript3 = NetScream Object”


  1. 1 Feb 19th, 2007 at 9:07 am

    Administrare server


flickr