Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Adobe AIR for Android as3 codes not working for this one project

New Here ,
Aug 05, 2013 Aug 05, 2013

I'm trying to use Accelerometer in my flash game, which works for every other project I'm working on, but for some reason on this one project if I try using it I get errors, using the same code i've used before, such as this. 

1046: Type was not found or was not a compile-time constant: Accelerometer.

1180: Call to a possibly undefined method Accelerometer. 

This is a fairly old file, not that old, so are there files I need to add to it to get it to work, or settings I need to change? This is very frustrating, I don't know what the problem possibly could be. Can anybody help me?

TOPICS
ActionScript
452
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Aug 06, 2013 Aug 06, 2013

The error message is indicating it cannot find the class.  Make sure you are importing it:

     import flash.sensors.Accelerometer;

Translate
LEGEND ,
Aug 06, 2013 Aug 06, 2013
LATEST

The error message is indicating it cannot find the class.  Make sure you are importing it:

     import flash.sensors.Accelerometer;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines