Topic: Local Flash Peer to Peer connection using NetConnection/ipMulticast

Hello,

I'm working on an art gallery installation that uses several networked computers using Flash Player 10. I have them communicating over the LAN using a NetConnection/ipMulticast (bypassing servers and internet connection), as outlined in this blog entry:
http://www.flashrealtime.com/local-flas … ut-cirrus/

It's working great on my networked computers running on the same LAN. It does pop up the Flash Player Settings window where you need to allow 'Peer Assisted Networking'.

I tried using the SWF as a private widget on my Infocast 8" (which is updated to run AS3) and the app opens but doesn't allow any of the networking capabilities over LAN. Is there any way to get this kind of local network functionality to work with the Infocast?

Thanks for any help!
Brent

PS: I've pasted the AS3 code below:

var nc:NetConnection;
var group:NetGroup;

var userName:String;

var connected:Boolean = false;

btnSend.addEventListener(MouseEvent.CLICK, btnSend_clickHandler);

function connect():void
{
    nc = new NetConnection();
    nc.addEventListener(NetStatusEvent.NET_STATUS, netStatus);
    nc.connect("rtmfp:");
    userName = "user" + Math.round(Math.random() * 1000);

}

function netStatus(event:NetStatusEvent):void
{
    writeText(event.info.code);

    switch (event.info.code)
    {
        case "NetConnection.Connect.Success" :
            setupGroup();
            break;

        case "NetGroup.Connect.Success" :
            connected = true;
            break;

        case "NetGroup.Posting.Notify" :
            receiveMessage(event.info.message);
            break;
    }

}

function setupGroup():void
{
    var groupspec:GroupSpecifier = new GroupSpecifier("myGroup/groupOne");
    groupspec.postingEnabled = true;
    groupspec.ipMulticastMemberUpdatesEnabled = true;
    groupspec.addIPMulticastAddress("225.225.0.1:30303");

    group = new NetGroup(nc,groupspec.groupspecWithAuthorizations());
    group.addEventListener(NetStatusEvent.NET_STATUS,netStatus);
}

function sendMessage(txt:String):void
{
    var message:Object = new Object();
    message.text = txt;
    message.sender = group.convertPeerIDToGroupAddress(nc.nearID);
    message.userName = txtUser.text;

    group.post(message);

    receiveMessage(message);
}


function receiveMessage(message:Object):void
{
    writeText(message.userName+": "+message.text);
}

function writeText(txt:String):void
{
    txtHistory.text +=  txt + "\n";
}

function btnSend_clickHandler(event:MouseEvent):void
{
    sendMessage(txtMessage.text );
}
connect();

Re: Local Flash Peer to Peer connection using NetConnection/ipMulticast

I think Peer-to-peer requires flash 10.1 equivalent.  The Chumby's run an earlier version (ok so it's a version of FlashLite  that is based on an earlier version of Flash)  You can try the new beta firmware for the Insiginia 8" device.  (Flash Lite 4 , Actionscript 3)  Peer to peer might work if it's based off 10.1

Re: Local Flash Peer to Peer connection using NetConnection/ipMulticast

Hi clay_shooter,
Thanks for your quick response.
I'm running the beta firmware for the Insignia 8" device that I downloaded from here:
https://developer.chumby.com/index.php/Firmware
The SWF is output as Flash 10/AS 3, and I'm using the exact same SWF for the widget that is working on my other computers.
AS3 projects are working well on my Insignia with the firmware update, I'm just not getting the peer to peer functionality to work.
I'm wondering if there is additional code I can add to the widget to make it work, or a setting on the Infocast, or _____?
Thanks,
Brent

Re: Local Flash Peer to Peer connection using NetConnection/ipMulticast

Bump. Anyone have any additional thoughts/information on this?
Thanks again,
Brent

Re: Local Flash Peer to Peer connection using NetConnection/ipMulticast

Bump again. Any feedback from Chumby masters? I'm trying to use for an upcoming art gallery exhibit and would love to get it working on the Infocast rather than using a desktop machine.
Thanks!
Brent

6 (edited by Tegeril 2011-05-13 16:30:55)

Re: Local Flash Peer to Peer connection using NetConnection/ipMulticast

I don't believe RTMFP is supported by Flash Lite 4. If you limit the AS3 documentation for NetConnection to just Flash Lite 4 by removing Player 10.3 and earlier and AIR 2.7 and earlier, you'll find that things like connection type disappear. RTMFP in Flash Player 10 also only supports end-to-end P2P communication (2 peers) whereas the functionality in Player 10.1 allows full, many-peer multicast.

I believe FL4 is only unicast capable, but would happily be proven wrong if anyone would show conflicting evidence smile

Re: Local Flash Peer to Peer connection using NetConnection/ipMulticast

I think the problem is that NetGroup is not supported in FlashLite 4, only Flash Player 10.x and AIR 2

Re: Local Flash Peer to Peer connection using NetConnection/ipMulticast

Oh good eye Duane.

Re: Local Flash Peer to Peer connection using NetConnection/ipMulticast

Thanks for your help on this, greatly appreciated!!