In the following code the navigateToURL property is navigating to the same page which creates the refreshing of the page.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="1024" applicationComplete="init()" minHeight="768">
     <mx:Script>
      <![CDATA[
      	import flash.net.navigateToURL;
      	import mx.controls.Alert;
        private function init():void
        {
        }
        protected function button1_clickHandler(event:MouseEvent):void
        {
                navigateToURL(new URLRequest("javascript:location.reload(true)"), "_self");
                var urlRequest:URLRequest = new URLRequest(Application.application.url);
				navigateToURL(urlRequest,"_self");
        }
      ]]>
   </mx:Script>
<mx:Button x="187" y="101" label="Button" click="button1_clickHandler(event)"/>
</mx:Application>
 

Leave a Reply

Your email address will not be published. Required fields are marked *

 

 

 

Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.