Ok, but when I press a button to close a cam, script does not works, because function don't find 'cam' to close.
kickCam.onPress = function() {
var userKickCam = this._parent.username_txt.text;
if (userKickCam != undefined) {
trace("Close Cam "+userKickCam);
_root.client_nc.call("closeCam", null, userKickCam);
}
};
client_nc.closeCam = function(cam) {
_root[cam].stopPublish();
trace("cam "+cam+" off");
};
...like you can see, in trace, the function don't find the cam to close:
Close Cam jip2
cam off
I try with:
kickCam.onPress = function() {
var cam = this._parent.name
.............
but does not works