I am trying to modify the sample panel presentation to only allow a certain number of users to connect.

When I put this in frame 1 in scene 1:


if (users > 2){
gotoAndStop(2);
}
(There is a blank screen on frame 2, with text letting them know there are too many people connected.)


if I put this code somewhere between:
function updateParticipants() {

and right below:

participants_txt.text = viewers;


it works fine. Once the 3rd person logs in, it sends him to frame 2. The only problem is, it sends everyone else in the room to frame 2 as well.

Can anyone please let me know what I might do to solve this problem?

thanks!