public function GTanksLoaderWindow(newType:Boolean=true)
        {
            this.newType = newType;
            this.layer = Main.systemUILayer;
            this.imageLoader = (Main.osgi.getService(GTanksLoaderImages) as GTanksLoaderImages);
            this.image = this.imageLoader.getRandomPict();
            this.image.x = 10;
            this.image.y = 11;
            addChild(this.window);
            addChild(this.image);
            this.currentProcessId = new Array();
            this.bubbles = new Array();
            this.windowBmp = new Bitmap(windowBitmap);
            this.windowBmp.width = (this.windowBmp.width - 5);
            this.windowBmp.y = (this.windowBmp.y + 240);
            this.windowBmp.x = (this.windowBmp.x + 13);
            if (newType)
            {
                addChild(this.windowBmp);
            }
            else
            {
                this.window.addChild(this.g);
                this.g.x = this.image.x;
                this.g.y = ((this.image.y + this.image.height) + 10);
                this.window.height = (this.window.height - 15);
            };
            var tf:TextFormat = new TextFormat("Tahoma", 10, 0xFFFFFF);
            this.statusLabel = new TextField();
            this.statusLabel.text = "Status";
            this.statusLabel.defaultTextFormat = tf;
            this.statusLabel.wordWrap = true;
            this.statusLabel.multiline = true;
            this.statusLabel.y = 38;
            this.statusLabel.x = 70;
            this.statusLabel.width = 172;
            this.fuel = new Shape();
            this.fuel.graphics.beginBitmapFill(fuelBitmap);
            this.fuel.graphics.drawRect(0, 0, fuelBitmap.width, fuelBitmap.height);
            if (newType)
            {
                addChild(this.fuel);
            };
            this.fuel.x = (this.windowBmp.x + 16);
            this.fuel.y = (this.windowBmp.y + 17);
            this.fuel.width = (this.fuel.width - 5);
            this.fuelMask = new Shape();
            if (newType)
            {
                addChild(this.fuelMask);
            };
            this.fuelMask.graphics.beginFill(0, 1);
            this.fuelMask.graphics.drawRect(0, 0, 1, fuelBitmap.height);
            this.fuelMask.x = this.fuel.x;
            this.fuelMask.y = this.fuel.y;
            this.fuel.mask = this.fuelMask;
            this.bubblesContainer = new Sprite();
            if (newType)
            {
                addChild(this.bubblesContainer);
            };
            this.bubblesContainer.blendMode = BlendMode.LIGHTEN;
            this.bubblesContainer.x = this.fuel.x;
            this.bubblesContainer.y = this.fuel.y;
            var filters:Array = new Array();
            filters.push(new BlurFilter(3, 0, BitmapFilterQuality.LOW));
            this.bubblesContainer.filters = filters;
            this.bubblesMask = new Shape();
            if (newType)
            {
                addChild(this.bubblesMask);
            };
            this.bubblesMask.graphics.beginFill(0, 0xFF0000);
            this.bubblesMask.graphics.drawCircle(this.tubeR, this.tubeR, this.tubeR);
            this.bubblesMask.graphics.beginFill(0, 0xFF00);
            this.bubblesMask.graphics.drawCircle((this.tubeL - this.tubeR), this.tubeR, this.tubeR);
            this.bubblesMask.graphics.beginFill(0, 0xFF);
            this.bubblesMask.graphics.drawRect(this.tubeR, 0, (this.tubeL - (this.tubeR * 2)), (this.tubeR * 2));
            this.bubblesMask.x = this.fuel.x;
            this.bubblesMask.y = this.fuel.y;
            this.bubblesContainer.mask = this.bubblesMask;
            this.showTimer = new Timer(this.showDelay, 1);
            this.fuelAnimTimer = new Timer(this.fuelAnimDelay, this.fuelAnimPhases.length);
            this.bubblesAnimTimer = new Timer(this.bubblesAnimDelay, 1000000);
            this.hideTimer = new Timer(this.hideDelay, 1);
            this.layer.addEventListener(Event.ENTER_FRAME, this.animFuel);
            this.bubblesAnimTimer.addEventListener(TimerEvent.TIMER, this.animBubbles);
            this.bubblesAnimTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.stopBubblesAnim);
            var t_i:Timer = new Timer((Math.random() * 7000), 1);
            t_i.addEventListener(TimerEvent.TIMER_COMPLETE, this.onChangeImage);
            t_i.reset();
            t_i.start();
            this.changeProgress(0, 0);
            this.onShowTimerComplemete(null);
            this.unlockLoaderWindow();
        }

        private function onChangeImage(t:TimerEvent):void
        {
            var time:Number;
            removeChild(this.image);
            this.image = this.imageLoader.getRandomPict();
            this.image.x = 10;
            this.image.y = 11;
            addChild(this.image);
            var tu:Timer = new Timer((((time = (Math.random() * 7000)) <= 2000) ? 7000 : time), 1);
            tu.addEventListener(TimerEvent.TIMER_COMPLETE, this.onChangeImage);
            tu.start();
        } this.image = this.imageLoader.getRandomPict();  package scpacker.gui
{
    import flash.display.Bitmap;
    import sineysoft.WebpSwc;
    import flash.utils.ByteArray;

    public class GTanksI implements GTanksLoaderImages 
    {

        private var coldload1:Class = GTanksI_coldload1;
        private var coldload2:Class = GTanksI_coldload2;
        private var coldload3:Class = GTanksI_coldload3;
        private var coldload4:Class = GTanksI_coldload4;
        private var coldload5:Class = GTanksI_coldload5;
        private var coldload6:Class = GTanksI_coldload6;
        private var coldload7:Class = GTanksI_coldload7;
        private var coldload8:Class = GTanksI_coldload8;
        private var coldload9:Class = GTanksI_coldload9;
        private var coldload10:Class = GTanksI_coldload10;
        private var coldload11:Class = GTanksI_coldload11;
        private var coldload12:Class = GTanksI_coldload12;
        private var coldload13:Class = GTanksI_coldload13;
        private var coldload14:Class = GTanksI_coldload14;
        private var coldload15:Class = GTanksI_coldload15;
        private var coldload16:Class = GTanksI_coldload16;
        private var coldload17:Class = GTanksI_coldload17;
        private var coldload18:Class = GTanksI_coldload18;
        private var coldload19:Class = GTanksI_coldload19;
        private var coldload20:Class = GTanksI_coldload20;
        private var coldload21:Class = GTanksI_coldload21;
        private var coldload22:Class = GTanksI_coldload22;
        private var coldload23:Class = GTanksI_coldload23;
        private var coldload24:Class = GTanksI_coldload24;
        private var items:Array = new Array(coldload1, coldload2, coldload3, coldload4, coldload5, coldload6, coldload7, coldload8, coldload9, coldload10, coldload11, coldload12, coldload13, coldload14, coldload15, coldload16, coldload17, coldload18, coldload19, coldload20, coldload21, coldload22, coldload23, coldload24);
        private var prev:int;


        public function getRandomPict():Bitmap
        {
            var r:int;
            do 
            {
            } while ((r = (Math.random() * this.items.length)) == this.prev);
            return (new Bitmap(WebpSwc.decode((new (this.items[r])() as ByteArray))));
        } как это все переделать и сделать чтобы картинки брались таким способом             var cacheDirectory:File = File.applicationStorageDirectory.resolvePath("cache/resources/register");
            var file:File = cacheDirectory.resolvePath("register_background.png");