navigatetourl

Need help AS3 navigateToURL opening new window

故事扮演 提交于 2019-12-11 14:32:18
问题 AS3 noob here. I am using the following code to successfully send a var to my php/database. My problem is that, of course, when I click my button in the Flash movie the browser navigates away to the "http://www.mydomain.com/charity.php?id=c" url. function onPressHandlerc(evt:MouseEvent):void { var url:String = "http://www.mydomain.com/charity.php?id=c"; var request:URLRequest = new URLRequest(url); try { navigateToURL(request, '_blank'); } catch (e:Error) { trace("Error occurred!"); } } How

How to set timeout for webBrowser navigate event

烂漫一生 提交于 2019-11-30 15:11:15
问题 how can i set timeout for webBrowser navigate (url) event c# netframework 4.0 回答1: By using a Timer of course. For example: public void NavigateTo(Uri url) { webBrowser1.Navigate(url); timer1.Enabled = true; } private void timer1_Tick(object sender, EventArgs e) { timer1.Enabled = false; MessageBox.Show("Timeout on navigation"); } private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { if (e.Url == webBrowser1.Url && timer1.Enabled) { timer1.Enabled