| Author |
|
guestfun Flashcom Newbie


Joined: 21 July 2005 Location: Hong Kong Posts: 32
|
| Posted: 21 July 2005 at 19:02 | IP Logged
|
|
|
how do i set user mic permission? if i want only that people use mic,other cant use mic vice versa.
thank you!
|
| Back to Top |
|
| |
guestfun Flashcom Newbie


Joined: 21 July 2005 Location: Hong Kong Posts: 32
|
| Posted: 10 August 2005 at 06:12 | IP Logged
|
|
|
hi,Is it possible that if a user speak then other people cant get the mic.?
__________________ FUN
|
| Back to Top |
|
| |
Djanoux Flashcom Middleweight


Joined: 29 March 2004 Location: Indonesia Posts: 94
|
| Posted: 11 August 2005 at 07:31 | IP Logged
|
|
|
you can do with write mic status on SO. For ex: "SO.micEnabled"
whenever someone used mic, set SO.micEnabled = false or true.
And SO.micEnabled arleady set now you can detect if someone already used mic or not.
here the code
Code:
var micEnabled = true;
var nc = new NetConnection();
nc.onStatus = function(info){
trace(info.code);
}
nc.connect("rtmp:/sample_lobby");
mic_so = SharedObject.getRemote("mic_so", nc.uri, false);
mic_so.onSync = function(list){
micEnabled = mic_so.data.micStatus;
trace("mic status : "+micEnabled);
}
mic_so.connect(nc);
startTalk = function(){
if(!micEnabled) {
trace("mic is in used!");
// you code here
return;
} else {
mic_so.data.micStatus = false;
// you code here
}
}
stopTalk = function(){
mic_so.data.micStatus = true;
// you code here
}
|
|
|
__________________ an Indonesian Flash Interactive Media Developer
my blog: http://janumedia.com/blog
|
| Back to Top |
|
| |
guestfun Flashcom Newbie


Joined: 21 July 2005 Location: Hong Kong Posts: 32
|
| Posted: 11 August 2005 at 08:24 | IP Logged
|
|
|
thank you!
Can you explain in detail?
__________________ FUN
|
| Back to Top |
|
| |
Djanoux Flashcom Middleweight


Joined: 29 March 2004 Location: Indonesia Posts: 94
|
| Posted: 11 August 2005 at 08:53 | IP Logged
|
|
|
are u using audio component?
__________________ an Indonesian Flash Interactive Media Developer
my blog: http://janumedia.com/blog
|
| Back to Top |
|
| |
guestfun Flashcom Newbie


Joined: 21 July 2005 Location: Hong Kong Posts: 32
|
| Posted: 11 August 2005 at 09:06 | IP Logged
|
|
|
Actually yes,but i edited it a bit.
__________________ FUN
|
| Back to Top |
|
| |
guestfun Flashcom Newbie


Joined: 21 July 2005 Location: Hong Kong Posts: 32
|
| Posted: 11 August 2005 at 10:11 | IP Logged
|
|
|
Alright,i think another method thats if admins login then the audio buttons will appear in each avpresence,so if admins want the unique person talk,then admin permits the audio button like a tick in those unique person.
The question i'd like to know how do i place audio component in each avpresence instead of audio component functions for each person.
maybe it is complicated,anyway,hope to communicate with it.
Edited by guestfun on 11 August 2005 at 10:13
__________________ FUN
|
| Back to Top |
|
| |
guestfun Flashcom Newbie


Joined: 21 July 2005 Location: Hong Kong Posts: 32
|
| Posted: 11 August 2005 at 13:56 | IP Logged
|
|
|
any idea ?
__________________ FUN
|
| Back to Top |
|
| |
Djanoux Flashcom Middleweight


Joined: 29 March 2004 Location: Indonesia Posts: 94
|
| Posted: 12 August 2005 at 02:18 | IP Logged
|
|
|
For that way I suggest you to build your own component.
better AS also easier for manage / editing
__________________ an Indonesian Flash Interactive Media Developer
my blog: http://janumedia.com/blog
|
| Back to Top |
|
| |
guestfun Flashcom Newbie


Joined: 21 July 2005 Location: Hong Kong Posts: 32
|
| Posted: 12 August 2005 at 03:31 | IP Logged
|
|
|
i solved it,thank you!
__________________ FUN
|
| Back to Top |
|
| |
Djanoux Flashcom Middleweight


Joined: 29 March 2004 Location: Indonesia Posts: 94
|
| Posted: 12 August 2005 at 04:11 | IP Logged
|
|
|
Okay about audio component editing here they are:
on line 17 you will found:
Code:
FCAudioConferenceClass.prototype.init = function() {
this.name = (this._name == null ? "_DEFAULT_" : this._name);
this.prefix = "FCAudioConference." + this.name + ".";
}; |
|
|
You must edit to:
Code:
FCAudioConferenceClass.prototype.init = function() {
this.name = (this._name == null ? "_DEFAULT_" : this._name);
this.prefix = "FCAudioConference." + this.name + ".";
this.micEnabled = true;
}; |
|
|
on line 27
Code:
this.so.onSync = function(list) {
for (var i = 0; i < list.length; i++) {
.............
|
|
|
change into:
Code:
this.so.onSync = function(list) {
for (var i = 0; i < list.length; i++) {
if(list[i].name == "micStatus"){
this.owner.micEnabled = this.data.micStatus.enabled;
trace("mic status : "+this.data.micStatus.enabled);
trace("mic used by : "+this.data.micStatus.usedBy);
} ; else if ((list[i].name.substr(0, 1) == "u" && this.data[list[i].name][0] != null) || list[i].code == "delete") {
this.owner.audio_lb.remo veAll();
this.total = 0;
for (var n in this.data) {
this.total ++;
if(this.data [n][0].length > 0){
this.owner.audio_lb.addItem(this.data [n][0], this.data[n][1] == true ? "on" : "off");
}
}
.......... |
|
|
Line 126
Code:
FCAudioConferenceClass.prototype.pttPress = function() {
this.talking = true;
this.streamOut_ns. attach Audio( this.local_mic);
if (!this.auto) {
this.so.data [this.userID][1] = true;
this.localAudio_mc.light_mc.gotoAndS top(2);
}
}; |
|
|
to:
Code:
FCAudioConferenceClass.prototype.pttPress = function() {
if(!this.micEnabled) {
trace("mic is used by "+this.so.data.micStatus.usedBy);
return;
}
this.so.data.micStatus = {usedBy:this.userID,enabled:false};
this.talking = true;
this.streamOut_ns. attach Audio( this.local_mic);
if (!this.auto) {
this.so.data [this.userID][1] = true;
this.localAudio_mc.light_mc.gotoAndS top(2);
}
}; |
|
|
Line 135
Code:
FCAudioConferenceClass.prototype.pttRelease = function() {
if (!this.auto) {
this.talking = false;
this.streamOut_ns. attach Audio(null);
this.so.data[this.userID][1] = false;
this.localAudio_mc.light_mc.gotoAndStop(1);
}
}; |
|
|
to:
Code:
FCAudioConferenceClass.prototype.pttRelease = function() {
if (!this.auto) {
this.talking = false;
this.streamOut_ns. attach Audio(null);
if(!this.micEnabled and this.so.data.micStatus.usedBy == this.userID){
this.so.data .micStatus = {usedBy:null,enabled:true};
}
this.so.data [this.userID][1] = false;
this.localAudio_mc.light_mc.gotoAndStop(1);
}
}; |
|
|
Well still I recommanded you to build your own component :)
Edited by Djanoux on 12 August 2005 at 04:15
__________________ an Indonesian Flash Interactive Media Developer
my blog: http://janumedia.com/blog
|
| Back to Top |
|
| |
annaseria Flashcom Newbie


Joined: 01 June 2005 Location: Italy Posts: 8
|
| Posted: 07 September 2005 at 06:52 | IP Logged
|
|
|
Djanoux
can you contact me in msn messanger i need your help please
annaseria@hotmail.com
|
| Back to Top |
|
| |
annaseria Flashcom Newbie


Joined: 01 June 2005 Location: Italy Posts: 8
|
| Posted: 07 September 2005 at 19:02 | IP Logged
|
|
|
djanoux where are you?
|
| Back to Top |
|
| |
Djanoux Flashcom Middleweight


Joined: 29 March 2004 Location: Indonesia Posts: 94
|
| Posted: 09 September 2005 at 06:03 | IP Logged
|
|
|
Here the sample: http://janumedia.blogspot.com/2005/08/flashcomm-audio-compon ent-_112546517324830449.html
Also with the source!
__________________ an Indonesian Flash Interactive Media Developer
my blog: http://janumedia.com/blog
|
| Back to Top |
|
| |
Djanoux Flashcom Middleweight


Joined: 29 March 2004 Location: Indonesia Posts: 94
|
| Posted: 09 September 2005 at 06:04 | IP Logged
|
|
|
Hi whats up
__________________ an Indonesian Flash Interactive Media Developer
my blog: http://janumedia.com/blog
|
| Back to Top |
|
| |