Forum: Ruby Using win32ole to access the Flash ExternalInterface API?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Cc7eee0b959bc8031e6549a34fa1a711?d=identicon&s=25 Peter Nicolai Motzfeldt (tcb)
on 2007-02-28 12:48

I am working on a master thesis at Norwegian University of Science and
Technology, and I am trying to create a open source framework for
functional testing of Flex applications. And I want to do it in Ruby.

I am playing with the ExternalInterface API for Flash applications. With
this API it is possible to define methods, which will be visible through

This is shown in the example in the link below

This example uses C#, but I was thinking it should be possible with the
use of win32ole.

I am able to reach the movie object with win32ole, but I don't know how
to be able to call the methods created in the Flex application.

I am not that familiar with the win32ole, but can it work as a activex
control, or do I need something else?

Thank you for any advice!
1352b89940b34932853a35e2be777b53?d=identicon&s=25 (Guest)
on 2007-03-01 16:00
(Received via mailing list)
It's very simple really, you just instantiate a Ruby object to the
WIN32OLE interface of the native API, then call the native API's
methods as methods of the object you've just created.  Example:

  require 'win32ole'

  param1 = 0
  param2 = 'test'

  interface ='registered_OLE_API_here')
  interface.NativeMethodReqIntAndString(param1, param2)

  nativeObj = interface.ReturnSomeObject


This is a trivial example, but shows how you can instantiate and use
native objects using the win32ole interface, and how you can pass them
back to the native API as method parameters.

Hope this helps,
This topic is locked and can not be replied to.