I have a netConnection connected to a Flash Media Server. I am trying to use the new appendBytes function from Flash Player 10.1 to stream a local FLV file to FMS. I’m having issues however… Documentation I get online
function playFile(data:ByteArray):void
{
// data is bytearray data from an already loaded FileReference object
netStream.play(null);
netStream.appendBytesAction(NetStreamAppendBytesAction.RESET_BEGIN);
netStream.appendBytes(data);
}
However, I’m getting an error with the appendBytesAction and appendBytes. The error is: Error #2004: One of the parameters is invalid….
TypeError: Error #2004: One of the parameters is invalid.
Any ideas?
Thanks
You can’t use
appendBytessuccessfully when your stream’sNetConnectionis connected to anything else than “null”. From the documentation ofappendBytesmethod at http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#appendBytes%28%29:This almost certainly implies that what Adobe calls “Data Generation Mode” will not be available on a connection object connected to say, a Flash Media Server instance.