How to build SWC

buildSWC.bat


  1. @echo on
  2. if NOT (%SDKDIR%)==() goto :checkCompc
  3. REM regedit /e fwpath.txt "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall/Adobe Flex Builder 2"
  4. REM for /f " tokens=2 delims==" %%f  in ('find "FrameworkPath" fwpath.txt'do set SDKDIR=%%f
  5. REM del fwpath.txt
  6. if (%SDKDIR%)==() set SDKDIR="D:/Flex_Build_SDK"
  7. :checkCompc
  8. if exist "%SDKDIR:"=%/bin/compc.exe" goto :build
  9. echo Error: Could not find compc.exe, please install FlexBuilder or set SDKDIR environment variable to flex framework directory.
  10. exit /b
  11. :build
  12. "%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 
my-manifest.xml
  1. <?xml version="1.0"?>
  2. <!--
  3.     ADOBE SYSTEMS INCORPORATED
  4.     Copyright 2005-2007 Adobe Systems Incorporated
  5.     All Rights Reserved.
  6.     NOTICE: Adobe permits you to use, modify, and distribute this file
  7.     in accordance with the terms of the license agreement accompanying it.
  8. -->
  9. <componentPackage>
  10.     <!-- airframework -->
  11.     <component id="logic" class="com.jackoo.Logic"/>
  12.     
  13. </componentPackage>
Source file structure
    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" ...



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值