ImediaseeUvaultCDNInfluxis
FlashComGuru
 
 

  Active Topics    Memberlist    Search    Help
  Register  Login
Tutorial follow ups
 Flashcomguru Forums | Tutorial follow ups
Subject Topic: Add event sounds to the people list Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
stoem
Big Kahuna
Big Kahuna
Avatar
stoem == Stefan

Joined: 05 January 2004
Location: United Kingdom
Posts: 1079
Posted: 19 March 2004 at 17:19 | IP Logged Quote stoem

post any questions about this tutorial here

__________________
Flashcomguru.com
Back to Top View stoem's Profile Search for other posts by stoem Visit stoem's Homepage
 
hjf288
Flashcom Newbie
Flashcom Newbie
Avatar

Joined: 08 June 2004
Location: United Kingdom
Posts: 2
Posted: 08 June 2004 at 19:42 | IP Logged Quote hjf288

Hi again :)
How do i differenciate between leaving and joining users?
Back to Top View hjf288's Profile Search for other posts by hjf288
 
stoem
Big Kahuna
Big Kahuna
Avatar
stoem == Stefan

Joined: 05 January 2004
Location: United Kingdom
Posts: 1079
Posted: 11 June 2004 at 18:50 | IP Logged Quote stoem

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 View stoem's Profile Search for other posts by stoem Visit stoem's Homepage
 
peppie
Flashcom Newbie
Flashcom Newbie
Avatar

Joined: 27 August 2004
Posts: 1
Posted: 30 August 2004 at 10:34 | IP Logged Quote peppie

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 View peppie's Profile Search for other posts by peppie
 
stoem
Big Kahuna
Big Kahuna
Avatar
stoem == Stefan

Joined: 05 January 2004
Location: United Kingdom
Posts: 1079
Posted: 30 August 2004 at 12:39 | IP Logged Quote stoem

imported swf? Yes that would indeed be a problem...

stoem


__________________
Flashcomguru.com
Back to Top View stoem's Profile Search for other posts by stoem Visit stoem's Homepage
 
ruito
Flashcom Newbie
Flashcom Newbie


Joined: 18 April 2005
Location: Italy
Posts: 2
Posted: 18 April 2005 at 07:04 | IP Logged Quote ruito

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 View ruito's Profile Search for other posts by ruito
 
Djanoux
Flashcom Middleweight
Flashcom Middleweight
Avatar

Joined: 29 March 2004
Location: Indonesia
Posts: 94
Posted: 19 April 2005 at 02:59 | IP Logged Quote Djanoux

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 View Djanoux's Profile Search for other posts by Djanoux Visit Djanoux's Homepage
 
ruito
Flashcom Newbie
Flashcom Newbie


Joined: 18 April 2005
Location: Italy
Posts: 2
Posted: 19 April 2005 at 12:11 | IP Logged Quote ruito

Thanks, now work very good
Back to Top View ruito's Profile Search for other posts by ruito
 
mac11
Flashcom Newbie
Flashcom Newbie


Joined: 21 September 2008
Location: Bermuda
Posts: 5
Posted: 07 October 2008 at 07:37 | IP Logged Quote mac11

How do i differenciate between leaving and joining users?

Edited by stoem on 07 October 2008 at 08:20
Back to Top View mac11's Profile Search for other posts by mac11
 
Djanoux
Flashcom Middleweight
Flashcom Middleweight
Avatar

Joined: 29 March 2004
Location: Indonesia
Posts: 94
Posted: 07 October 2008 at 08:16 | IP Logged Quote Djanoux

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 View Djanoux's Profile Search for other posts by Djanoux Visit Djanoux's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.6
Copyright ©2001-2003 Web Wiz Guide


   all contents © Flashcomguru.com - Flash® is a trademark of Adobe® 1995-2007