buildSWC.bat
my-manifest.xml- @echo on
- if NOT (%SDKDIR%)==() goto :checkCompc
- REM regedit /e fwpath.txt "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall/Adobe Flex Builder 2"
- REM for /f " tokens=2 delims==" %%f in ('find "FrameworkPath" fwpath.txt') do set SDKDIR=%%f
- REM del fwpath.txt
- if (%SDKDIR%)==() set SDKDIR="D:/Flex_Build_SDK"
- :checkCompc
- if exist "%SDKDIR:"=%/bin/compc.exe" goto :build
- echo Error: Could not find compc.exe, please install FlexBuilder or set SDKDIR environment variable to flex framework directory.
- exit /b
- :build
- "%SDKDIR:"=%/bin/compc.exe" -source-path src -output bin/logic.swc -include-namespaces=http://www.sybase.com/2008/jackoo -namespace http://www.sybase.com/2008/jackoo my-manifest.xml
- <?xml version="1.0"?>
- <!--
- ADOBE SYSTEMS INCORPORATED
- Copyright 2005-2007 Adobe Systems Incorporated
- All Rights Reserved.
- NOTICE: Adobe permits you to use, modify, and distribute this file
- in accordance with the terms of the license agreement accompanying it.
- -->
- <componentPackage>
- <!-- airframework -->
- <component id="logic" class="com.jackoo.Logic"/>
- </componentPackage>
src/com/jackoo/Logic.as
bin/Logic.swc
How to use generate Logic.swc
1. import Logic.swc to project
2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:logic="http://www.sybase.com/2008/jackoo" ...