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

User input problem on publishing to Android

Community Beginner ,
Apr 06, 2016 Apr 06, 2016

Copy link to clipboard

Copied

Gane was designed in flash to accept user input from keyboard arrow keys. When published to Android, the user has no way to manipulate objects. I'm new to Animate CC or Flash, and I would like some ideas on how to make my game work. Ideally I would like to move objects around by touching the mobile's display. An suggestions would be greatly appreciated.

Thanks so much,

‌

TOPICS
Development

Views

231

Translate

Translate

Report

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
Adobe Employee ,
Apr 06, 2016 Apr 06, 2016

Copy link to clipboard

Copied

Hi,

You can use code as below:

function movePlayer(e: Event): void {

  player.x = stage.mouseX;

  //Doesn't go off the right or left side

  if (player.x < 0) {

  player.x = 0;

  } else if (player.x > (stage.stageWidth - player.width)) {

  player.x = stage.stageWidth - player.width;

  }

}

Such type of handling in code allows us to move object by touching the mobile's display.

Thanks,

Adobe AIR Team

Votes

Translate

Translate

Report

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
Community Beginner ,
Apr 08, 2016 Apr 08, 2016

Copy link to clipboard

Copied

LATEST

Thanks so much,

Votes

Translate

Translate

Report

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