Comunidad de diseño web y desarrollo en internet online

Cargar un SWF con XML en un Moviecontainer

Citar            
MensajeEscrito el 10 Oct 2009 07:21 am
Que tal a todos...

En Flash CS· en Actionscript 2, no encuentro la forma de como lograr que se cargue un movieclip que usa XMLs dentro de un moviecontainer...

¿Alguien me podría ayudar con el código?

My código para el swf que trato de cargar es:

stop();

//--------------------------------------------------------------------------------------
// Import Tween Files | Stage Setup
//--------------------------------------------------------------------------------------

import mx.transitions.Tween;
#include "mc_tween2.as"

Stage.scaleMode = "noScale";
preloader._visible = false;
perc.text = "";

//--------------------------------------------------------------------------------------
// Preload Function For External SWF Files | To Check If Shop is Loaded or Not
//--------------------------------------------------------------------------------------

_global.ShopLoaded = false;
_global.MenuShopName = "SHOP";
_global.ActionToDo = "";

_global.preloadSwf = function() {

_global.ShopLoaded = false;
_root.swfHolder.loadMovie(WHICHSWFTOLOAD);
onEnterFrame=function()
{
var percent = Math.round((swfHolder.getBytesLoaded()/swfHolder.getBytesTotal())*100);
if(!isNaN(percent)){perc.text = percent + "%";}
if(percent == 0 || percent == 63 || percent == 74){ perc.text = "";}
else if(percent == 100)
{
perc.text = "";
delete this.onEnterFrame;
}
}
}

//--------------------------------------------------------------------------------------
// Fullscreen Listener
//--------------------------------------------------------------------------------------

stageListener = new Object();
stageListener.onResize = function()
{
tileBg();
};
Stage.addListener(stageListener);

bgShadowWidth = bgShadow._width;
swfHolderWidth = swfHolder._width;
whiteBgWidth = whiteBg._width;
copyRightWidth = copyRight._width; // copyright full width

bgAlign._x = 0; // grey gradient x
bgAlign._y = 107.3; // grey gradient y

function tileBg()
{
logo._x = Math.floor((Stage.width/2)-(405));
perc._x = Math.floor((Stage.width/2)-(400));
menuHead._x = Math.floor((Stage.width/2)+ 412 - menuHead._width - 2 - full_screen_btn_mc._width);
full_screen_btn_mc._x = Math.floor((Stage.width/2)+ 412 - full_screen_btn_mc._width);
bgShadow._x = Math.floor((Stage.width/2)-(bgShadowWidth/2));
swfHolder._x = Math.floor((Stage.width/2)-(swfHolderWidth/2));
whiteBg._x = Math.floor((Stage.width/2)-(whiteBgWidth/2));
copyRight._x = Math.floor((Stage.width/2)-(copyRightWidth/2));
shopping_cart_clip._x = Math.floor((Stage.width/2)+ 227);
topHeader._width = Stage.width;
whiteBg._height = Stage.height;
copyRight._y = Stage.height - 15;
bgAlign._width = Stage.width;
}
tileBg();

//--------------------------------------------------------------------------------------
// Fullscreen Button
//--------------------------------------------------------------------------------------

function goFullScreen() {Stage["displayState"] = "fullScreen";}
function exitFullScreen() {Stage["displayState"] = "normal";}
setup_position();

which I have no problem...

El Actionscript que intenté usar sin éxito para intentar cargar mi swf en un moviecontainer fué:

stop();
myContainer.loadMovie("preview.swf");

Se que fué mu simple, pero pensé que funcionaría... me carga el SWF, pero no reconoce los XMLs para el resto de mi movieclip.

Gracias.

Por dornedain

1 de clabLevel



 

firefox
Citar            
MensajeEscrito el 13 Oct 2009 12:38 am
¿No, no se puede cargar un .swf con sus respectivos xml en un moviecontainer?

Por dornedain

1 de clabLevel



 

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.