Created
May 8, 2013 20:24
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.