This compiles for me in swf10 without error in trunk<br><br><canvas debug="true" height="500" width="100%"><br> <attribute name="_conn"/><br> <attribute name="s1"/><br>
<attribute name="s2"/><br><br> <switch><br> <when property="$as3"><br> <passthrough><br> import flash.net.*;<br> import flash.events.*;<br>
import flash.media.Camera;<br>
import flash.media.Video;<br> import flash.media.Microphone;<br><br> </passthrough><br> </when><br> </switch><br><br> <handler name="oninit"><br> // These lines begin broadcasting.<br>
this._conn = new NetConnection(); // Create connection object.<br> this._conn.connect("rtmp://<a href="http://192.168.1.94/Red5SharedObject/">192.168.1.94/Red5SharedObject/</a>"); // Connect to server.<br>
s1 = new NetStream(this._conn); // Open stream within connection.<br> //s1.attachAudio(Microphone.get()); // Capture audio.<br> s1.attachVideo(Camera.getCamera()); // Capture video.<br> s1.publish("todays_news"); // Begin broadcasting.<br>
<br> s2 = new NetStream(this._conn);<br> live._attachStream(s2); // Specify where to display video.<br> s2.play("todays_news"); // play() uses the same name as publish() above.<br> <br>
this.s1.onStatus = function(info) {<br> Debug.write("simpleNetStream onStatus",info);<br> };<br> this.s1.onCuePoint = function(info) {<br> Debug.write("simpleNetStream onCuePoint",info);<br>
};<br> this.s1.onPlayStatus = function(info) {<br> Debug.write("simpleNetStream onPlayStatus",info);<br> };<br> this.s1.onMetaData = function(info) {<br>
Debug.write("simpleNetStream onMetaData",info);<br> }; <br> </handler><br> <br> <simplelayout/><br> <br> <videoview id="live" width="150" height="150" type="rtmp" /><br>
<br><br> <br></canvas><br><br><br><br><br><br><br><div class="gmail_quote">On Mon, Nov 23, 2009 at 7:05 AM, cem sonmez <span dir="ltr"><<a href="mailto:cemosonmez@gmail.com">cemosonmez@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi <br>Especially i m compiling my code on swf10 but especially at the netconnection operations (sharedobject, netconnection, netstream..) i m getting many errors.<br>
For example at this code for swf8 everything goes fine <br>
<canvas debug="true" height="500" width="100%"><br> <attribute name="_conn"/><br> <attribute name="s1"/><br> <attribute name="s2"/><br>
<br> <handler name="oninit"><br> // These lines begin broadcasting.<br> this._conn = new NetConnection(); // Create connection object.<br> this._conn.connect("rtmp://<a href="http://192.168.1.94/Red5SharedObject/" target="_blank">192.168.1.94/Red5SharedObject/</a>"); // Connect to server.<br>
s1 = new NetStream(this._conn); // Open stream within connection.<br> //s1.attachAudio(Microphone.get()); // Capture audio.<br> s1.attachVideo(Camera.get()); // Capture video.<br> s1.publish("todays_news"); // Begin broadcasting.<br>
<br> s2 = new NetStream(this._conn);<br> live._attachStream(s2); // Specify where to display video.<br> s2.play("todays_news"); // play() uses the same name as publish() above.<br> <br>
this.s1.onStatus = function(info) {<br> Debug.write("simpleNetStream onStatus",info);<br> };<br> this.s1.onCuePoint = function(info) {<br> Debug.write("simpleNetStream onCuePoint",info);<br>
};<br> this.s1.onPlayStatus = function(info) {<br> Debug.write("simpleNetStream onPlayStatus",info);<br> };<br> this.s1.onMetaData = function(info) {<br>
Debug.write("simpleNetStream onMetaData",info);<br> }; <br> </handler><br> <br> <simplelayout/><br> <br> <videoview id="live" width="150" height="150" type="rtmp" /><br>
<br></canvas><br><br>But when i try the same operations with as3 way on swf10. Althought i have added lines below in order to add the flash classes to the application for as3, e.g last problem about this issue is an error, like : <code>Error: Call to a possibly undefined method NetStream...</code><br>
<br><switch><br> <when property="$as3"><br> <passthrough><br> import flash.net.*;<br> import flash.events.*;<br> </passthrough><br>
</when><br></switch><br><br><br>I am planning to try my applications just on swf10 env. But most of the time, it is a bit harder than swf8 to work without problem. Do you suggest swf10 development on openlaszlo platform for now. <br>
<br>Best regards. <br>-- <br><font color="#888888">Cem SONMEZ<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br><br><br>