# Full screen jpg - loading problems!

**URL:** <https://forum.kirupa.com/t/full-screen-jpg-loading-problems/195282>\
**Category:** flash\
**Created:** [July 30, 2006, 1:30pm UTC](https://forum.kirupa.com/t/full-screen-jpg-loading-problems/195282 "2006-07-30T13:30:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![williby27](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/williby27/32/1501_2.png) [@williby27](https://forum.kirupa.com/u/williby27)\
**Post date:** [July 30, 2006, 1:30pm UTC](https://forum.kirupa.com/t/full-screen-jpg-loading-problems/195282/1 "2006-07-30T13:30:23Z")

</div>

Well its pretty simple what i want - and i’m almost there. Basically i need a jpg as my background - and it works well.

The only problem is that sometimes when i test my site live - the preloader for the background image just blinks and then disappears straight away - and i have to refresh my page for the actual image to fade in.

It works fine when i test inside flash and it also works on some computers and on internet explorer - so i really have no idea what may cause the problem.

But, there could be some code that i’ve placed that has caused this possible error.

[You can view the current site here](http://www.wjrdesign.com/nathan/)

and here is the code that loads the jpg, its on frame 3, the final frame of the movie:

```auto

stop();
movieLoader.loadMovie("gallery3.swf");

Stage.scaleMode = "noScale";
var trialNavigation = new ContextMenu();
trialNavigation.hideBuiltInItems();

// Applying the new menu
_level0.menu = trialNavigation;

function loadImage() {
    imageClip._alpha = 0;
    imageClip.createEmptyMovieClip("holder", 999);
    imageClip.holder.loadMovie("background.jpg");
    this.onEnterFrame = function() {
        BL = imageClip.holder.getBytesLoaded();
        BT = imageClip.holder.getBytesTotal();
        getPercent = BL/BT;
        loadText = "loading background " + Math.round(getPercent*100)+"%";
        if (BL == BT) {
            loadText = "";
            sl.onResize();
            if(imageClip._alpha < 100)
            {
                imageClip._alpha = imageClip._alpha + 10;
            }else{
            delete this.onEnterFrame;

            }
        }
    };
}

loadImage();

var sl:Object = new Object();
sl.onResize = function() {
    
    //imageClip._width = Stage.width + 64;
    //imageClip._height = imageClip._width*0.75;
        imageClip._height = Stage.height + 64;
    imageClip._width = imageClip._height*(4/3);
    imageClip._x = 400 - imageClip._width/2;
    imageClip._y = 300 - imageClip._height/2;
};
Stage.addListener(sl);

```
