Ver Mensaje Individual
  #7 (permalink)  
Antiguo 17/05/2009, 09:27
modatorrevieja
 
Fecha de Ingreso: abril-2009
Mensajes: 173
Antigüedad: 15 años
Puntos: 0
Respuesta: Como se crea una variable _golbal

Me da error 1120 acceso a una propiedad num no definida _global.numero_num=num;
MI FLASH
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.events.MouseEvent;
import flash.display.Loader;
import flash.net.URLRequest;

var LoaderList:URLLoader =new URLLoader();
var loadImg:Loader=new Loader(); //variable para imagen principal
var loadImg2:Loader=new Loader(); //variable para imagen secundaria
var loadImg3:Loader=new Loader(); //variable para imagen novedad
var myXML:XML=new XML();
_global.numero_num=num;
function CargaListaContenido() {
LoaderList=new URLLoader(new URLRequest("http://80.36.206.105/smp/PHY/datosxmlCP.php"));
LoaderList.addEventListener(Event.COMPLETE, xmlLoaded);
tiempo.addEventListener(TimerEvent.TIMER, movimiento);
tiempo.start();
}
function MuestraArticulos(id:Number) {
loadImg=new Loader();
loadImg2=new Loader();
loadImg3=new Loader();
loadImg.load(new URLRequest(myXML.child("imagenprincipal")[id]));
loadImg2.load(new URLRequest(myXML.child("imagensecundaria")[id]));
loadImg3.load(new URLRequest(myXML.child("novedadimagen")[id]));
loadImg.contentLoaderInfo.addEventListener(Event.C OMPLETE, redimenciona);
loadImg2.contentLoaderInfo.addEventListener(Event. COMPLETE, redimenciona);
loadImg3.contentLoaderInfo.addEventListener(Event. COMPLETE, redimenciona);
contenedor.addChild(loadImg);
contenedor2.addChild(loadImg2);
contenedor3.addChild(loadImg3);
addChild(contenedor3);
addChild(contenedor2);
addChild(contenedor);
codigoproductos.text=myXML.child("codigo")[id];
nombreproductos.text=myXML.child("nombre")[id];
precioespecialproductos.text=myXML.child("precioes pecial")[id];
descrproductos.text=myXML.child("descripcion")[id];
observaproductos.text=myXML.child("observaciones")[id];
pvpproductos.text=myXML.child("pvp")[id];
fechaproductos.text=myXML.child("fecha")[id];
cont=id;
if(cont > myXML.child("codigo").length()){ //vuelve a empezar
cont=0
}
}
function onClick(event:MouseEvent):void {
flash.net.URLLoader("80.36.206.105/smp/PHY/creandopdf.php?num="+_global.numero_num+"");
}
function xmlLoaded(event:Event):void {
myXML=XML(LoaderList.data);
MuestraArticulos(0)
boton_recibir.addEventListener(MouseEvent.MOUSE_DO WN,EventosDeBoton);
siguiente.addEventListener(MouseEvent.MOUSE_DOWN,E ventosDeBoton);
anterior.addEventListener(MouseEvent.MOUSE_DOWN,Ev entosDeBoton);
btnpdf.addEventListener(MouseEvent.CLICK, onClick);
}