Monday 21 July 2014

as2 preloader

stop();
this.onEnterFrame = function()
{
            filesize = _root.getBytesTotal();
            loaded = _root.getBytesLoaded();
            Bar._visible = true;
            if (loaded != filesize)
            {
                        Bar._xscale = 100*loaded/filesize;
            }
            else
            {
delete this.onEnterFrame;
                        gotoAndStop(2);
            }
};

No comments:

Post a Comment