| Author |
|
stoem Big Kahuna

stoem == Stefan
Joined: 05 January 2004 Location: United Kingdom Posts: 1079
|
| Posted: 19 March 2004 at 17:19 | IP Logged
|
|
|
post any questions about this tutorial here
__________________ Flashcomguru.com
|
| Back to Top |
|
| |
hjf288 Flashcom Newbie


Joined: 08 June 2004 Location: United Kingdom Posts: 2
|
| Posted: 08 June 2004 at 19:42 | IP Logged
|
|
|
Hi again :)
How do i differenciate between leaving and joining users?
|
| Back to Top |
|
| |
stoem Big Kahuna

stoem == Stefan
Joined: 05 January 2004 Location: United Kingdom Posts: 1079
|
| Posted: 11 June 2004 at 18:50 | IP Logged
|
|
|
You'd need to keep a counter inside the roomlist component and check if the total number of users has increased or decreased. Depending on each one of those possibilities play one or another sound.
Hope this helps.
stoem
__________________ Flashcomguru.com
|
| Back to Top |
|
| |
peppie Flashcom Newbie


Joined: 27 August 2004 Posts: 1
|
| Posted: 30 August 2004 at 10:34 | IP Logged
|
|
|
Hi..
I try to add sound to the ppl-list as in the tutorial, but no sound here..
My ppl-list is on an imported swf could that be the problem???
I tried:
_root.main01.playSound();
and
_parent.playSound();
without succes...
Any suggestions??
thnx pep ;)
|
| Back to Top |
|
| |
stoem Big Kahuna

stoem == Stefan
Joined: 05 January 2004 Location: United Kingdom Posts: 1079
|
| Posted: 30 August 2004 at 12:39 | IP Logged
|
|
|
imported swf? Yes that would indeed be a problem...
stoem
__________________ Flashcomguru.com
|
| Back to Top |
|
| |
ruito Flashcom Newbie

Joined: 18 April 2005 Location: Italy Posts: 2
|
| Posted: 18 April 2005 at 07:04 | IP Logged
|
|
|
Hi All, I've a problem with this tutorial. It work only when I enter in chat. Only I can listen the sound. When a new user enter, I dont listen the sound. I think that I had mistake to put the code in the PeopleList.
FCPeopleListClass.prototype.connect = function(nc) {
this.nc = nc;
if (this.nc.FCPeopleList == null) {
this.nc.FCPeopleList = {};
}
this.nc.FCPeopleList[this.name] = this;
//
this.so = SharedObject.getRemote(this.prefix+"users", this.nc.uri, false);
this.so.owner = this;
//
this.so.onSync = function(list) {
this.owner.people_lb.removeAll();
var totalUsers = 0;
var totalLurkers = 0;
for (var i in this.data) {
if (this.data == " fc_lurker") {
totalLurkers++;
} else if (this.data != null) {
totalUsers++;
this.owner.people_lb.addItem(this.data );
}
}
this.owner.lurkers = totalLurkers;
this.owner.users = totalUsers;
this.owner.people_lb.sortItemsBy("label", "ASC");
};
_root.playSound();
//
this.so.connect(this.nc);
// Need to call connect on our server side counterpart first
this.nc.call(this.prefix +"conn ect", null);
};
//
Thanks and sorry for my bad english
Edited by ruito on 18 April 2005 at 07:05
|
| Back to Top |
|
| |
Djanoux Flashcom Middleweight


Joined: 29 March 2004 Location: Indonesia Posts: 94
|
| Posted: 19 April 2005 at 02:59 | IP Logged
|
|
|
As defined on tutorial you must put the sound script inside onSync function. Because inside onSync function shown when the list is updated (user join or leave the list).
the code should be :
this.so.onSync = function(list) {
this.owner.people_lb.removeAll();
var totalUsers = 0;
var totalLurkers = 0;
for (var i in this.data) {
if (this.data == " fc_lurker") {
totalLurkers++;
} else if (this.data != null) {
totalUsers++;
this.owner.people_lb.addItem(this.da ta );
}
}
this.owner.lurkers = totalLurkers;
this.owner.users = totalUsers;
this.owner.people_lb.sortItemsBy("label", "ASC");
_root.playSound();
};
Edited by Djanoux on 19 April 2005 at 03:01
|
| Back to Top |
|
| |
ruito Flashcom Newbie

Joined: 18 April 2005 Location: Italy Posts: 2
|
| Posted: 19 April 2005 at 12:11 | IP Logged
|
|
|
Thanks, now work very good
|
| Back to Top |
|
| |
mac11 Flashcom Newbie

Joined: 21 September 2008 Location: Bermuda Posts: 5
|
| Posted: 07 October 2008 at 07:37 | IP Logged
|
|
|
How do i differenciate between leaving and joining users?
Edited by stoem on 07 October 2008 at 08:20
|
| Back to Top |
|
| |
Djanoux Flashcom Middleweight


Joined: 29 March 2004 Location: Indonesia Posts: 94
|
| Posted: 07 October 2008 at 08:16 | IP Logged
|
|
|
mac11 wrote:
| How do i differenciate between leaving and joining users? |
|
|
i prefer to do that on server side and use nc.call()
__________________ an Indonesian Flash Interactive Media Developer
my blog: http://janumedia.com/blog
|
| Back to Top |
|
| |