flex: Communicating between ActionScript and JavaScript in a desktop application - actionscript-3

I'm using adobe builder 4.7, I want to run my html in flex desktop application, and I need to call some native flex api ( like File ) in my html javascript, so how to let them communicate? All the docs I found is to insert flex into html, not reverse.
The ExternalInterface is used in a flex web application

Hope the following link will help you:-
http://blog.everythingflex.com/2008/02/25/air-actionscript-javascript-bridge/

Related

How can I incorporate Scala program into web page

How can I embed a scala project into a website ? I did a visual with swing but I have no idea on how to make it inside my web page and have button, textfield, etc functional.
Any ideas ?
Try to package your scala program into a jar and use any supported library from the webpage to call the jar(ex: subprocess/Jython library for Django)

Use Openlayers in NativeScript Project

I am new to NativeScript and have knowledge of Angular. I am trying to insert a map to my mobile app with Openlayers. In Angular, in other words HTML, we can create a div and let openlayer draw the map on it. However, I can't find any equivalent to div in NativeScript, or XML. How should I overcome this?
Unlike Cordova / PhoneGap, NativeScript does not run within WebView. It has a JavaScript runtime which allows you to reuse your web skills not web components. Anything that depends on Browser / HTML Dom can't be used within NativeScript as the UI is purely native here.
If you still want to use Openlayers, you should host a WebView in your application and load your HTML / JavaScript there which can manipulate the map for you. You may also use nativescript-webview-interface to communicate with your NativeScript runtime from your web app running within the WebView.

Change application direction using Phonegap or SAPUI5

I am not able to change my app direction using (html dir="ltr"), after android device language has been changed to arabic. How can I change my app direction to ltr using phonegap or sapui5?
That is kind of not possible,
Reason : Because if you do that then you would need to build entire android app again and then run it in device.
Possible Solution
You can use navigator.language to detect device language and based on that you can load different CSS and HTML.
To change application direction, sapui5 provides script tag attributes for configuration. Just include sap-ui-rtl="false" and sap-ui-language="ar" attributes in your script something like,
<script src="resources/sap-ui-core-all.js" data-sap-ui-rtl="false" data-sap-ui-language="ar"></script>

Creating an Ipad app with static html,css & javascript

Let me explain the scenario first.
I have a simple static dashboard html page with 5 simple charts created with HTML5, CSS
and javascript.
It renders data from a static Json to display the charts.
Its is not online and running in my local system.
There are no back end code which connects to a database.
Now I want to convert this to an Ipad app where I can see the dasboard page without out internet connection.
Kindly provide me a best way to do this.
Regards,
Shanmugam
You can use Apache Cordova (or phonegap) for building native web applications for all major platforms using HTML 5 , CSS and JavaScript.
You can refer to this Blog post on how to easily port existing HTML5 based application to iOS and Android.
Additionally you can also check this link for some more insights.

Adobe AIR and PDF framework

Is there any way to handle PDF in Adobe AIR?
I don't want just to open it, I need to programmatically use it. Example: extracting pages, rotate pages, add gfx elements to a page, read annotations. I would need a complete framework to handle PDF in AIR.
Thanks
Try PurePDF, it is a port of the famous iText java and C# library
That's the closest you will get to be able to do in ActionScript what you describe above.
Cheers