# Loaded external swf reloads after ~ 1sec

**URL:** <https://forum.kirupa.com/t/loaded-external-swf-reloads-after-1sec/227626>\
**Category:** flash\
**Created:** [May 31, 2007, 8:39pm UTC](https://forum.kirupa.com/t/loaded-external-swf-reloads-after-1sec/227626 "2007-05-31T20:39:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nisseberit21](https://avatars.discourse-cdn.com/v4/letter/n/c89c15/32.png) [@nisseberit21](https://forum.kirupa.com/u/nisseberit21)\
**Post date:** [May 31, 2007, 8:39pm UTC](https://forum.kirupa.com/t/loaded-external-swf-reloads-after-1sec/227626/1 "2007-05-31T20:39:55Z")

</div>

Hi folks

I have this code (AS 2.0 / FLASH 8) for loading swf from an array, and it works great except one little thing. The lodaded swfs reloads after one second and then it plays like normal. I have placed the start and stop attribute to ensure that the swf doesn’t start before its fully loaded, but then this happens. Can anyone explain what I am doing wrong? Thanks!

```php
function loadSwf(sceneSelect){
        
        this.loader.loadMovie(scenes[sceneSelect]);
        
        this.onEnterFrame = function(){        
            if(this.loader.getBytesLoaded(scenes[sceneSelect]) == this.loader.getBytesTotal(scenes[sceneSelect])) {
            
                this.loader.play();
                this.loader._visible = 1;
                delete this.onEnterFrame;
            }
            else {
                this.loader.stop();
                this.loader._visible = 0;
            }
        }
};

```

/NB21
