# Preloader another swf with preloader

**URL:** <https://forum.kirupa.com/t/preloader-another-swf-with-preloader/331657>\
**Category:** Uncategorized\
**Created:** [September 18, 2013, 8:11pm UTC](https://forum.kirupa.com/t/preloader-another-swf-with-preloader/331657 "2013-09-18T20:11:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![farofakids](https://avatars.discourse-cdn.com/v4/letter/f/eada6e/32.png) [@farofakids](https://forum.kirupa.com/u/farofakids)\
**Post date:** [September 18, 2013, 8:11pm UTC](https://forum.kirupa.com/t/preloader-another-swf-with-preloader/331657/1 "2013-09-18T20:11:59Z")

</div>

I need to open “game.swf”

Before i opened with this swf, called “loadgame.swf” (downloaded from the website of the game, [flashgame.com/loadgame.swf](http://flashgame.com/loadgame.swf))

```
        this.Chargeur = new Loader();
        Security.allowDomain("*");
        this._C._B.width = 1;//this part of the loading animation
        this.Chargeur.contentLoaderInfo.addEventListener(Event.COMPLETE, this.Chargement_Ok);//this part of the preloader
        this.Chargeur.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, this.Chargement_EnCours);//this part of the preloader
        addChild(this.Chargeur);
        this.Chargeur.load(new URLRequest("flashgame.com/game.swf"));
        return;

    public function Chargement_Ok(event:Event) : void
    {
        this.Chargeur.contentLoaderInfo.removeEventListener(Event.COMPLETE, this.Chargement_Ok);//this part of the preloader
        this.Chargeur.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, this.Chargement_EnCours);//this part of the preloader
        this.Charge = 0;//this part of the preloader
        this.pregame = DisplayObject(this.Chargeur.contentLoaderInfo.content); //This is part of additional functions that I put in the game
        Loader(this.pregame.getChildAt(0)).contentLoaderInfo.addEventListener(Event.COMPLETE, this.gameInserido); //This is part of additional functions that I put in the game
        this.BtcPlugin.addEventListener(MouseEvent.MOUSE_DOWN, this.Funcgame); //This is part of additional functions that I put in the game
        removeChild(this._C);//this part of the loading animation
        return;
    }// end function

```

I wore this loadgame.swf directly from my pc to access the game…Currently the game does not accept it anymore.

However I can access the game this way:

```
        this.Chargeur = new Loader();
        Security.allowDomain("*");
        this._C._B.width = 1;//this part of the loading animation
        this.Chargeur.contentLoaderInfo.addEventListener(Event.COMPLETE, this.Chargement_Ok);//this part of the preloader
        this.Chargeur.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, this.Chargement_EnCours);//this part of the preloader
        addChild(this.Chargeur);
        this.Chargeur.load(new URLRequest("flashgame.com/loadgame.swf")); //(the online version it loads game.swf, but without the additional functions)
        return;

    public function Chargement_Ok(event:Event) : void
    {
        this.Chargeur.contentLoaderInfo.removeEventListener(Event.COMPLETE, this.Chargement_Ok);//this part of the preloader
        this.Chargeur.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, this.Chargement_EnCours);//this part of the preloader
        this.Charge = 0;//this part of the preloader
        this.pregame = DisplayObject(this.Chargeur.contentLoaderInfo.content); //stopped working
        Loader(this.pregame.getChildAt(0)).contentLoaderInfo.addEventListener(Event.COMPLETE, this.gameInserido); //stopped working
        this.BtcPlugin.addEventListener(MouseEvent.MOUSE_DOWN, this.Funcgame); //stopped working
        removeChild(this._C);//this part of the loading animation
        return;
    }// end function

```

By accessing “[http://www.flashgame.com/loadgame.swf](http://www.flashgame.com/loadgame.swf)”, I’m accessing a copy of my “loadgame.swf” but without the additional functions.

Well actually I need,

this.Chargeur.load(new URLRequest(“[flashgame.com/loadgame.swf](http://flashgame.com/loadgame.swf)”)); //(game.swf will be open within that swf)  
this.Chargeur.contentLoaderInfo.addEventListener(Event.COMPLETE, this.Chargement\_Ok); //(Load only when Chargeur open game.swf completely)

If someone is willing to help I thank…
