Skip to content
benbjohnson edited this page Apr 8, 2011 · 18 revisions

Overview

Melomel is an API for accessing ActionScript objects in the Flash virtual machine through external languages. It is currently only available for Ruby but it is actively being expanded to other languages.

The API was build to enable developers to perform full stack functional tests using the server side language of their choice. We like Cucumber but it also works well with RSpec or any other Ruby testing tool.

Getting Started

Here are a few links to help get you started using Melomel:

Questions & Support

If you need any help getting started, feel free to join the Melomel mailing list and ask a question. You can join by sending a blank e-mail to [email protected].

Installation

To install Melomel, include the compiled melomel-x.y.z.swc into your project. The x.y.z should be replace with your version number.

  $ mxmlc --include-library+=melomel-x.y.z.swc MyApp.mxml

If you're writing a Flex application, simply include the Melomel namespace and tag:

<mx:Application
  xmlns:mx="http://www.adobe.com/2006/mxml"
  xmlns:m="library://melomel/2010"
>
  <m:Melomel/>
</mx:Application>

Or if you're writing a Flex 4.x application:

<s:Application
  xmlns:fx="http://ns.adobe.com/mxml/2009"
  xmlns:s="library://ns.adobe.com/flex/spark"
  xmlns:m="library://melomel/2010"
>
  <fx:Declarations>
    <m:Melomel/>
  </fx:Declarations>
</s:Application>

If you're writing a pure ActionScript application, simply call Melomel.connect() once your application has loaded. No import is needed as Melomel is in the default package.

When you're ready to release to production, simply use the melomel-stub-x.y.z.swc to remove the Melomel functionality for security reasons.

Clone this wiki locally