I want to use coroutines in actionscript to implement a state machine.
I'd like to be able to do something like the following
function stateMachine():void
{
sendBytes(0xFFFF);
var receiveBytes:ByteArray = yield()
sendBytes(receiveBytes);
}
stateMachine.send( Socket.read() )
like in this blog entry