Notice: Function WP_Scripts::add was called incorrectly. The script with the handle "markdown-renderer" was enqueued with dependencies that are not registered: mermaid-js, prism-core. Please see Debugging in WordPress for more information. (This message was added in version 6.9.1.) in /home/dataadl/www/wp-includes/functions.php on line 6131

Refresh/Reload Flex App using JavaScript.

When you search to accomplish a task in Flex, and unable to find a solution. Think about javacript, most of the Javascript code will work in Flex, because javascript is the backbone of a Flex Application.

I had a requirement were i wanted to refresh/reload the Flex App , but i couldn’t do it in Flex and finally i realized that it may be possible using JavaScript through some internet referance i done it, cool my application got reloaded/refreshed.

Then decided to post it in Blog, because it may help out other Flex lovers.

Sample Code:
< ?xml version="1.0″ encoding="utf-8″?>
<mx :Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx :Button x="83″ y="196″ label="Button" click="reloadpage(event)"/>
</mx><mx :Script>
< ![CDATA[
private function reloadpage(event:MouseEvent):void
{
var ref:URLRequest = new URLRequest("javascript:location.reload(true)");
navigateToURL(ref, "_self");
}
]]>
</mx>

 


Discover more from C4: Container, Code, Cloud & Context

Subscribe to get the latest posts sent to your email.

Leave a comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.