• 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 remove a comma after a number?

Explorer ,
Mar 26, 2023 Mar 26, 2023

Copy link to clipboard

Copied

example:

var nmb:Number = 12.3;

// i wanna change from 12.3 to 12 instead
TOPICS
ActionScript

Views

295

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

Engaged , Mar 26, 2023 Mar 26, 2023

 

var nmb:Number = 12.3;
var str:String = nmb.toFixed(0);
trace( str );     // 12

 

 

Votes

Translate

Translate
Community Expert ,
Mar 26, 2023 Mar 26, 2023

Copy link to clipboard

Copied

do you want to round down?

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 ,
Mar 26, 2023 Mar 26, 2023

Copy link to clipboard

Copied

No, I just wanna remove 12,3 to 12 instead of number

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
Engaged ,
Mar 26, 2023 Mar 26, 2023

Copy link to clipboard

Copied

 

var nmb:Number = 12.3;
var str:String = nmb.toFixed(0);
trace( str );     // 12

 

 

- Vlad: UX and graphic design, Flash user since 1998
Member of Flanimate Power Tools team - extensions for character animation

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 ,
Mar 26, 2023 Mar 26, 2023

Copy link to clipboard

Copied

THANK YOOOOOUUU!!!!! :--)

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 ,
Mar 26, 2023 Mar 26, 2023

Copy link to clipboard

Copied

LATEST

that's all rounding.

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 ,
Mar 26, 2023 Mar 26, 2023

Copy link to clipboard

Copied

Hi.

 

If you want to keep it as a number:

var nmb:Number = 12.3;

nmb = int(nmb);

// or
// nmb = Math.floor(nmb);

 

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