Highlighted

User input problem on publishing to Android

Community Beginner ,
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

153

Likes

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

User input problem on publishing to Android

Community Beginner ,
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

154

Likes

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

Likes

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
Reply
Loading...
Apr 06, 2016 0
ladyofla LATEST
Community Beginner ,
Apr 08, 2016

Copy link to clipboard

Copied

Thanks so much,

Likes

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
Reply
Loading...
Apr 08, 2016 0