home *** CD-ROM | disk | FTP | other *** search
- function Reset()
- {
- totLogins = 0;
- TotHeight = 0;
- StageHeight = 300;
- }
- function SetDefaultFinalAlpha(alpha)
- {
- if(alpha == _root.LastAlpha)
- {
- return undefined;
- }
- _root.LastAlpha = alpha;
- i = 1;
- while(i <= totLogins)
- {
- obj = eval("_root.Login_" + i);
- obj.DefaultFinalAlpha = alpha;
- if(obj._currentframe == 1)
- {
- obj.FinalAlpha = alpha;
- }
- i++;
- }
- }
- function CloseLogins()
- {
- i = 1;
- while(i <= totLogins)
- {
- obj = eval("_root.Login_" + i);
- obj.gotoAndStop(1);
- i++;
- }
- }
- function CreateLogin(UserName, id, Foto)
- {
- totLogins++;
- newName = "Login_" + totLogins;
- _root.attachMovie("ClpLogin" + id,newName,totLogins);
- obj = eval("_root." + newName);
- obj.id = id;
- obj._x = 9;
- obj.DefaultFinalAlpha = 40;
- obj.istNome.txtNome = UserName;
- if(Foto != "")
- {
- obj.istFoto.istFoto.loadMovie(Foto);
- obj.istFoto.istSpecchio._visible = false;
- }
- obj.MyFoto = Foto;
- switch(id)
- {
- case 1:
- obj.myHeight = 90;
- break;
- case 2:
- obj.myHeight = 70;
- break;
- case 3:
- obj.myHeight = 70;
- }
- TotHeight += obj.myHeight;
- }
- function PositionateLogins()
- {
- startY = (StageHeight - TotHeight) / 2;
- pos = 0;
- i = 1;
- while(i <= totLogins)
- {
- obj = eval("_root.Login_" + i);
- obj._y = startY + pos;
- pos += obj.myHeight;
- i++;
- }
- setScroll(TotHeight);
- }
- function doLogin(Username, Password, Foto)
- {
- setScroll(StageHeight);
- i = 1;
- while(i <= totLogins)
- {
- obj = eval("_root.Login_" + i);
- obj.removeMovieClip();
- i++;
- }
- Reset();
- CreateLogin(Username,3,Foto);
- PositionateLogins();
- }
- function setScroll(myHeight)
- {
- if(myHeight < StageHeight)
- {
- h = StageHeight;
- }
- else
- {
- h = myHeight + 20;
- }
- fscommand("SETSCROLL",h);
- }
- Reset();
- CreateLogin("Sergio",2,"Sergio.jpg");
- CreateLogin("Simone",2,"Simone.jpg");
- CreateLogin("Massimo",2,"Massimo.jpg");
- CreateLogin("Altro utente",1,"");
- PositionateLogins();
- stop();
-