# Help loading a random background full screen

**URL:** <https://forum.kirupa.com/t/help-loading-a-random-background-full-screen/240403>\
**Category:** flash\
**Created:** [October 2, 2007, 5:50pm UTC](https://forum.kirupa.com/t/help-loading-a-random-background-full-screen/240403 "2007-10-02T17:50:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RichGags](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/richgags/32/685_2.png) [@RichGags](https://forum.kirupa.com/u/RichGags)\
**Post date:** [October 2, 2007, 5:50pm UTC](https://forum.kirupa.com/t/help-loading-a-random-background-full-screen/240403/1 "2007-10-02T17:50:16Z")

</div>

In the bottom layer of my main movie, Id like to put a random background image which loads on entering the frame and stretches to full screen. I would like to use a preloader for the image so Im trying to load a swf using this which I found here:

[http://www.kirupa.com/developer/mx/loadingrandombackground2.htm](http://www.kirupa.com/developer/mx/loadingrandombackground2.htm)

```auto
choice = Math.round(Math.random()*5);
switch (choice) {
case 0 :
    location.loadMovie("image0.swf");
    break;
case 1 :
    location.loadMovie("image0.swf");
    break;
case 2 :
    location.loadMovie("image0.swf");
    break;
case 3 :
    location.loadMovie("image0.swf");
    break;
case 4 :
    location.loadMovie("image0.swf");
    break;
case 5 :
    location.loadMovie("image0.swf");
    break;
}

```

but I could not get it to stretch full screen. How do I get the externally loaded swf to stretch full screen and be able to resize via a listener from within my main movie?

Thanks!  
Rich
