Skip to content

Instantly share code, notes, and snippets.

@fenixkim
Created May 8, 2013 20:24
Show Gist options
  • Save fenixkim/5543354 to your computer and use it in GitHub Desktop.
Save fenixkim/5543354 to your computer and use it in GitHub Desktop.
El siguiente código muestra como abrir una URL al presionar un botón.
import flash.events.MouseEvent;
import flash.net.navigateToURL;
import flash.net.URLRequest;
boton1.addEventListener(MouseEvent.CLICK, onBoton1Click);
boton2.addEventListener(MouseEvent.CLICK, onBoton2Click);
function onBoton1Click (event:MouseEvent) {
navigateToURL(new URLRequest("http://apple.com"), "_blank");
}
function onBoton2Click (event:MouseEvent) {
navigateToURL(new URLRequest("http://google.com"), "_blank");
}
@fenixkim
Copy link
Author

fenixkim commented May 8, 2013

Usted puede cambiar "_blank" por "_self" para que el enlace abra en la misma ventana cuando la película de flash se encuentre embebida en una pagina HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment