Skip to main content
Participant
February 4, 2007
Question

Error with code

  • February 4, 2007
  • 1 reply
  • 242 views
hi all

i have proplem with this code

// These lines begin broadcasting.
var my_nc:NetConnection = new NetConnection(); // Create connection object.
my_nc.connect("rtmp://MYserver:1935/test"); // Connect to server.
publish_ns:NetStream = new NetStream(my_nc); // Open stream within connection.
publish_ns.attachAudio(Microphone.get()); //Capture audio.
//publish_ns.attachVideo(Camera.get()); Capture video.
publish_ns.publish("todays_news"); // Begin broadcasting.
/* These lines open a stream to play the video portion of the broadcast inside a Video object named my_video. The audio is played through the standard output device--you don’t need to issue a separate command to hear the audio. */
var play_ns:NetStream = new NetStream(my_nc);
//my_video.attachVideo(play_ns); // Specify where to display video.
play_ns.play("todays_news"); // play() uses the same name as publish() above.


the error appear is:
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 5: Syntax error.
publish_ns:NetStream = new NetStream(my_nc); // Open stream within connection.

Total ActionScript Errors: 1 Reported Errors: 1
    This topic has been closed for replies.

    1 reply

    Inspiring
    February 12, 2007
    publish_ns = new NetStream(my_nc);