Solved

how to call a Active X control from flex. i heard it can be done with Embedd tag is that true.?

Posted on 2009-05-07
3
420 Views
Last Modified: 2012-05-06
Hi i am new to Flex. i have a requirement where i need to call an Active X control component from flex.
how is it possible to call ? can i have a sample code and possible examples which demonstrate it.?
0
Comment
Question by:kotlapraveen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 10

Expert Comment

by:mplord
ID: 24332126
Assuming the ActiveX control is embedded in your web page?

Mock it up using Javascript first. Anything you can do using Javascript in the web page to talk to the ActiveX control can be extended to be called from Flex easily through ExternalInterface.

If you can provide a Javascript example, I can provide a Flex example to make the bridge.
0
 

Author Comment

by:kotlapraveen
ID: 24333575
Here is my sample java script code which creates the folder in c directory with the help of active X control

<script type="text/javascript">
     var fso = new ActiveXObject("Scripting.FileSystemObject");
     var a = fso.CreateFolder("c:\\new folder");
</script>
0
 
LVL 10

Accepted Solution

by:
mplord earned 500 total points
ID: 24336744
First turn this into a Javascript function:

<script type="text/javascript">
function createFolder(folder)
{
     var fso = new ActiveXObject("Scripting.FileSystemObject");
     var a = fso.CreateFolder(folder);
}
</script>

From Flex:

                  import flash.external.ExternalInterface;

                  ...

                  if ( ExternalInterface.available )
                  {
                        ExternalInterface.call("createFolder", "c:\\new folder");
                  }
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface   In the first 100 days of the Macintosh release in January 1984, Apple sold 72,000 of the computers. Relatively cheap, easy-to-use personal computer with a graphical operating system. I've never seen this model. I did see this one:   …
CocoaPods is the best way to manage library dependencies in iOS and OS X projects. By using cocoa pods there is no need of downloading the code from github and copying to your project. There are plenty of open source libraries now available with C…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question