Comunidad de diseño web y desarrollo en internet online

Ayuda con getnextDepth

Citar            
MensajeEscrito el 03 Jun 2010 05:46 am
Hola tengo una duda estoy haciendo una presentación para la empresa donde trabajo, con un código de un template que compré, son unos puntos (dots) que aparecen por coordenadas mediante un xml, el asunto es que los dost aparecen por sobre todo el movieclip, y debido a mis escasos conocimientos de utilización de niveles no he podido quitarle esa propiedad, sé que tiene que ver con la propiedad getnextDepth que la forma, pero no sé como hacer para pasar estos dots a un nivel más bajo para poder poner un swf externo que quiero cargar por encima, este es el código, desde donde llama el swf externo que quiero que quede encima, hasta la llamada del array que genera los dots que quiero queden abajo del swf externo, si alguien puede ayudarme con esto, mil gracias.

Código :

// Create empty movie clip for external SWF. 
this.createEmptyMovieClip("temp_mc", 1);
this.temp_mc.createEmptyMovieClip("content_mc", 1);
this.temp_mc.content_mc._lockroot = true;
// Create Spot List Array
var spot_list:Array = [];
var external_swf_file:String = null;
// add spot over sound effect
over_snd = new Sound(this);
over_snd.attachSound("over");
// Create Spot XML object 
var spot_list_xml:XML = new XML();
spot_list_xml.ignoreWhite = true;
// When load XML data call this function
spot_list_xml.onLoad = function(load_status:Boolean):Void  {
   var nodes:Array = this.firstChild.childNodes;
   // Get Nodes Length
   spot_list_length = nodes.length;
   external_swf_width = Number(nodes[0].attributes.external_swf_width);
   external_swf_height = Number(nodes[0].attributes.external_swf_height);
   starting_swf_file_path = String(nodes[0].attributes.starting_swf_file_path);
   create_mask(external_swf_width, external_swf_height);
   // read all XML data  
   for (var i = 1; i<spot_list_length; i++) {
      // add all spot information to spotlist array 
      spot_list.push({location_name:nodes[i].attributes.location_name, x:nodes[i].attributes.x, y:nodes[i].attributes.y, dot_normal_color:nodes[i].attributes.dot_normal_color, dot_rollover_color:nodes[i].attributes.dot_rollover_color, url:nodes[i].attributes.url, url_target:nodes[i].attributes.url_target, swf:nodes[i].attributes.swf});
   }
   // call duplicate spot function 
   create_spot_list();
   external_swf_file_load(starting_swf_file_path);
};
// load xml file 
spot_list_xml.load("xml/spots.xml");
// Define duplicate spot function  
create_spot_list = function () {
   for (i=0; i<spot_list_length-1; i++) {
      // attach spot to map from libray 
      var spot = this.attachMovie("spot_mc", "spot_mc"+i, this.getNextHighestDepth());
      // Define Spot Location Name 
      spot.location_name = spot_list[i].location_name;
      // Placed each spot X and Y coordinate on the map 
      spot._x = Number(spot_list[i].x);
      spot._y = Number(spot_list[i].y);
      spot.dot_normal_color = Number(spot_list[i].dot_normal_color);
      spot.dot_rollover_color = Number(spot_list[i].dot_rollover_color);
      // Define Spot URL data
      spot.url = spot_list[i].url;
      spot.url_target = String(spot_list[i].url_target);
      // Define External SWF file path 
      spot.swf_file = spot_list[i].swf;
   }
};



Saludos.

Por Monlo

13 de clabLevel



 

msie8
Citar            
MensajeEscrito el 03 Jun 2010 06:13 pm
Si quieres poner un elemento por encima de los dots, puedes usar la función swapDepth, que te permite intercambiar el nivel de profundidad entre dos objetos. En la ayuda de Flash tienes incluso código de ejemplo de cómo funciona.

Por The Fricky!

Presidente

6168 de clabLevel

3 tutoriales
8 articulos

Genero:Masculino   Bastard Operators From Hell Héroes

Piccola Venezia...

chrome

 

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