Adobe Appilcation Extension Project 自定义项目工程

第一步:新建一个Adobe Appilcation Extension Project 项目工程





第二步:默认勾选Illustrator和Adobe CSXS SWC点击完成 建好一个空工程。




第三步: 下面开始加控件,加代码

<?xml version="1.0" encoding="utf-8"?> 
<csxs:CSExtension xmlns:fx=" http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:csxs="com.adobe.csxs.core.*" applicationComplete="appComplete()"> 
<csxs:layout> 
<s:BasicLayout/> 
</csxs:layout> 
<fx:Script> 
<![CDATA[ 

import com.adobe.csxs.core.CSInterface; 


[Bindable] 
private var hostName:String = HostObject.mainExtension; 


public function appComplete():void{ 
CSInterface.instance.autoThemeColorChange = true; 


protected function button1_clickHandler(event:MouseEvent):void 

// TODO Auto-generated method stub 



protected function button2_clickHandler(event:MouseEvent):void 

// TODO Auto-generated method stub 



protected function button3_clickHandler(event:MouseEvent):void 

// TODO Auto-generated method stub 



protected function button4_clickHandler(event:MouseEvent):void 

// TODO Auto-generated method stub 



]]> 
</fx:Script> 

<s:VGroup width="100%" height="100%" horizontalAlign="center" horizontalCenter="0" 
verticalAlign="middle" verticalCenter="0"> 
<s:Panel width="250" height="200" title="UI面板"> 
<s:Button height="22" label="Run AI code" click="UILaodengNo1Illustrator.run()" 
enabled="{hostName.indexOf('illustrator') > -1}" horizontalCenter="-5" 
verticalCenter="61"/> 
<s:HGroup width="120" height="50" horizontalAlign="center" horizontalCenter="-24" 
verticalAlign="middle" verticalCenter="-52"> 
<s:Button width="50" height="50" label="1" click="button3_clickHandler(event)" 
icon="@Embed('assets/measure.png')"/> 
<s:Button width="50" height="50" label="2" click="button4_clickHandler(event)" 
icon="@Embed('assets/measure(1).png')" skinClass="spark.skins.spark.ButtonSkin"/> 
</s:HGroup> 
<s:HGroup width="123" height="60" horizontalAlign="center" horizontalCenter="-25" 
verticalAlign="middle" verticalCenter="8"> 
<s:Button width="50" height="50" label="3" click="button3_clickHandler(event)" 
icon="@Embed('assets/more.png')"/> 
<s:Button width="50" height="50" label="4" click="button4_clickHandler(event)" 
icon="@Embed('assets/more.png')" skinClass="spark.skins.spark.ButtonSkin"/> 
</s:HGroup> 
</s:Panel> 
</s:VGroup> 
</csxs:CSExtension>

设计是这样的:


第四步:右击项目点击“运行方式”  勾选平台Ilustrator CS6 确认。


结果运行时这样的(⊙o⊙)… 可能一AI深灰色渲染有关。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值