Ir para conteúdo
Fórum Script Brasil

gmbotega

Membros
  • Total de itens

    3
  • Registro em

  • Última visita

Sobre gmbotega

gmbotega's Achievements

0

Reputação

  1. gmbotega

    Problemas com querystrin

    Mas amigo.. duas querystring?? "/index.php?acao=modulos/aviso/alterar.php?id=<?php echo $linha['id']; ?>" ps: não funcionou,eu vou tentar usar o operador & de adição .. Obrigado por ajudar.
  2. LINK PARA ARQUIVO : www.linceuftm.com/menu/menu.rar > clica aqui Bom pessoal, espero que me ajudem: o que eu preciso é INSERIR um link ( href ) no menu. o arquivo . fla está em anexo o xml é o seguinte : <?xml version="1.0" encoding="UTF-8"?> <menu textColor="0x666666" rolloverColor="0xFFCC00" spacing="20"> <item title="Home"/> <item title="About us"/> <item title="Services"/> <item title="Portfolio"/> <item title="Contact"/> </menu´> CODIGO DO .FLA import mx.transitions.Tween; import mx.transitions.easing.*; //create function to add buttons on stage function addButtons() { pushOverX = 0; for (i=0; i<obj.buttons.length; i++) { btn = menu.attachMovie("button", "btn"+i, -i, {_x:pushOverX, id:i}); btn.t.autoSize = "left"; btn.t.text = obj.buttons[i].attributes.title; btn.t.textColor = tC; btn.back._width = btn.t._width; pushOverX += Math.round(btn._width+bS); setBtnEvents(btn); } selectFirstBtn(); var cl:Color = new Color(menu.bar); cl.setRGB(tROC); } //create function for buttons events function setBtnEvents(btn:MovieClip) { btn.onRollOver = function() { btn = this; st = obj.buttons[btn.id].attributes.title; //apply effect to this btn btn.t.textColor = tROC; typeText(btn.t,st,0,5); //stop current tween menu.bar.tweenX.stop(); menu.bar.tweenWidth.stop(); //tween bar menu.bar.tweenX = new Tween(menu.bar, "_x", Strong.easeOut, menu.bar._x, btn._x, .6, true); menu.bar.tweenWidth = new Tween(menu.bar, "_width", Strong.easeOut, menu.bar._width, btn.back._width, .6, true); //apply effect to pressed btn pressedBtn.t.textColor = tC; typeText(pressedBtn.t,obj.buttons[pressedBtn.id].attributes.title,0,1); //play sound s.start(); }; btn.onRollOut = function() { btn = this; st = obj.buttons[btn.id].attributes.title; //apply effect to this btn btn.t.textColor = tC; typeText(btn.t,st,0,1); //stop current tween menu.bar.tweenX.stop(); menu.bar.tweenWidth.stop(); //tween bar menu.bar.tweenX = new Tween(menu.bar, "_x", Strong.easeOut, menu.bar._x, pressedBtn._x, .6, true); menu.bar.tweenWidth = new Tween(menu.bar, "_width", Strong.easeOut, menu.bar._width, pressedBtn.back._width, .6, true); //apply effect to pressed btn pressedBtn.t.textColor = tROC; typeText(pressedBtn.t,obj.buttons[pressedBtn.id].attributes.title,0,5); //play sound s.start(); }; btn.onPress = function() { pressedBtn.enabled = true; pressedBtn = this; this.enabled = false; //ADD HERE CUSTOM FUNCTION st = obj.buttons[pressedBtn.id].attributes.title + " button is pressed"; demoFunction(st); }; } function selectFirstBtn(){ pressedBtn = menu.btn0; pressedBtn.enabled = false; //tween bar menu.bar.tweenX = new Tween(menu.bar, "_x", Strong.easeOut, menu.bar._x, pressedBtn._x, .6, true); menu.bar.tweenWidth = new Tween(menu.bar, "_width", Strong.easeOut, menu.bar._width, pressedBtn.back._width, .6, true); //apply effect to this btn pressedBtn.t.textColor = tROC; typeText(pressedBtn.t,obj.buttons[pressedBtn.id].attributes.title,0,5); } //create typing effect function typeText(t:TextField, finalString:String, initRandomStringLength:Number, speed:Number) { var currentLength:Number = 0; var counter:Number = 0; t._parent.onEnterFrame = function() { if (currentLength<finalString.length) { counter++; var currentString:String = ""; var randString:String = ""; //get random char for (i=currentLength; i<initRandomStringLength; i++) { randString += String.fromCharCode(random(50)+20); } //add char to complete string for (i=0; i<=currentLength; i++) { currentString += finalString.charAt(i); } //if counter is equal to speed or the correct char is found add one unit to current length and set counter equal to 0 if (counter>=speed || randString.charAt(stL) == finalString.charAt(stL)) { currentLength++; counter = 0; } if (initRandomStringLength<finalString.length-1) { initRandomStringLength++; } t.text = currentString+randString; } else { delete t._parent.onEnterFrame; } }; } //this function is for preview function demoFunction(st:String){ demoMC._alpha = 100; demoMC.t.text = st; demoMC.t.textColor = tROC; demoMC.tweenAlpha = new Tween(demoMC, "_alpha", Strong.easeIn, 100, 0, 1, true); } //create sound object to load the rollover sound (you can change the path for another sound) var s:Sound = new Sound(); s.loadSound("rollOverSound.mp3"); s.setVolume(80); var tC:Number = new Number();//text color var tROC:Number = new Number();//rollover text color var bS:Number = new Number();//buttons spacing var pressedBtn:MovieClip = new MovieClip(); //object that contains data from xml var obj:Object = new Object(); //create nex xml object var xml:XML = new XML(); xml.ignoreWhite = true; //after the xml is loaded, load variables and parse the date to obj xml.onLoad = function(succes) { if (succes) { tC = Number(this.firstChild.attributes.textColor); tROC = Number(this.firstChild.attributes.rolloverColor); bS = Number(this.firstChild.attributes.spacing); obj.buttons = this.firstChild.childNodes; //function call addButtons(); } else { trace("xml could not load"); } }; //the path to the xml file xml.load("menu.xml"); urlMC.onPress = function(){ getURL ("http://www.nogrids.com", "_blank"); } - Obrigado
  3. Bom dia pessoal.Espero que possam me ajudar. Bem, estou desenvolvendo um site e estou usando querystring.Bem na index do site eu inseri o seguinte codigo : <?php $acao = $_GET["acao"]; if(empty($acao)) { include("home.php"); }elseif(eregi("http|ftp|https|www|wget", $acao) || !is_file($acao.".php")){ include("ilegal.php"); }else{ include($acao.".php"); } ?> [/codebox] e no menu eu dou o seguinte href="?acao=modulos/aviso/admin" Beleza.. até ai sem problema..eu clico e ele carrega a pagina sem problemas, sinal de que a QS até ai funcionou (modulos/aviso/admin.php)no menu dela contem um link que se chama atualizar com o seguinte href="http://www.enredeco.com/modulos/aviso/alterar.php?id=<?=$linha['id']?>" o problema é que quando eu clico.. ele carrega a pagina.. mas não na index.php e sim em outra pag .(_blank) ps: a target está correta. Obrigado.
×
×
  • Criar Novo...