home *** CD-ROM | disk | FTP | other *** search
- class tloader
- {
- var scrittamc;
- var myformat;
- var tsm;
- var i;
- var deltamult = 1;
- var olddeltatime = getTimer();
- var screenw = 450;
- var screenh = 450;
- var dotmult = 0;
- var numdots = 0;
- var phase = 0;
- var scrittealpha = 100;
- function tloader()
- {
- }
- function init()
- {
- this.scrittamc = new Array();
- this.myformat = new TextFormat();
- this.myformat.font = "verdana11";
- this.myformat.bold = false;
- var _loc4_ = new flash.filters.DropShadowFilter(2,135,0,1,4,4,0.7,1,false,false,false);
- this.tsm = _root.createEmptyMovieClip("tsm",1500);
- this.tsm.testo = "RAGDOLLSOFT.COM";
- this.tsm.scritte = new Array();
- this.i = 0;
- while(this.i < this.tsm.testo.length)
- {
- this.tsm.scritte[this.i] = this.tsm.createEmptyMovieClip("scritta" + this.i,this.i);
- this.tsm.scritte[this.i].createTextField("scritta",0,0,0,0,0);
- this.tsm.scritte[this.i].scritta.textColor = 0;
- this.tsm.scritte[this.i].scritta.setNewTextFormat(this.myformat);
- this.tsm.scritte[this.i].scritta.text = this.tsm.testo.substr(this.i,1);
- this.tsm.scritte[this.i]._xscale = 130;
- this.tsm.scritte[this.i]._yscale = 130;
- this.tsm.scritte[this.i].scritta.autoSize = true;
- this.tsm.scritte[this.i].scritta.selectable = false;
- this.tsm.scritte[this.i].scritta.embedFonts = true;
- this.tsm.scritte[this.i]._visible = true;
- var _loc3_ = this.tsm.scritte[this.i].filters;
- _loc3_.push(_loc4_);
- this.tsm.scritte[this.i].filters = _loc3_;
- this.tsm.scritte[this.i].x = this.i * 13.5;
- this.tsm.scritte[this.i].y = -20;
- this.tsm.scritte[this.i].yv = 0;
- this.tsm.scritte[this.i].delay = this.i * 6;
- this.i = this.i + 1;
- }
- this.tsm._x = this.screenw / 2 - this.tsm._width / 2;
- this.i = 0;
- while(this.i < 2)
- {
- this.scrittamc[this.i] = _root.createEmptyMovieClip("scritteloader" + this.i,11100 + this.i);
- this.scrittamc[this.i].createTextField("scritta",0,0,0,0,0);
- this.scrittamc[this.i].scritta.textColor = 0;
- this.scrittamc[this.i].scritta.setTextFormat(this.myformat);
- this.scrittamc[this.i]._xscale = 100;
- this.scrittamc[this.i]._yscale = 100;
- this.scrittamc[this.i].scritta.autoSize = true;
- this.scrittamc[this.i].scritta.selectable = false;
- this.scrittamc[this.i].scritta.embedFonts = true;
- this.scrittamc[this.i]._visible = false;
- _loc3_ = this.scrittamc[this.i].filters;
- _loc3_.push(_loc4_);
- this.scrittamc[this.i].filters = _loc3_;
- this.i = this.i + 1;
- }
- this.scrittamc[1].scritta.text = "LOADING...";
- this.scrittamc[1].scritta.setTextFormat(this.myformat);
- this.scrittamc[1]._xscale = 130;
- this.scrittamc[1]._yscale = 130;
- this.scrittamc[1]._x = this.screenw / 2 - this.scrittamc[1]._width / 2;
- this.tsm.onRelease = function()
- {
- getUrl("http://www.ragdollsoft.com", "blank");
- };
- }
- function loop()
- {
- var _loc4_ = getTimer() - this.olddeltatime;
- this.deltamult = Math.min(_loc4_,40) / 28.571428571428573;
- this.tsm._x = this.screenw / 2 - this.tsm._width / 2;
- this.i = 0;
- while(this.i < this.tsm.testo.length)
- {
- this.tsm.scritte[this.i].delay -= 1;
- this.tsm.scritte[this.i].delay = Math.max(-1,this.tsm.scritte[this.i].delay);
- if(this.tsm.scritte[this.i].delay < 0)
- {
- this.tsm.scritte[this.i].yv += 0.02;
- this.tsm.scritte[this.i].y += this.tsm.scritte[this.i].yv * this.deltamult;
- }
- if(this.tsm.scritte[this.i].y > 120)
- {
- this.tsm.scritte[this.i].y = 119.999;
- this.tsm.scritte[this.i].yv *= -0.9;
- }
- this.tsm.scritte[this.i]._y = this.tsm.scritte[this.i].y;
- this.tsm.scritte[this.i]._x = this.tsm.scritte[this.i].x;
- this.i = this.i + 1;
- }
- var _loc3_ = _root.getBytesLoaded() / _root.getBytesTotal() * 100;
- this.scrittamc[0].scritta.text = Math.floor(_loc3_) + "%";
- this.scrittamc[0].scritta.setTextFormat(this.myformat);
- this.scrittamc[0]._xscale = 110;
- this.scrittamc[0]._yscale = 110;
- this.scrittamc[0]._x = this.screenw / 2 - this.scrittamc[0]._width / 2;
- this.scrittamc[0]._y = 230;
- this.scrittamc[0]._visible = true;
- this.scrittamc[0]._alpha = this.scrittealpha;
- this.scrittamc[1]._alpha = this.scrittealpha;
- this.tsm._alpha = this.scrittealpha;
- this.scrittamc[1].scritta.text = "LOADING";
- this.i = 0;
- while(this.i < this.numdots)
- {
- this.scrittamc[1].scritta.text += ".";
- this.i = this.i + 1;
- }
- this.scrittamc[1].scritta.setTextFormat(this.myformat);
- this.scrittamc[1]._y = 190;
- this.scrittamc[1]._visible = true;
- if(_loc3_ > this.dotmult * 3)
- {
- this.dotmult += 1;
- this.numdots += 1;
- if(this.numdots > 3)
- {
- this.numdots = 0;
- }
- }
- if(_loc3_ == 100)
- {
- this.phase = 1;
- }
- if(this.phase == 1)
- {
- this.scrittealpha -= 2;
- if(this.scrittealpha < 0)
- {
- _root.gotoAndPlay("mainmenu");
- }
- }
- }
- }
-