header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Jason
Points:0
Posts:0
Answered

7/8/2010 8:40:52 AM

Title: Refresh a page


How to refresh a page in Flex inside the program by clicking a button?Please Help
Thankyou....



1
Inder
Points: 2980
Posts:0
7/8/2010 9:31:56 AM



use the externalInterface to call a javascript function inside the html page to refresh the page.

2
Rayan
Points: 700
Posts:0
Accepted Answer
7/8/2010 10:20:20 AM



here is the code sample to refresh the html page from flex application using actionscript 3. we are using here navigateToURL to execute java script from within the flex



<?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[
			function init(){
			}
			protected function button1_clickHandler(event:MouseEvent):void
			{
				navigateToURL(new URLRequest("javascript:location.reload(true);"), "_self");
			}
		]]>
	</mx:Script>
	<mx:Button x="187" y="101" label="Button" click="button1_clickHandler(event)"/>
</mx:Application>



Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 8+7 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions