문제

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

enter image description here

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);
}

다른 팁

Using the files in the ReadyToUseExtension directory, add the pre-packaged .ane file to your project, as in this tutorial.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top