TracNav
AS2 Standard...
- Downloads
- Installation
- Release Notes
- View Source
- Discussion
- Unit Tests
Project Owner...
- Pedr Browne
Demos...
FlashLite...
- Balloonatroid
PureMVC Standard for AS2
Installation
Download the latest version of the Framework distribution and unzip to a directory on your system, such as:
C:/development
This will create a folder like this:
C:/development/PureMVC_AS2_X_Y
Where X_Y is the framework version number.
You will find:
- The source code: PureMVC_AS2_X_Y/org/puremvc/as2/...
To add the PureMVC Library to your Flex project's build path
From the FlexBuilder/Eclipse menu do:
Project -> Properties -> Flex Build Path -> Source Path -> Add Folder
Browse and select:
C:/development/PureMVC_AS2_X_Y/
PureMVC-enabling your Flash CS3 Installation
There are three ways you may go about adding PureMVC to your current Flash installation:
- Method A - Copy the PureMVC package to the Flash Installation's Classes folder
- Method B - Add the PureMVC source folder to your classpath in Preferences
- Method C - Add the PureMVC source folder to your classpath per project
Methods A & B ensure that the PureMVC source code will always be available, and are the recommended way. Which you choose is up to you.
Method C will only make the code available to the projects you choose. It will be more work, while A or B add no overhead to your projects if you don't import and use any of the classes.
Regardless of the method you choose, be sure you are only adding the source code folder to your class path. If the PureMVC_AS2_X_Y.swc file is in the classpath, Flash will complain of odd things and most likely not work, since the swc is in Flex format and not readable by Flash yet. Research has been done to try and compile a version that is compatible with both Flex and Flash, but it has not yet been succesful.
METHOD A: COPY PureMVC PACKAGE TO FLASH INSTALLATION'S CLASSES FOLDER
Copy the PureMVC_AS2_X_Y/org folder and everything in it to your Flash installation's Classes folder. This folder is located at ${AppConfig}/ActionScript 2.0/Classes
${AppConfig} is the language specific Configuration directory for your Flash installation.
For instance, if you installed Flash CS3 at its default location on a Windows machine, then your ${AppConfig} = C:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\
You would copy
from:
PureMVC_AS2_X_Y/src/*
to:
C:/Program Files/Adobe/Adobe Flash CS3/en/Configuration/ActionScript 2.0/Classes
yielding:
${AppConfig}/ActionScript 2.0/Classes/org/puremvc/as2/*
METHOD B: ADD THE PureMVC SOURCE CODE FOLDER TO YOUR CLASSPATH IN PREFERENCES
In the Flash IDE, go to:
Edit -> Preferences -> ActionScript 2.0 Settings
and add the PureMVC_AS2_X_Y/src folder to your classpath by clicking '+' icon to add a classpath, select it, then click the target icon to choose the folder.
METHOD C: ADD THE PureMVC SOURCE CODE FOLDER TO YOUR CLASSPATH ON A PER PROJECT BASIS
In the Flash IDE, open the your FLA or Project, and go to:
Edit -> Publish Settings -> ActionScript 2.0 Settings
and add the PureMVC_AS2_X_Y/src folder to your classpath by clicking '+' icon to add a classpath, select it, then click the target icon to choose the folder.
