Use the accelerometer in BB10

I want to create a game that will respond to the inclination of the unit BB10 (interaction almost similar to the classic maze game).

I want to undretsand if possible in BB10 using AIR SDK, I guess that it requires accelerometer but I couldn't get the API to access the accelerometer sensor.

A code example would be appritiated!

Patrice

http://help.Adobe.com/en_US/FlashPlatform/reference/ActionScript/3/Flash/sensors/accelerometer.html

Tags: BlackBerry Developers

Similar Questions

  • Use the accelerometer of the playbook

    Hey guys,.

    I'm relatively new to programming for the playbook, and I want to use the accelerometer to control an object on the screen (a sprite as3 or form)

    Basically, I have no idea where to start when including the accerometer and its use in the code

    Any help will be appreciated

    Thank you

    Chris

    That the orientation of the three axes is also covered by the docs.  X axis runs from left to right, are between the top and bottom and Z along a line that crashed across the screen...

    (Edition, exchange of X and Y what I said originally.)

  • problem in using the accelerometer in my game

    Hi, I am new to AS3 and I create a game for android using the accelerometer.

    the game:

    the player needs to collect coins and throw bombs by moving left right.

    code:

    I took the code frome the extracts of 'code' that offer Flash and make a little change.

    var fl_Accelerometer:Accelerometer = new Accelerometer();

    fl_Accelerometer.addEventListener (AccelerometerEvent.UPDATE, fl_AccelerometerUpdateHandler);

    function fl_AccelerometerUpdateHandler(event:AccelerometerEvent):void

    {

    itamar_a.x = event.accelerationX * 130;

    }

    the problem:

    When the player loses and he gose back to start the game - the speed of the drive has become higher and higher.

    After some tests, I can't control the player because of the very high speed.

    I hope I was clear... Please help!

    Try:

    If (itamar_a.hitTestObject (bomb)) {}

    fl_Accelerometer.removeEventListener (AccelerometerEvent.UPDATE, fl_AccelerometerUpdateHandler);

    gotoAndStop (3);

    itmar_a.y = 1500;

    }

  • Use the accelerometer to control movement?

    Hello.

    Is it possible through edge animate using the accelerometer on an iPad to control the movement of a symbol?  I want to create a scene where a fish moves on a sub sea scene when the user toggles the ipad.

    Thank you

    Ben.

    Hi, Ben.

    The answer is "sort of".  We have all the native user interface to help you use the accelerometer events, but you can do it using JavaScript using the DeviceOrientation event.  Please note that this is not supported in mobile web browsers.

    http://caniuse.com/#search=deviceorientation

    http://www.html5rocks.com/en/tutorials/device/orientation/

    I hope this helps point you in the right direction!

    -Elaine

  • Using the two PB 2.0 + SDK & BB10 Air SDK in Flash Builder 4.6

    Hello

    Any of you have experience creating applications using the PB2 + and BB10 Air SDK in Flash Builder? How do you change the build configuration between two SOFTWARE development kits? So let's say you make apps for Playbook and at the same time you are doing apps for BB10...

    Where do you set your IDE with these settings?

    Looking forward to your answers.

    There is essentially only one way to do it: you first install the 2.0 + SDK, then the BB10 Beta SDK. This is how you make sure that you have the data of these two software development kits installed on your pc. The Flash Builder plugin will be the BB10 sdk.

    I tested some of the components of the SDK BB10 on PlayBook OS 2.0.1. Needless to say that some features are not supported.
    Note: When I talk about libraries and 'ane's, I mean those provided by the SDK BB10. The following findings are valid with a pre-BB10 PlayBook OS 2.0.1 is the last one I think. PlayBook OS 2.1 can be considered BB10, although some features don't work there either.
    Here's what I found: you can use fuse controls, but the classes in the package "qnx.fuse.ui.dialog" do not work because the classes in the package "qnx.fuse.ui.window" do NOT work.
    You cannot use "QNXDevice.ane" because "NavControl" class which is indispensable to the actions of the bezel does not work and the notifications do not work either.
    If you use "fuse" components, you must also use 'QNXSkins.ane '.
    The "QNXLocale.ane" does not work. 'QNXNetwork.ane' no test however. The framework of the call does not work.

    Phew, that was some writing. If I missed something or you have any other questions, feel free to ask.

  • Are there problems with the accelerometer/compass on the Flipout?

    My flip is great, except that most of the applications that use the accelerometer does not work correctly.

    This includes: drop http://www.android.com/market/#app=com.infraredpixel.drop

    Labyrinth lite http://www.android.com/market/#app=se.illusionlabs.labyrinth.lite, aTilt 3D labyrinth free http://www.android.com/market/#app=com.fridgecat.android.atiltlite, and the reality applications, Wikitude and Layar immersed.

    In all this, left, right, front, rear are twisted.

    On the other hand, the "abduction" game seems to work fine, and it uses tilt left/right to lead your cow...

    I wonder if this a bug in all of these programs, a bug in the Flipout, or just a problem in my phone.

    Else you have noticed this problem on their phone?

    Yes, I have a flipout. I tried Labyrinth lite and it works fine.

    You can try to go in the game settings and calibrate the level. You can also try to do a software reset the phone, but you may have a hardware problem.

    If a reset does not work, then you will need to exchange the phone. MotoBlur will restore much of your data, but you will lose messages SMS and photos - but let's go back to the top of your data on your computer or SD card.

  • Detect a shake of the accelerometer? Can anyone provide an example of method?

    Hello

    I try to use the accelerometer to detect a shake, can anyone provide an example of method? Thank you very much!

    Thanks Marc, I solved this problem already, just forget to mark resolved here.

  • Accelerometer (voltage) of the signals using the module NI6361 (PXI)

    Hi guys,.

    I posted this question once again, but I still have problems with the acquisition of data. I'm acquiring a voltage signal by using an accelerometer module and single voltage NI6361. I would like to set up the accelerometer to measure a range of signal between + / 5000g.

    The accelerometer sensitivity = 0,516 mV/g where

    1 g = 0,000516 Volts or

    1938-g = 1 Volt or

    5000 g = 2.58 Volts

    -J' left the signal conditioning with +/-10 Volts (despite the fact that there is another option value +/-5 Volts as well)-please see attached pdf

    -I entered the units sensitivity to g

    -J' put labview to measure a signal between +/-10 Volts to the single a complete axis accelerometer.

    -An oscilloscope was related to the card, and she won the same vertices with the LabVIEW. -Please see attached pdf

    -By knocking gently on the accelerometer, the recorded signal was 400 mV = 0.4 V where he gives an acceleration of 775g.

    -L' accelerometer is also fixed on the ball for a shock test fell from a distance of 50 mm. The recorded acceleration was 4000g which is quite high for such a small distance. I expect an acceleration of about 200g of 2 to 4 meters according to some documents as well.

    Can you please give me any help on the way in which the parameters are specified correctly between the accelerometer and the coupler? I'd appreciate it highly if you can correct me if anything of the above statement is false. I have attached a PDF for your convenience.

    Kind regards

    Since gain is the scale factor for tension, you must divide your results by the gain.

    g = voltage / (sensitivity * win)

  • How can I use an accelerometer on a cRio 9012 with the NI 9233 module?

    I'm putting in place a system of vibration using a search of wilcoxon accelerometer 797-33. Is there some setting you have to light to light the target NOR?

    I used the getting started with the example of 9233 as base. However, it will only read 0, while the vi is running

    The power of the module 9233 is always.  Its successor, the 9234 contains options to be turned off, and by default the 9234 is turned off.  So with the 9233, is always under tension.

    You can watch the specific\NI LabVIEW\examples\compactRIO\module 9233 examples for some ideas on coding.

  • Using events QNX in the AIR for BB10 in Flash Professional 5.5

    I want to use the QNX events in my AIR for BB10 application in Flash Professional. As the playbook, am I supposed to add a few swc files in order to use the events I get compilation error?

    I want to use "CardCloseEvent", but it gives compile error.

    Thank you!

    No worries,

    GoTo file > settings Actionscript > library path

    Press on the +, then navigate to the DONKEY

    Note: If it does not allow you to add DONKEY - make a copy and rename it to SWF.  He worked for Flash Builder 4.5.

    For each ALBUM, you may need to click on it and press the I button and change it externally.

    I don't know how Flash Pro builds your packages well-, but put in right place.

    Ed.

  • BB10 signature using the command line.

    When I try to download the signing keys to the BB10 instead of get two files csj I get directed to open a session with my BlackBerry ID and request a new token. When I request the token I get only one file unique bbidtoken.csk. When I try to save this token I get something like chain of certificate not valid for RDK...

    What is the procedure to update to request the signing keys?

    You can use the bbidtoken with SDK 10.2. If you still build with the 10.1 SDK version or previous, you * can * install 10.2 and use only the function of signing it if you wish.

    If you need to stay with the SDK of pre - 10, 2 for the time being, you need get the SJC files old etc, assuming that they still allow him somehow.

    According to my experience, the symbolic approach BBID is much better and interesting to go with, especially if you sign up for the first time. If you can afford the time to set up the SDK 10.2 for that it's probably worth, and of course in the not-too - distant future you will probably want to migrate to 10.2 for all in any case.

  • How to apply http with the string parameter in the development of BB10 using WebWorks.

    Hi all

    I'm developing an application BB10 Webworks setting, I want to make an http request by adding a string parameter. What type of http request, I'll use. any help of code base.

    Thank you all

    Use the JavaScript XmlHttpRequest object to make a GET request to a remote URL.

    https://github.com/BlackBerry/WebWorks-community-samples/BLOB/master/kitchenSink/js/browser/XHR.js

    Here is an example:

    var url = "http://www.yourwebsite.com/index.asp?foo=bar"
    var xhr = new XMLHttpRequest();
    
    xhr.open('GET', url, true);
    
    xhr.onreadystatechange = function(e) {
        if (xhr.readyState === 4) {
            if (xhr.status === 200 || xhr.status === 0)  {
                console.log(xhr.responseText);
            }
            else {
                console.log("Error (" + xhr.status + "): " + xhr.statusText);
            }
        }
    };
    
    xhr.send(null);
    
  • Portege M700 - Rotation buton and the accelerometer does not

    Running Vista Business 32-bit.

    When I put my M700 in tablet mode and tilt the tablet to 1side and press the button next to the slider he used to rotate the screen in that direction.
    He doesn't do this more. I have
    Note also that all the utilities of the accelerometer, like tilt, shake and advanced security no longer work. detection of movement of hard drive does not work.

    I reinstalled from recovery discs and installed original and new extension of the tablet version and pvat. Nothing seems to help. I also installed Windows 7 ultimate 64-bit, it does not work there either. I've actually noticed that it also does not work on vista because of this does not not under Windows 7.

    I wonder whether or not my accelerometer is broken or not because it allows to work with the original installation of discs or is it a software problem?

    Hey mate,

    > I reinstalled from recovery disks
    To be honest, if you have the same problem with the factory settings, it appears to be a malfunction of the equipment. With the settings everything should work properly without updating a software or driver.
    So I recommend you contact an authorized service provider. Guys can help you because here it s only a user to user forum.

    By the way: is the new version of the BIOS installed?

  • Calculate speed using acceleration < accelerometer iPhone >

    I'm working on an application where I need to find the speed and Distance without using GPS. I did some R & D on the accelerometer and the Framework.but movement could not be any idea my job. Any suggestions are welcome.

    Ask Mr. Newton. You must integrate the accelerometer of entry (in the mathematical sense of the term) to get the speed and integrate to get the distance.

  • How to use the trigger for Hammer

    Hello

    I used a hammer and an accelerometer of pcb to do some tests of beam. I want to express signal for start of log data after I use the hammer hit something. Here is my configuration in express signal.

    Trigger type: analog edge. Source of relaxation: the channel of the hammer
    Slope: fall. Level: 0

    However, once he began to run, it says "logging was stopped because an error occurred with a step in the project. If this error is due to a device buffer overflow, you can improve performance by disabling updates to screen using the "view > views of Signal update during the race" menu item. You can also change the way in which the signals are recorded by changing the Logging Options in the tools > Options dialog box. Disabling "Prepare the log for display data" will greatly improve performance. "I've changed everything, but it didn't work.

    Should I use other types of trigger?

    Thank you
    Ningyu


Maybe you are looking for