How to build and use a Flash DLL

本文介绍了如何构建和使用Flash DLL。首先通过创建一个简单的ActionScript项目并包含所需的库文件来构建DLL,然后加载并使用该DLL。文章还提供了一个实际的例子供读者参考。

As flash dll technic is widely used from AS2 time, now AS3 time, we use it widely too, we don’t like RSL since it can’t controlled by pure AS code.
Here a quick introduction for how to build and use a flash dll:

1. Build a Flash DLL
For a library project, such as AsWing, build it’s DLL is very simple: Create a ActionScript Project with only one simplest class:

class AsWingDLL extends Sprite{
//do nothing
}
And add a compiler argument for your flex compiler : -include-libraries path to the AsWing.swc , then build this project, the output swf is a regular flash DLL now.
Note: The AsWingDLL class is the entry class, it is just for make loader’s onComplete/onInit event will be fired, then compiler argument -include-libraries is to force all the classes in AsWing.swc will be compiled into the output swf.

For a ActionScript Project, the output swf is already a DLL, you just should take care to know what classes were compiled into the swf.

Then:

2. Use a Flash DLL
Well, then, how to use a Flash DLL, in essence, Flash DLL is just like a file that contains compiled classes, so generally, we load it first, the classes is available to use when it is load completed.

You can check this example: www.flashdll.org

Note: The convenience is that you can use the classes and with -external compiler argument to build your main project, above example shows that you can use AsWing in that application, but you don’t need to compile AsWing classes into the main swf, you can load AsWingDLL separately first, and then execute your code which used AsWing. It will runs well.

And, if you have more than one FLL, make sure your DLL’s load order, the most based DLL should load first.

For complex use, you can read the document of Loader and LoaderContext and especially the ApplicationDomain .

Tags: DLL

内容概要:本文围绕“基于超局部模型与自抗扰ESO观测器的无模型预测电流控制改进策略”展开研究,提出一种结合超局部模型(ULM)与扩张状态观测器(ESO)的无模型预测电流控制(MFPCC)改进方法,旨在提升永磁同步电机(PMSM)电流环的动态响应性能与抗干扰能力。该策略利用超局部模型对系统行为进行局部逼近,避免依赖精确数学模型,同时引入自抗扰控制中的ESO实时观测并补偿系统内外部扰动,有效抑制参数摄动、负载变化及模型不确定性带来的影响。研究通过Simulink搭建完整的控制系统仿真模型,对传统MFPCC与所提改进策略进行对比分析,验证了新方法在电流跟踪精度、响应速度和鲁棒性方面的优越性。; 适合人群:具备电机控制、现代控制理论及Simulink仿真基础的电气工程、自动化及相关专业的研究生、科研人员及工程技术人员。; 使用场景及目标:①用于高性能电机驱动系统中电流环控制器的设计与优化;②为无模型控制与自抗扰控制的融合应用提供技术参考;③支撑相关课题的仿真验证、论文复现与创新方法研究。; 阅读建议:建议读者结合Simulink仿真模型深入理解控制结构与参数整定过程,重点关注ESO的观测性能与扰动补偿机制,并可通过改变负载条件、参数偏差等工况进行鲁棒性测试,进一步掌握该改进策略的核心优势与适用边界。
内容概要:本文围绕Scratch图形化编程平台,详细阐述了《人体感应灯光系统》这一贴近生活的AI科创作品的设计与教学应用。通过模拟真实智能家居中人体感应灯的工作原理,利用Scratch的侦测、逻辑判断、亮度特效调节等功能,实现了人物靠近自动亮灯、延时熄灭及环境亮度自适应等仿真功能。文章系统拆解了从场景搭建、核心逻辑设计、分层编程实现到调试优化的完整开发流程,并提供了基础版与进阶版可直接导入的源码,支持零基础快速上手与高阶创新拓展。同时构建了“基础—进阶—高阶”三层阶梯式教学体系,适配常规课堂、创客社团与赛事培优等多元教学场景,推动中小学AI教育的生活化、实践化与创新化发展。 适合人群:小学高年级至初中阶段学生,信息技术教师,创客教育从业者,以及参与青少年科创赛事的师生。 使用场景及目标:①作为中小学人工智能通识课程的教学案例,帮助学生理解智能感应与控制逻辑;②用于校内创客社团开展项目式学习;③支撑学生参加AI科创类赛事,完成高质量作品创作与答辩准备;④布置为课后综合实践作业,提升动手能力与科技素养。 阅读建议:建议结合提供的Scratch源码进行实践操作,在复现基础上尝试参数调优与功能扩展,如增加音效提示、多区域感应等,深化对编程逻辑与智能系统设计的理解。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值