home *** CD-ROM | disk | FTP | other *** search
- function cargando()
- {
- var _loc4_ = undefined;
- var _loc3_ = undefined;
- var _loc2_ = undefined;
- _loc4_ = _root.getBytesTotal();
- _loc3_ = _root.getBytesLoaded();
- _loc2_ = Math.floor(_loc3_ * 100 / _loc4_);
- porcentaje_txt.text = _loc2_ + " %";
- barra_mc.gotoAndStop(_loc2_);
- if(_loc3_ == _loc4_)
- {
- clearInterval(hiloPrecarga);
- play();
- }
- }
- var hiloPrecarga = setInterval(cargando,1);
- stop();
- Mouse.hide();
- delay = 10;
- _root.attachMovie("mousep","mousep",_root.getNextHighestDepth());
- _root.attachMovie("mochithing","mochithing",_root.getNextHighestDepth());
- mousep.onEnterFrame = function()
- {
- this._x = _root._xmouse;
- this._y = _root._ymouse;
- };
- mochithing.onEnterFrame = function()
- {
- dist_x = mousep._x - this._x;
- dist_y = mousep._y - this._y;
- distance = Math.sqrt(dist_x * dist_x + dist_y * dist_y);
- angle = Math.atan2(dist_y,dist_x);
- speed = distance / delay;
- xspeed = speed * Math.cos(angle);
- yspeed = speed * Math.sin(angle);
- this._x += xspeed;
- this._y += yspeed;
- this._rotation = angle * 180 / 3.141592653589793;
- };
-