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
414 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
  • 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now