home *** CD-ROM | disk | FTP | other *** search
- function abre_arquivo()
- {
- getURL("http://www.digerati.com.br/loja/busca.php?tipo=2&busca=" + _root.var_loja + "&origem=" + _root.var_codigo,"");
- }
- function Categoria(Categoria_xml)
- {
- function leia()
- {
- _root.myDataGrid.dataProvider.removeAll();
- max = leitor.firstChild.childNodes.length;
- var _loc13_ = Array();
- var _loc6_ = Array();
- var _loc14_ = Array();
- var _loc12_ = Array();
- var _loc8_ = Array();
- var _loc9_ = Array();
- var _loc7_ = Array();
- var _loc11_ = Array();
- var _loc5_ = Array();
- var _loc10_ = Array();
- var _loc4_ = Array();
- var _loc28_ = new Object();
- var _loc29_ = Array();
- var _loc3_ = Array();
- titulo = leitor.firstChild.attributes.name;
- _root.categoria_mc.Categoria_titulo = titulo;
- if(leitor.firstChild.attributes.subCategoria == "true")
- {
- _global.num = 1;
- _root.subCategoria_cb.removeAll();
- maxSub = leitor.firstChild.childNodes[0].childNodes.length;
- _global.tem_sub = true;
- _root.subCategoria_cb.addItem({label:"LISTAR TODOS",data:"all"});
- i = 0;
- while(i < maxSub)
- {
- _loc3_[i] = leitor.firstChild.childNodes[0].childNodes[i].firstChild;
- _root.subCategoria_cb.addItem({label:_loc3_[i],data:_loc3_[i]});
- i++;
- }
- }
- else
- {
- _global.num = 0;
- _root.subCategoria_cb.removeAll();
- _global.tem_sub = false;
- }
- i = _global.num;
- while(i < max)
- {
- _loc13_[i] = leitor.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue;
- _loc6_[i] = leitor.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue;
- _loc14_[i] = leitor.firstChild.childNodes[i].childNodes[2].firstChild.nodeValue;
- _loc12_[i] = leitor.firstChild.childNodes[i].childNodes[3].firstChild.nodeValue;
- _loc8_[i] = leitor.firstChild.childNodes[i].childNodes[4].firstChild.nodeValue;
- _loc9_[i] = leitor.firstChild.childNodes[i].childNodes[5].firstChild.nodeValue;
- _loc7_[i] = leitor.firstChild.childNodes[i].childNodes[6].firstChild.nodeValue;
- _loc11_[i] = leitor.firstChild.childNodes[i].childNodes[7].firstChild.nodeValue;
- _loc5_[i] = leitor.firstChild.childNodes[i].childNodes[8].firstChild.nodeValue;
- _loc10_[i] = leitor.firstChild.childNodes[i].childNodes[9].firstChild.nodeValue;
- _loc4_[i] = leitor.firstChild.childNodes[i].childNodes[10].firstChild.nodeValue;
- _root.myDataGrid.dataProvider.addItem({NUMERO:_loc13_[i],NOME:_loc6_[i],CATEGORIA:_loc14_[i],DESCRICAO:_loc12_[i],LICENCA:_loc8_[i],LIMITACAO:_loc9_[i],CAMINHO:_loc7_[i],IMAGEM:_loc11_[i],CONTROLES:_loc5_[i],COMANDOS:_loc10_[i],AVISO:_loc4_[i]});
- i++;
- }
- if(_loc4_[_global.num] == undefined || _loc4_[_global.num] == "-")
- {
- _root.aviso.gotoAndStop(1);
- _global.tem_aviso = false;
- }
- else
- {
- _global.tem_aviso = true;
- _global.pri_aviso = _loc4_[_global.num];
- }
- _root.descri._visible = false;
- _root.descri.gotoAndStop(3);
- _root.descri.nome.text = _loc6_[_global.num];
- _root.descri.controles_txt.text = _loc5_[_global.num];
- _root.descri.descri.text = _loc12_[_global.num];
- _root.descri.caminho.text = _loc7_[_global.num];
- _root.descri.licenca.text = _loc8_[_global.num];
- _root.descri.limitacao.text = _loc9_[_global.num];
- _root.descri.comando.text = _loc10_[_global.num];
- if(_loc5_[_global.num] == undefined)
- {
- _root.descri.controles_txt.text = "-";
- }
- else
- {
- _root.descri.controles_txt.text = _loc5_[_global.num];
- }
- _root.aviso.informacao.text = _loc4_[_global.num];
- _root.descri.foto.my_ldr.contentPath = mdm.Application.path + "interface\\imagens\\" + _loc11_[_global.num] + ".jpg";
- _root.descri.visible = false;
- }
- var leitor = new XML();
- _global.var_source = mdm.Application.path + "xml/" + Categoria_xml + ".xml";
- leitor.load(_global.var_source);
- leitor.onLoad = leia;
- leitor.ignoreWhite = true;
- System.useCodepage = true;
- _root.myDataGrid.resizableColumns = false;
- }
- function Buscar()
- {
- function leiaBusca()
- {
- _root.myDataGrid.dataProvider.removeAll();
- max = leitor.firstChild.childNodes.length;
- var _loc15_ = Array();
- var _loc6_ = Array();
- var _loc16_ = Array();
- var _loc7_ = Array();
- var _loc9_ = Array();
- var _loc10_ = Array();
- var _loc8_ = Array();
- var _loc13_ = Array();
- var _loc14_ = Array();
- var _loc11_ = Array();
- var _loc12_ = Array();
- var _loc29_ = new Object();
- var _loc28_ = Array();
- j = 0;
- i = _global.num;
- while(i < max)
- {
- _loc15_[i] = leitor.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue;
- _loc6_[i] = leitor.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue;
- _loc16_[i] = leitor.firstChild.childNodes[i].childNodes[2].firstChild.nodeValue;
- _loc7_[i] = leitor.firstChild.childNodes[i].childNodes[3].firstChild.nodeValue;
- _loc9_[i] = leitor.firstChild.childNodes[i].childNodes[4].firstChild.nodeValue;
- _loc10_[i] = leitor.firstChild.childNodes[i].childNodes[5].firstChild.nodeValue;
- _loc8_[i] = leitor.firstChild.childNodes[i].childNodes[6].firstChild.nodeValue;
- _loc13_[i] = leitor.firstChild.childNodes[i].childNodes[7].firstChild.nodeValue;
- _loc14_[i] = leitor.firstChild.childNodes[i].childNodes[8].firstChild.nodeValue;
- _loc11_[i] = leitor.firstChild.childNodes[i].childNodes[9].firstChild.nodeValue;
- _loc12_[i] = leitor.firstChild.childNodes[i].childNodes[10].firstChild.nodeValue;
- if(_root.chave.text != "")
- {
- var _loc3_ = undefined;
- _loc3_ = _root.chave.text;
- _loc3_ = _loc3_.toLowerCase();
- var _loc4_ = new String(_loc6_[i]);
- _loc4_ = _loc4_.toLowerCase();
- var _loc5_ = new String(_loc7_[i]);
- _loc5_ = _loc5_.toLowerCase();
- if(_loc4_.indexOf(_loc3_,0) != -1 || _loc5_.indexOf(_loc3_,0) != -1)
- {
- _loc28_[j] = leitor.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue;
- _root.myDataGrid.vPosition = 1;
- _root.myDataGrid.dataProvider.addItem({NUMERO:_loc15_[i],NOME:_loc6_[i],CATEGORIA:_loc16_[i],DESCRICAO:_loc7_[i],LICENCA:_loc9_[i],LIMITACAO:_loc10_[i],CAMINHO:_loc8_[i],IMAGEM:_loc13_[i],CONTROLES:_loc14_[i],COMANDOS:_loc11_[i],AVISO:_loc12_[i]});
- j++;
- }
- }
- else
- {
- _root.myDataGrid.dataProvider.addItem({NUMERO:_loc15_[i],NOME:_loc6_[i],CATEGORIA:_loc16_[i],DESCRICAO:_loc7_[i],LICENCA:_loc9_[i],LIMITACAO:_loc10_[i],CAMINHO:_loc8_[i],IMAGEM:_loc13_[i],CONTROLES:_loc14_[i],COMANDOS:_loc11_[i],AVISO:_loc12_[i]});
- _root.myDataGrid.vPosition = 0;
- }
- i++;
- }
- _root.chave.text = "";
- }
- var leitor = new XML();
- leitor.load(_global.var_source);
- leitor.onLoad = leiaBusca;
- leitor.ignoreWhite = true;
- System.useCodepage = true;
- }
- function SubCategorias()
- {
- function leiaSub()
- {
- _root.myDataGrid.dataProvider.removeAll();
- max = leitor.firstChild.childNodes.length;
- var _loc13_ = Array();
- var _loc4_ = Array();
- var _loc3_ = Array();
- var _loc11_ = Array();
- var _loc6_ = Array();
- var _loc7_ = Array();
- var _loc5_ = Array();
- var _loc10_ = Array();
- var _loc12_ = Array();
- var _loc8_ = Array();
- var _loc9_ = Array();
- var _loc25_ = new Object();
- var _loc26_ = Array();
- i = _global.num;
- while(i < max)
- {
- _loc13_[i] = leitor.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue;
- _loc4_[i] = leitor.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue;
- _loc3_[i] = leitor.firstChild.childNodes[i].childNodes[2].firstChild.nodeValue;
- _loc11_[i] = leitor.firstChild.childNodes[i].childNodes[3].firstChild.nodeValue;
- _loc6_[i] = leitor.firstChild.childNodes[i].childNodes[4].firstChild.nodeValue;
- _loc7_[i] = leitor.firstChild.childNodes[i].childNodes[5].firstChild.nodeValue;
- _loc5_[i] = leitor.firstChild.childNodes[i].childNodes[6].firstChild.nodeValue;
- _loc10_[i] = leitor.firstChild.childNodes[i].childNodes[7].firstChild.nodeValue;
- _loc12_[i] = leitor.firstChild.childNodes[i].childNodes[8].firstChild.nodeValue;
- _loc8_[i] = leitor.firstChild.childNodes[i].childNodes[9].firstChild.nodeValue;
- _loc9_[i] = leitor.firstChild.childNodes[i].childNodes[10].firstChild.nodeValue;
- if(_global.sub == "all")
- {
- _root.myDataGrid.dataProvider.addItem({NUMERO:_loc13_[i],NOME:_loc4_[i],CATEGORIA:_loc3_[i],DESCRICAO:_loc11_[i],LICENCA:_loc6_[i],LIMITACAO:_loc7_[i],CAMINHO:_loc5_[i],IMAGEM:_loc10_[i],CONTROLES:_loc12_[i],COMANDOS:_loc8_[i],AVISO:_loc9_[i]});
- }
- else if(escape(_global.sub) == escape(_loc3_[i]))
- {
- _root.myDataGrid.dataProvider.addItem({NUMERO:_loc13_[i],NOME:_loc4_[i],CATEGORIA:_loc3_[i],DESCRICAO:_loc11_[i],LICENCA:_loc6_[i],LIMITACAO:_loc7_[i],CAMINHO:_loc5_[i],IMAGEM:_loc10_[i],CONTROLES:_loc12_[i],COMANDOS:_loc8_[i],AVISO:_loc9_[i]});
- }
- _root.myDataGrid.vPosition = 0;
- i++;
- }
- }
- var leitor = new XML();
- leitor.load(_global.var_source);
- leitor.onLoad = leiaSub;
- leitor.ignoreWhite = true;
- System.useCodepage = true;
- }
- stop();
- _root.var_loja = "Excel";
- _root._var_codigo_edicao = "ONCK056";
- _root.var_codigo = "CD_" + _root._var_codigo_edicao;
- if(_global.styles.DataGrid == undefined)
- {
- _global.styles.DataGrid = new mx.styles.CSSStyleDeclaration();
- }
- if(_global.styles.DataGrid == undefined)
- {
- _global.styles.DataGrid = new mx.styles.CSSStyleDeclaration();
- }
- _root.myDataGrid.setStyle("themeColor",12243179);
- _global.styles.DataGrid.setStyle("fontFamily","Verdana");
- _global.styles.DataGrid.setStyle("fontSize",11);
- _global.styles.DataGrid.setStyle("themeColor",13096683);
- _global.styles.DataGrid.setStyle("headerColors",[13096683,16777215]);
- _global.styles.DataGrid.setStyle("alternatingRowColors",[16777215,16120316]);
- _global.styles.DataGrid.setStyle("rollOverColor",16773313);
- _global.styles.DataGrid.setStyle("backgroundColor",13096683);
- _global.styles.DataGrid.setStyle("borderStyle","alert");
- _global.styles.DataGrid.setStyle("borderColor",13096683);
- _global.styles.DataGrid.setStyle("vGridLineColor",13096683);
- _global.styles.DataGrid.setStyle("hGridLineColor",13096683);
- _root.principal = false;
- _global.style.setStyle("fontFamily","Verdana");
- volta_inicio = function()
- {
- _root.anula_btn._visible = false;
- _root.descri.gotoAndStop(1);
- _root.descri_games.gotoAndStop(1);
- if(_root.principal == true)
- {
- _root.categoria_mc.gotoAndPlay("VOLTAR");
- }
- else
- {
- _root.categoria_mc.gotoAndStop(1);
- }
- };
- onEnterFrame = function()
- {
- if(categoria_mc._currentframe == 1)
- {
- anula_btn._visible = false;
- anula_btn.useHandCursor = false;
- }
- else
- {
- anula_btn._visible = true;
- anula_btn.useHandCursor = false;
- }
- };
- _root.myDataGrid.columnNames = ["NUMERO","NOME","CATEGORIA","DESCRICAO","LICENCA","LIMITACAO","CAMINHO","IMAGEM","CONTROLES","COMANDOS","AVISO"];
- _root.myDataGrid.getColumnAt(0).headerText = "N┬║";
- _root.myDataGrid.getColumnAt(0).width = 32;
- _root.myDataGrid.getColumnAt(0).textAlign = "center";
- _root.myDataGrid.getColumnAt(1).width = 285;
- _root.myDataGrid.getColumnAt(2).textAlign = "center";
- _root.myDataGrid.getColumnAt(2).width = 185;
- _root.myDataGrid.getColumnAt(3).width = 190;
- _root.myDataGrid.getColumnAt(4).width = 190;
- _root.myDataGrid.selectable = true;
- _root.myDataGrid.refresh();
- carregarCat = function(a)
- {
- _global.Categoria_xml = a;
- Categoria(_global.Categoria_xml);
- _root.categoria_mc.play();
- };
-