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
419 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying 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

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…
Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Suggested Courses

734 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