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 »

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 »

01  Mar
First GPS data

gps_route

Well, my GPS device is coming along.  I’m getting my first batch of data off the board that is close to usable. I walked it to the end of my block and back at night with all the lights blinking and flashing on the board.  The neighbors probably think I’m a terrorist building a bomb or something.  Looks like I need to add a bit of code to ignore points whose accuracy is in question.  The start of my walk was all over the place (in my neighbors living room if you believe the device), but by the end, it seemed to hone in and nail down my position pretty well.

I’m targeting this device to output GPX data which should be an easily readable XML format for Flex/AIR developers to use.  Right now, the screenshot you’re viewing is from Google Earth which also accepts GPX data files.

Posted by Andrew, filed under AIR, Flex, GPS. Date: March 1, 2009, 10:13 pm | No 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 »

wcap_small

There currently aren’t any options for true multi-threading in Flex or AIR. Apparently, Adobe thinks that every app that exists is nothing more than a webapp that needs one or two desktop capabilities. Projects such as Merapi prove that developers greatly desire much more power than is currently being given to us. For my own application WCAP, I need to do some pretty heavy-duty computations and matrix manipulations to analyze a schematic. Right now, I’m simulating threading by breaking up the calculations into chunks and updating the UI with a progress bar between each chunk. This always uses only one of my two processor cores and ends up taking a significant amount of time because my software is crippled. I don’t use Merapi because it’s not easily deployable/updatable along with my AIR app.

It’s also not feasible for me to put the calculation logic on a server and have it calculate remotely. This software needs to be able to run out in the field or at the job site where a net connection may not be available.

I made a video (click the picture above) of my software just so folks can get a good understanding of why this is really needed and not just a want.

Posted by Andrew, filed under AIR, Flex. Date: January 15, 2009, 9:24 am | 4 Comments »

Last April, I had a blog post about how to use both the Native and Flex DragManagers at the same time by monkey-patching an AIR 1.0 application. I’ve since updated the code for AIR 1.5. This file contains the code to add to your project in order to monkey-patch the necessary DragManager-related classes. In no way do I make any claims about this code, support it, etc, etc… don’t sue me.

DualDragManagers.zip

Posted by Andrew, filed under AIR, Flex, MonkeyPatch. Date: January 10, 2009, 10:11 am | No Comments »

WCAP On Gentoo-64

WCAP On Gentoo-64

Being an uber-geek, running a standard linux distro just isn’t enough excitement for me. For my business’s server, I run Gentoo linux. I use it mostly for subversion, but I also wanted to try out some AIR apps on it. The first hurdle to overcome was that AIR is a 32-bit app and my Gentoo install is 64-bit. I needed to emerge two libraries to get the necessary 32-bit versions of them.

emerge -av emul-linux-x86-baselibs emul-linux-x86-gtklibs

I tried running the standard AIR installer for linux, but got stuck when it said that I could only install on debian based systems like Ubuntu.
To get around this, download the AIR-SDK: http://www.adobe.com/products/air/tools/sdk/

I untar’d it to AIR-SDK in my home folder.

mkdir ~/AIR-SDK<br />
cd ~/AIR-SDK<br />
tar -xvjf ~/air_1.5_sdk.tbz2

Next, I downloaded WCAP Pro and unzipped it to AIR-APPS/wcap

mkdir ~/AIR-APPS/wcap<br />
unzip WCAPPro.air -d ~/AIR-APPS/wcap

Finally, I created a desktop shortcut to run as the root user and setup my icon for it.

/home/westbam/AIR-SDK/bin/adl&nbsp;-nodebug&nbsp;/home/westbam/AIR-APPS/wcap/META-INF/AIR/application.xml&nbsp;/home/westbam/AIR-APPS/wcap/

I had tried to run it as a normal user, but the system would only work when I ran it as root. I’m not quite sure yet why it requires root access to work correctly.

Posted by Andrew, filed under AIR, Linux. Date: January 3, 2009, 12:14 pm | No Comments »

I haven’t posted a whole lot to this blog lately because my recent consulting has been focused on C++ and C# .NET work.  I’ve been working on updating to Phasor Professional to version 2.1.1.  Phasor Professional is a Microsoft Visual C++ app originally written in 1998.  Ten years later, and it’s still going strong.  The recent updates are a slight modification to calculating AM Radio tower impedances to meet the new FCC regulations that go into effect in February, 2009.

Along with this update, I’ve enhanced the software to use Nitro-LM for license management (I’ve believe I’ve been pirated all over Mexico and Brazil but I have no way of knowing).  I also added the ability to contact tech support directly from the software through the Nitro-LM API.

The most important enhancement, however was inspired by the AIR Update Framework.  My new AIR-based software WCAP uses the framework to keep my users up-to-date with all the latest patches, fixes, and enhancements.  I wanted that same level of functionality for my legacy C++ application.  I scoured the Internet and found AutoUpdate+ out of Australia.  Their software is an easy to use GUI application that builds a client updater executable.  When you call it from your software, it checks your server to see if updates are available.  The GUI also takes care of doing FTP uploads of updated software to your server in one seamless end-to-end process.  I first tried out their fully-functional demo and liked what it did for me.  I then contacted them to get a free license since they have a deal for single-person companies like myself.  After working with the software for another hour or so, I went ahead and purchased a license from them.  Their software worked so well that I couldn’t really justify paying nothing for it.  I like being paid for software I develop so I assume others do too.  If you have a need for this level of functionality for your own applications, check them out.

Posted by Andrew, filed under AIR, C++, WCAP. Date: December 27, 2008, 10:26 am | No Comments »

« Previous Entries