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.
