Hi, i m trying to compile the code below on swf10. But the error message is
like : Error: Call to a possibly undefined method NetStream
Although i have added all the flash.net classes to the application runtime.

<canvas debug="true" height="500" width="100%">
    <attribute name="_conn"/>
    <attribute name="s1"/>
    <attribute name="s2"/>

    <switch>
    <when property="$as3">
        <passthrough>
        import flash.net.*;
           import flash.events.*;
        import flash.media.*;
        </passthrough>
    </when>
    </switch>

    <handler name="oninit">
        //NetConnection.defaultObjectEncoding =
flash.net.ObjectEncoding.AMF0;
        this._conn = new NetConnection();
        this._conn.connect("rtmp://192.168.1.94/Red5SharedObject/");
        this._conn.client=this;
        this._conn.addEventListener(NetStatusEvent.NET_STATUS,
netStatusHandler);
        this._conn.client=this;
    </handler>

    <method name="netStatusHandler" args="event">
        switch (event.info.code) {
                case "NetConnection.Connect.Success":
                    Debug.write("The connection attempt succeeded.");

                    break;

                case "NetConnection.Connect.Failed":
                    Debug.write("The connection attempt failed.");
                    break;
        }
    </method>

    <simplelayout/>

    <videoview id="broadcast" width="150" height="150" type="rtmp">
        <camera id="camm" capturing="true"/>
        <microphone id="micc" capturing="true"/>
    </videoview>

    <button>Broadcast
        <handler name="onclick">
            parent.s1= new NetStream(parent._conn);
            broadcast.setAttribute("stream",parent.s1);
            parent.s1.attachCamera(camm);
            camm.setAttribute("show",true);
            canvas.s1.publish("example","live");
        </handler>
    </button>

    <videoview id="live" width="150" height="150" type="rtmp" />
    <button>Play
        <handler name="onclick">
            parent.s2= new NetStream(parent._conn);
            live.setAttribute("stream",parent.s2);
            parent.s2.play("example");
        </handler>
    </button>

</canvas>

PS : and there is no answer to my previous post. And it still goes on. [1]
Any idea to help me?

[1] -
http://www.openlaszlo.org/pipermail/laszlo-user/2009-November/007569.html

Regards
-- 
Cem SONMEZ

Reply via email to