On a project I’m working on, I need to have semi-transparent containers to hold controls over top of screen-filling bright and colorful background. While I’m not 100% satisfied with it, I think it will suffice for the time being.

I was originally going for an effect similar to the window borders in Windows 7 where the background image is blurred when viewed through the glass. I couldn’t find an easy way to do that effect in Flex 4. If you know of a way, please comment below.

Live Demo – Right-Click to View Source

Posted by Andrew, filed under Flex, as3. Date: July 31, 2010, 11:03 pm | 1 Comment »

I recently had an opportunity to give a talk at 360|Flex along with Randy Troppmann. Slides and code examples are posted below. Video of the session will come sometime in the unforeseen future as they have many hours of other sessions to post-process before getting to mine.

Presentation PDF (warning: large)

MileageBuddy (viewsrc enabled)

HeatmapExample (viewsrc enabled)

Test GPX file

Posted by Andrew, filed under 360 Flex, AIR, Data, Degrafa, Flex, GPS, as3. Date: March 11, 2010, 5:04 pm | No Comments »

dual_dragmanagers

The new Flex 3.4 SDK has been released. Since Adobe still hasn’t gotten around to fixing this bug, I’ve again taken it upon myself to release my MonkeyPatched code for Flex 3.4 that allows you to use the Flex DragManager along side the Native DragManager in an AIR app. You can grab the code from SVN from my google code site.

http://code.google.com/p/andrewwestberg/source/checkout

Posted by Andrew, filed under AIR, Flex, MonkeyPatch, as3. Date: August 28, 2009, 12:53 pm | No Comments »

oh_example

I’ve been using the ObjectHandles flex library project for quite some time. It’s used in the Nitro-LM Admin tool to give us resizeable horizontal menus.

In the new version of ObjectHandles2, we have the ability to use Sprites as the drag handles to resize and move objects around the screen. I was recently made a committer on the project and have added some functionality to allow Degrafa to be used to draw the handles and rotate them along with the object. Check out Example7 that highlights this new functionality.

ObjectHandles2Example View Source is enabled

Posted by Andrew, filed under Degrafa, Flex, as3. Date: August 25, 2009, 7:17 pm | 5 Comments »

Off and on, I’ve been working making the Flex DragManager work in AIR. I’ve been vocal in trying to get SDK-13983 fixed. This feature is really useful because you have no control over the DragProxy’s alpha value in AIR because it’s controlled by the operating system. If all operating systems defaulted to 0.5 alpha, all would be well, but OSX thinks that the drag proxy should be completely opaque and Windows thinks it should be 0.5.

The MonkeyPatch to fix this issue was posted to my Google code repository. Its only problem was that the mouse cursor for drag feedback disappeared when you were using a child window. I’ve added one small patch to UIComponent which fixes this issue. Grab the latest code if this is of interest to you. Let me know here if you have trouble with it.

http://code.google.com/p/andrewwestberg/

Posted by Andrew, filed under AIR, MonkeyPatch, as3. Date: March 16, 2009, 12:03 pm | 2 Comments »

If you want to use both the nice Flex Dragmanager in an AIR app, you need to use a monkeypatch to make it work. I’ve taken the code about as far as I can on my own, so I’d like to enlist my reader’s help.

What you can do:
1.) Vote on https://bugs.adobe.com/jira/browse/SDK-13983
2.) Figure out how the low-level DragManager code works (better than I can) and help work on the monkeypatched code at http://code.google.com/p/andrewwestberg/

What works:
1.) Using Flex dragmanager inside an AIR WindowedApplication.
2.) Using the AIR dragmanager in the same app.

What’s broken:
1.) Using the Flex Dragmanager inside mx:Window. The cursor disappears while dragging.
2.) Flex dragmanager between mx:Windows (not sure DragManager was ever designed for this)
3.) Other stuff I haven’t tested yet.

Posted by Andrew, filed under AIR, Flex, MonkeyPatch, as3. Date: February 2, 2009, 2:54 pm | No Comments »

If you’re reading this, you’re likely aware that Adobe has released ANT tasks for compiling SWFs, module SWFs, and SWCs. My application has lots of modules and also uses an ANT build, so naturally, I wanted to speed up compile times.

My development laptop has a dual-core CPU and I noticed that one core was unused while running my ANT script. In order to speed up my compile times, I simply added <parallel> tags around compiling my modules. My main swf needs to be compiled first because I need to use its link report for building the other modules. I also had to make sure to set the threadCount property to 2 so it wouldn’t overload my machine trying to compile all the modules at once.

<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="NitroAdminFlex"  basedir="." default="AIR">
<property name="version.major" value="6"/>
<property name="version.minor" value="0"/>
<property name="version.revision" value="0"/>
<property name="OPTIMIZE" value="true"/>
<property name="DEBUG" value="false"/>
<property name="FLEX_HOME" value="C:/Program Files/Adobe/Flex Builder 3 Plug-in/sdks/3.2.0"/>
<property name="flex.mxmlc" location="${FLEX_HOME}/bin/mxmlc.exe" />
<property name="src.dir" value="."/>
<property name="lib.dir" value="../libs"/>
<property name="out.dir" value="../bin-release"/>
<property name="jars.dir" value="../../jars-server"/>

    <taskdef name="nitrolm-encrypt" classname="com.simplifiedlogic.nitrolm.LMEncryptAsset" classpath="${jars.dir}/AssetEncrypterX.jar"/>
    <taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>

    <target name="clean" description="Clean the project">
        <delete dir="${out.dir}" failonerror="false"/>
    </target>

    <target name="init" description="initialize the project" depends="clean">
        <mkdir dir="${out.dir}"/>
        <copy todir="${out.dir}" includeemptydirs="false">
            <fileset dir="${basedir}">
                <exclude name="**/*.as"/>
                <exclude name="**/*.mxml"/>
                <exclude name="**/*.xml"/>
                <exclude name="**/*.css"/>
                <exclude name="**/*.properties"/>
                <exclude name="**/*.ser"/>
                <exclude name="**/*.vser"/>
                <exclude name="**/*.pfx"/>
                <exclude name="**/*.txt"/>
                <exclude name="**/*.cmd"/>
                <include name="**/*"/>
            </fileset>
        </copy>
    </target>

    <target name="compile.release" description="Compile swf modules and main swf" depends="init">
        <!-- compile main SWF -->
        <mxmlc file="NitroAdminFlex.mxml" output="${out.dir}/NitroAdminFlex.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            link-report="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>
<parallel threadCount="2">
        <!-- compile modules -->
        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/nav/MainWindowNavigator.mxml" output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/nav/MainWindowNavigator.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/DefineVariablesModule.mxml" output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/DefineVariablesModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/NotificationsModule.mxml" output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/NotificationsModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/MessagingModule.mxml" output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/MessagingModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ManageLicensesModule.mxml" output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ManageLicensesModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/UsersModule.mxml" output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/UsersModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ManageVariablesModule.mxml" output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ManageVariablesModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowUnconfirmedModule.mxml" output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowUnconfirmedModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowPaidToModule.mxml" output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowPaidToModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowDemosModule.mxml" output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowDemosModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowLicensesModule.mxml" output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowLicensesModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowMsgHistModule.mxml" output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowMsgHistModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowSupportModule.mxml" output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowSupportModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowUserFilesModule.mxml" output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowUserFilesModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/AddEditProductModule.mxml" output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/AddEditProductModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowReportBuilderModule.mxml"
            output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowReportBuilderModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/AddEditCompanyModule.mxml"
            output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/AddEditCompanyModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowExternalVariablesReportModule.mxml"
            output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowExternalVariablesReportModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/PoolPropertiesModule.mxml"
            output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/PoolPropertiesModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>

        <mxmlc file="com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ManageAdminToolModule.mxml"
            output="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ManageAdminToolModule.swf"
            debug="${DEBUG}"
            optimize="${OPTIMIZE}"
            load-externs="${out.dir}/report.xml"
            locale="en_US"
            allow-source-path-overlap="true"
            configname="air">

            <compiler.context-root>/NitroAdminFlex</compiler.context-root>
            <source-path path-element="${src.dir}"/>
            <source-path path-element="locale/{locale}"/>
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                <include name="{locale}"/>
            </library-path>
<library-path dir="${lib.dir}" append="true">
                <include name="*.swc"/>
            </library-path>
<library-path dir="../../FlexUtilLibrary/bin" append="true">
                <include name="*.swc"/>
            </library-path>
        </mxmlc>
        </parallel>
    </target>

    <target name="encrypt" description="Encrypt the various swf modules" depends="compile.release">
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/DefineVariablesModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/NotificationsModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/nav/MainWindowNavigator.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/MessagingModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ManageLicensesModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/UsersModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ManageVariablesModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowUnconfirmedModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowPaidToModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowDemosModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowLicensesModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowMsgHistModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowSupportModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowUserFilesModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/AddEditProductModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowReportBuilderModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/AddEditCompanyModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ShowExternalVariablesReportModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/PoolPropertiesModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
        <nitrolm-encrypt
            filename="${out.dir}/com/simplifiedlogic/nitroadmin/cairngorm/view/screens/ManageAdminToolModule.swf"
            product="YOXxycCnrspZhEVOnhYE"
            library="LKX_BYkNwSH4yZJosmHEXooO"
            keydir="."/>
    </target>

    <target name="AIR" description="Create the AIR package for our app" depends="encrypt">
        <exec executable="${FLEX_HOME}/bin/adt.bat" failonerror="true">
            <arg line="-package"/>
            <arg line="-storetype pkcs12"/>
            <arg line="-keystore ${src.dir}/thawte_codesigning.pfx"/>
            <arg line="-storepass 5T00P1d"/>
            <arg line="${out.dir}/NitroAdmin.air"/>
            <arg line="${src.dir}/NitroAdminFlex-app.xml"/>
            <arg line="-C ${out.dir} NitroAdminFlex.swf"/>
            <arg line="-C ${out.dir} assets*"/>
            <arg line="-C ${out.dir} com*"/>
            <arg line="-C ${out.dir} org*"/>
        </exec>
    </target>
</project>

Posted by Andrew, filed under AIR, Flex, as3. Date: January 23, 2009, 4:19 pm | No Comments »

23  Aug
360|Flex wrap-up

The 360|Flex event in San Jose was a success in my book.  I manned the Simplified Logic booth most of the time, but I did find some time to go to some great sessions.  I learned many tips and tricks that I could apply to my own development efforts.

My session on Encrypting Flex was fairly well attended.  There were lots of good questions from the audience.  I probably could have done a better job preparing for my talk, but I’ll wait until the comments come back from the surveys to flagellate myself over that too much.

Without further ado, here are the materials from my presentation.  The audio will have to wait until my presentation gets uploaded to the Adobe Media Player RSS Feed.

Encrypting Flex, Protecting Revenue, and Making Cash (PDF)
flexembeddingexample1 (zip)
flexencryptionexample1 (zip)
flexencryptionexample2 (zip)
flexencryptionexample3 (zip)

Posted by Andrew, filed under 360 Flex, AIR, Flex, as3, security. Date: August 23, 2008, 8:16 pm | No Comments »

I’m working on some new types of SWF file encryption to demonstrate at 360 Flex San Jose.  If you’ve read my Inside RIA articles, you know that the main technique used by NitroLM to encrypt swf files is to create a wrapper application and load/decrypt the real application using a SWFLoader.  The problem with this technique is that it’s a little bit kludgy and adds deployment complexity.  It also has some difficulty in AIR in that if you wrap an <mx:Application> inside an AIR app, you won’t be able use some of the Native AIR functionality.

I’ve been dilligently working on a new technique for encrypting modular applications.  Basically, you’ll write your flex or AIR app as you normally would and break up functionality into modules loaded by <mx:ModuleLoader>.  You could also put pretty much all of your code in a single module if you wanted to.  Then, when you’re ready to deploy, just comment out the <mx:ModuleLoader> tags and replace them with <nitrolm:EncryptedModuleLoader> tags.

There’s a few other steps including encrypting the module SWFs with an AIR application called AssetEncrypter, but the process is much more straightforward than the wrapper technique.  It’s also much easier for the developer to code because they don’t have to deal with the keys and decryption themselves.  All of the complex functionality has been done for you in the <nitrolm:EncryptedModuleLoader>

Posted by Andrew, filed under 360 Flex, AIR, Flex, as3, encryption, security. Date: June 4, 2008, 11:38 am | No Comments »

Here are my 3 articles for InsideRIA on Encryption in Flex applications.

Encryption in Flex Applications 1 – Simulate EncryptedLocalStore

Encryption in Flex Applications 2 – SWC AS3 Library Encryption

Encryption in Flex Applications 3 – NitroLM SWF Encryption

Posted by Andrew, filed under AIR, Flex, as3, encryption, security. Date: April 4, 2008, 12:25 pm | No Comments »

« Previous Entries