Comunidad de diseño web y desarrollo en internet online

ir a URL externa con un botón

Citar            
MensajeEscrito el 24 May 2011 08:33 am
Hola. Me estoy encontrando con un problema.. En los botones de mi web.. en cuanto a ir a Urls dentro de la misma web no tengo problemas. pero si los programo para ir a cualquier otra web, en los ordenadores con xp antiguos el botón no hace absolutamente nada.

Por ejemplo. Si pongo esto....

boton_btn.addEventListener(MouseEvent.CLICK, onClick);

function onClick (e:Event):void
{
navigateToURL (new URLRequest ("index.swf"),"_self");
}

Funcionaría perfectamente.
Pero si pongo esto....
boton_btn.addEventListener(MouseEvent.CLICK, onClick);

function onClick (e:Event):void
{
navigateToURL (new URLRequest ("http://www.davidlopezgamero.com"),"_self");
}

El botón no haría absolutamente nada. Cual es el problema? hay solución?

Por robarmay

0 de clabLevel



 

msie8
Citar            
MensajeEscrito el 24 May 2011 08:52 am
No sé mucho de programación, pero porque pones "_self"???
No tengo ni idea de porque no te va ni si de esta bien pero a mi así me funciona:

import flash.net.URLRequest;
import flash.events.MouseEvent;
import flash.events.Event;

tuita.addEventListener(MouseEvent.MOUSE_DOWN, twitter);
function twitter(ev){
navigateToURL(new URLRequest("http://twitter.com/#!/BobsCigar"), "_blank");
}

Por riccitos

6 de clabLevel



 

firefox
Citar            
MensajeEscrito el 25 May 2011 12:31 am
esto te ayudara
private function handleClickEvent(e:FlowElementMouseEvent, URL:String):void {
var url:String = URL;
navigateToURL(new URLRequest(url), '_blank');
}

<mx:LinkButton label="ir a la pagina de adobe" click="handleClickEvent(le pasas tu URL)"/>
claro tu le puedes mandar dinamicamente la direccion, pero si haces un copy/paste del codigo anterior te funcionara

Por rtome

6 de clabLevel



 

chrome

 

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