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
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
417 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Suggested Solutions

Title # Comments Views Activity
Objective C Mac Phonebook to CSV 4 50
Apple iPhone Apps 3 461
Objective C property attributes 1 90
Video Tutorial for Cocoa and Swift 3 105
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 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