Windows COM Basics - Utilizing Windows DLLs from ActionScript

mProjector allows ActionScript to instantiate external COM objects. The external object’s methods and properties can be accessed through ActionScript as if they were native ActionScript functions.

COM Beep - COM Object Basics

This example shows you how to register and utilize a custom COM object.

The function mApplication.registerCOMServer(path) registers your COM Object with Windows so it can used by mProjector and other COM savy applications.The mApplication.createObject(comserver.comclass) method creates an ActionScript object containing the COM class. After instantiating the class you can call it's functions and acces simple data types via ActionScript.

Beep.dll is a COM object that publishes two functions: beep (freq. in Hz, duration in milliseconds) and doubleBeep(). This example steps through instantiating the class and making Flash beep.

You can download this sample, "COM Beep", from the mProjector Samples page -- http://www.screentime.com/software/mprojector/flas.html#COMBeep.