Installation (Windows)

The Windows version of CrossBridge was compiled to run within the Cygwin environment. Cygwin is a Linux-like environment for Windows making it possible to port software running on POSIX systems (such as Linux, BSD, and Unix systems) to Windows. Cygwin is required to use CrossBridge on Windows. CrossBridge bundles a version of Cygwin that you can access by launching the run.bat file. Advanced users can use a separate Cygwin installation if desired.

Extract the contents of the ZIP file onto your hard drive. This can be extracted to anywhere on your hard drive, but this readme will assume it is located at C:\crossbridge\

The compiler may produce warnings about dropped arguments; these can safely be
ignored. Running the resulting binary will print the string "Hello World!" to
your console. By default the gcc and g++ compilers in the CrossBridge toolchain will
produce projector binaries. These are native executables that contain your
application compiled to ActionScript bytecode and a captive copy of the
ActionScript Virtual Machine (the virtual machine used in the Flash Runtime).
Executing this projector binary will run your program.

To target the Flash player we will need to tell gcc/g++ to produce a SWF file
instead of a projector binary. This can be done as follows:

This path contains replacements for the standard gcc/make toolchain which will
do the CrossBridge equivalent code transformations.

Note: Calling this command from a terminal will only update the PATH for the lifetime of that terminal window. To have this automatically set every time you launch a new terminal window consider adding the command to a .profile file.

Another way of setting the path is to pass it as a parameter to make. See the make file in the Example_BulletPhysicsLibrary example to see how this is done.

Documentation

Now that you have CrossBridge setup these resources and documentation should help you get started:

CrossBridge comes with a set of sample applications that demonstrate features of the SDK. You can find these examples in the samples folder. This page describes the features being demonstrated in more detail and includes links to the relevant sections of the reference guide for more information.

To interact with the Flash Runtime in your CrossBridge compiled code you will need to use the ActionScript API exposed by the Flash Player. This reference lists all of the available APIs in the latest version of the Flash Player.

For more information on how to interop between C/C++ and the Flash API see this section of the reference guide.

Supported Flash players

CrossBridge generated SWFs are supported by Flash player 11.0 and AIR 3.0 and higher. SWCs generated by CrossBridge are supported by Flex Builder 4.6 and Flex SDK 4.6 or higher. Running CrossBridge generated SWFs in Flash player 10.x is not guaranteed to work and Adobe does not provide any support for that use-case.

Support for concurrency is only available in Flash 11.5 and higher when targeting SWF version 18. Use of other player APIs within inline-asm statements or via the Flash++ interop mechanism might also require a specific version of the Flash player. Performing runtime checks for available APIs will allow you to produce content that supports older Flash player versions with reduced functionality whilst being able to use the latest APIs when running in a recent version of the Flash player.