Reputation: 931
I'm programming for android with flash in Actionscript 3.0. I need to navigate to a webpage after user touches the button. Something like this:
button.addEventListener(TouchEvent.TOUCH_TAP, fl_TapHandler);
function fl_TapHandler(event:TouchEvent):void
{
WebBrowser.Navigate("http://www.webpage.com/");
}
I don't know this function D: . Please help.
Upvotes: 2
Views: 1231
Reputation: 7023
I think it should be like this
button.addEventListener(TouchEvent.TOUCH_TAP, fl_TapHandler);
function fl_TapHandler(event:TouchEvent):void
{
var request:URLRequest = new URLRequest("http://www.webpage.com/");
navigateToURL(request);
}
The navigateToURL
method is a part of the flash.net
package.
Upvotes: 3