preloader друг swf с preloader

Трябва да отворя "game.swf"

Преди да отворя с този swf, наречен "loadgame.swf" (изтеглен от уебсайта на играта, 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

Носих този 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/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

С достъп до „http://www.flashgame.com/loadgame.swf“, аз съм достъп до копие на моя "loadgame.swf", но без допълнителните функции.

Всъщност имам нужда от

this.Chargeur.load(new URLRequest("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)

Ако някой има желание да помогне, благодаря...


person Jerrythecat Silva    schedule 17.09.2013    source източник


Отговори (1)


Вашият домейн на приложението може да е проблемът.

пробвай така:

var _urlRequest:URLRequest = new URLRequest(“mySecondarySwf.swf”);
var _loader:Loader = new Loader();
var _lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
_loader.load(_urlRequest, _lc);
person ThanksBro    schedule 18.09.2013