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

Can anyone to explain to define Adobe AIR Platform in PC or smartphone in AS3/AS?

Explorer ,
Aug 14, 2024 Aug 14, 2024

Copy link to clipboard

Copied

Hi, i'm Faizal Arshad Putra Adika. I want anyone to explain AS3/AS code to compare Adobe AIR platform in PC or smartphone. this is a sample code:

if(adobe_air_platform_in_pc)
{
 trace("You're using Adobe AIR Platform in PC");
}
if(adobe_air_platform_in_smartphone)
{
 trace("You're using Adobe AIR Platform in Smartphone");
}

 So, i can make and export a game for PC and smartphone in one project without creating a second ".fla" project, i just use in one "fla" file.

TOPICS
How to

Views

164

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

correct answers 1 Correct answer

Community Expert , Aug 15, 2024 Aug 15, 2024

Hi.

 

Use the Capabilities class. For example:

import flash.system.Capabilities;

function isAndroid():Boolean
{
	return (Capabilities.version.substr(0,3) == "AND");
}

function isIOS():Boolean
{
	return (Capabilities.version.substr(0,3) == "IOS");
}

function isMobile():Boolean
{
	return (isAndroid() || isIOS());
}

if (isMobile())
{
	// your mobile code
}
else
{
	// your desktop code
}

 

I hope this helps.

 

Regards,

JC

Votes

Translate

Translate
Community Expert ,
Aug 14, 2024 Aug 14, 2024

Copy link to clipboard

Copied

in the future, to find the best place to post your message, use the list here, https://community.adobe.com/

p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post (like this one has already been moved) if it helps you get responses.



<"moved from using the community">

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
Explorer ,
Aug 20, 2024 Aug 20, 2024

Copy link to clipboard

Copied

thank you

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 Expert ,
Aug 20, 2024 Aug 20, 2024

Copy link to clipboard

Copied

you're welcome.

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 Expert ,
Aug 14, 2024 Aug 14, 2024

Copy link to clipboard

Copied

you can use animate to create ios and android apps.  that said, your code makes no sense because you can't run animate on mobiles.

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 Expert ,
Aug 15, 2024 Aug 15, 2024

Copy link to clipboard

Copied

Hi.

 

Use the Capabilities class. For example:

import flash.system.Capabilities;

function isAndroid():Boolean
{
	return (Capabilities.version.substr(0,3) == "AND");
}

function isIOS():Boolean
{
	return (Capabilities.version.substr(0,3) == "IOS");
}

function isMobile():Boolean
{
	return (isAndroid() || isIOS());
}

if (isMobile())
{
	// your mobile code
}
else
{
	// your desktop code
}

 

I hope this helps.

 

Regards,

JC

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 Expert ,
Aug 20, 2024 Aug 20, 2024

Copy link to clipboard

Copied

LATEST

This is good JC. Thanks for sharing.

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