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?
Asked
Active
Viewed 2,234 times
2 Answers
4
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);
}

bitmapdata.com
- 9,572
- 5
- 35
- 43
-
I linked to that article in my post. The steps it provides is what I was saying is convoluted and hard to understand... it's saying to make a class in Xcode, but should the classes in the zip file not be what you import? – ArrayOutOfBounds Feb 08 '13 at 17:08
-
I a little mistake. modified answer. – bitmapdata.com Feb 08 '13 at 17:28
-
Thanks for putting it in a much more understandable format! I've got it all imported now. So I take it that basically, I won't be able to compile in Flash because of the vibration, so I'll have to keep testing on the device. I have the vibration logic in part of my program but it doesn't seem to work... any ideas? – ArrayOutOfBounds Feb 08 '13 at 17:47
0
Using the files in the ReadyToUseExtension
directory, add the pre-packaged .ane file to your project, as in this tutorial.

Michael Brewer-Davis
- 14,018
- 5
- 37
- 49