-
I am trying to publish and recieve video streams using a variable.
The following code uses "Bobby" instead of a variable and works great...
**********************
nc = new NetConnection();
nc.connect("rtmp:/my_app/room_01");
usrStream = new NetStream(nc);
usrStream.publish("Bobby", "live");
usrStream.attachVideo(Camera.get());
lsrStream = new NetStream(nc);
User_video.attachVideo(lsrStream);
lsrStream.play("Bobby");
**********************
This code replaces Bobby with the variable _root.user and doesn't work...
**********************
nc = new NetConnection();
nc.connect("rtmp:/my_app/room_01");
usrStream = new NetStream(nc);
usrStream.publish(_root.user, "live");
usrStream.attachVideo(Camera.get());
lsrStream = new NetStream(nc);
User_video.attachVideo(lsrStream);
lsrStream.play(_root.user);
**********************
I set the variable _root.user before I execute the above script, and I display the variable in a dynamic text box (just for testing) and it displays the correct data... "Bobby"
My assumption is that I am not calling the variable correctly, maybe a + is missing or something.
Any insight would be greatly appreciated.
Thanks
-
Danny Gomez Creations ®
!!!...I dont know if u will cry or laugh at the only thing u need to change:
Code:
_root.user
//should be
_root.user.text
the trace showed you the name becouse it showed the value of _root.user .But the ns needs the string data from the boxes and to pull that out u just use:
Code:
myDynamicTextBox.text
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|