获取本机的振动通过AS3工作在iOS [英] Getting native vibration to work on iOS through AS3
问题描述
我一直在寻找的文件,这是一个有点混乱,以我怎么连导入扩展振动插件。的http://www.adobe.com/devnet/air/native-extensions-for-air/extensions/vibration.html该说明说,我要做手脚X code,但我想的Adobe AIR的观点是,你不需要做手脚以X code;它真的令人费解。究竟如何我导入类和文件,使我可以使用所提供的code在AS3?
读了这篇文章:的振动机扩展
点击此链接:振动下载
和解压的任何地方。
点击文件 - ActionScript 3.0中设置
链接(在ReadyToUseExtension) VibrationActionScriptLibrary.swc com.adobe.extensions.Vibration.ane
在模拟器不编译。因为请求延长com.adobe.Vibration不支持MacOS的86。
进口com.adobe.nativeExtensions.Vibration;
VAR盛传:振动;
如果(Vibration.isSupported)
{
盛传=新的振动();
vibe.vibrate(2000);
}
I've been looking at the documentation and it's a bit confusing as to how I even import the extension for the vibration plugin. http://www.adobe.com/devnet/air/native-extensions-for-air/extensions/vibration.html The instructions says I need to mess about with Xcode, but I thought the point of Adobe AIR was that you don't need to mess about with Xcode; it's really convoluted. How exactly do I import the class and files so that I can use the provided code in AS3?
read a this article: Vibration native extension sample
click a this link: Vibration Download
and unzip anywhere.
Click File-ActionScript 3.0 Settings
link to (In ReadyToUseExtension) VibrationActionScriptLibrary.swc, com.adobe.extensions.Vibration.ane
In Simulator not compiled. because Requested extension com.adobe.Vibration is not supported for MacOS-x86.
import com.adobe.nativeExtensions.Vibration;
var vibe:Vibration;
if (Vibration.isSupported)
{
vibe = new Vibration();
vibe.vibrate(2000);
}
这篇关于获取本机的振动通过AS3工作在iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!