简体   繁体   English

动作和Flex

[英]Actionscript and Flex

I'm trying to retrieve the network adaptater in use. 我正在尝试检索使用中的网络适配器。

Using this code 使用此代码

http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b8f6c0-7ffe.html#WSb2ba3b1aad8a27b04a6701d612482d399e5-8000 http://help.adobe.com/zh_CN/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b8f6c0-7ffe.html#WSb2ba3b1aad8a27b04a6701d612482d399e5-8000

But for any reason it can find the "import flash.net.InterfaceAddress" "import flash.net" library. 但是由于任何原因,它都可以找到“ import flash.net.InterfaceAddress”“ import flash.net”库。

I dont know why. 我不知道为什么。

  • Language Version: ActionScript 3.0 语言版本:ActionScript 3.0
  • Runtime Versions: AIR 2 运行时版本:AIR 2

see screen errors 查看屏幕错误


I'm using a very recent version of Flash Builder (the latest). 我使用的是Flash Builder的最新版本(最新版本)。

Air SDK came with it. Air SDK附带了它。

I found this "airglobal.swc" file at three places. 我在三个地方找到了这个“ airglobal.swc”文件。

=> C:\\Program Files\\Adobe\\Adobe Flash Builder 4.7 (64 Bit)\\eclipse\\plugins\\com.adobe.flash.compiler_4.7.0.349722\\AIRSDK\\frameworks\\libs\\air => C:\\Program Files\\Adobe\\Adobe Flash Builder 4.7 (64 Bit)\\sdks\\3.6.0\\frameworks\\libs\\air => C:\\Program Files\\Adobe\\Adobe Flash Builder 4.7 (64 Bit)\\sdks\\4.6.0\\frameworks\\libs\\air => C:\\ Program Files \\ Adob​​e \\ Adob​​e Flash Builder 4.7(64位)\\ eclipse \\ plugins \\ com.adobe.flash.compiler_4.7.0.349722 \\ AIRSDK \\ frameworks \\ libs \\ air => C:\\ Program Files \\ Adobe \\ Adob​​e Flash Builder 4.7(64位)\\ sdks \\ 3.6.0 \\ frameworks \\ libs \\ air => C:\\ Program Files \\ Adob​​e \\ Adob​​e Flash Builder 4.7(64位)\\ sdks \\ 4.6.0 \\ frameworks \\ libs \\空气

My project is a simple "action script project", not a flex one. 我的项目是一个简单的“动作脚本项目”,而不是flex。 But I also tried to create a flex project and encountered the same problem 但是我也尝试创建一个flex项目并遇到了同样的问题

That package isn't a native flash builder/air library. 该软件包不是本机Flash Builder /空气库。 Its a flash library but only avail in flash, not flash builder. 它是一个Flash库,但仅在Flash中可用,而在Flash Builder中不可用。

To import it into flash builder: 要将其导入到Flash Builder中:

Open Flash, on frame one write this action script: 打开Flash,在第一帧上编写以下动作脚本:

import flash.net.*

var forceImport: InterfaceAddress
  1. Goto export properties of flash and choose the SWC option. 转到Flash的导出属性,然后选择SWC选项。
  2. Copy SWC file into your flash builder project. 将SWC文件复制到Flash Builder项目中。
  3. Goto properties of your project choose "flex build path" and then "Add swc". 项目的转到属性选择“弹性构建路径”,然后选择“添加swc”。
  4. Point to your SWC. 指向您的SWC。

Now flash builder has access to that flash package. 现在,Flash Builder可以访问该Flash软件包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM