Click to See Complete Forum and Search --> : Positioning movie in Layer AS3


r4gn0
09-18-2008, 07:28 PM
Hi there! im calling a movie from my library but i want it under a picture in one of the layers, how can i do that? here is the code:

Create a var for the movie

var inicio:pagInicio = new pagInicio();

placing the movie in the document


var currentPage:MovieClip=inicio;
var nextPage:MovieClip;
inicio.alpha=0;
inicio.x=242.7;
inicio.y=103.3;
addChild(inicio);


how can i tell the movie to load in a certain layer??? HELP PLZ!!!

r4gn0
09-22-2008, 10:39 AM
I found the solution!!! i added a movie clip in the specific layer and give an instance name, then added the child to the container :D


function onClick(e:MouseEvent){
var swfPath:URLRequest;
switch(e.target){
case inicio_mc: swfPath = new URLRequest("pagInicio.swf");
break;
case proyecto_mc: swfPath = new URLRequest("pagProyecto.swf");
break;
case galeria_mc: swfPath = new URLRequest("pagGaleria.swf");
break;
case ubicacion_mc: swfPath = new URLRequest("pagUbicacion.swf");
break;
case cartagena_mc: swfPath = new URLRequest("pagCartagena.swf");
break;
case respaldo_mc: swfPath = new URLRequest("pagRespaldo.swf");
break;
case contacto_mc: swfPath = new URLRequest("pagContacto.swf");
break;
default: trace("Error: loadImage called by unknown button");
break;
}
var swfLoader:Loader = new Loader();
swfLoader.load(swfPath)
// HEREE!!!!!
contenedor.addChild(swfLoader)
}