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

Is there a way to go to next line?

Contributor ,
Jan 01, 2017 Jan 01, 2017

If I have a long  line and I want to go to next line like this:

///////////////

function reportKeyDown(event: KeyboardEvent): void {

  trace("Key Pressed: " + String.fromCharCode(event.charCode) + " (key

code: " + event.keyCode + " character code: " + event.charCode + ")");

//////////

Is there a special char that it is possible to use?

Thanks and Happy New Year!!!

TOPICS
ActionScript
533
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

Community Expert , Jan 02, 2017 Jan 02, 2017

i'm not sure what you're trying to do, but those of those are problematic.

and this would be ok

var MyList: Array = ["123", "456", "789\r",101112", "131415"];

if you wanted to add a carrage return after "789"

Translate
Community Expert ,
Jan 01, 2017 Jan 01, 2017

"\n" is the next line character.

"\r" is the carriage return.

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
Contributor ,
Jan 02, 2017 Jan 02, 2017

Thank you kglad!

I've tried e.g. this:

var MyList: Array = ["123", "456", "789" "\r"

"101112", "131415"];

or

var MyList: Array = ["123", "456", "789" \r

"101112", "131415"];

But doesn't work.

What I'm doing wrong?

Thanks.

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
Community Expert ,
Jan 02, 2017 Jan 02, 2017

i'm not sure what you're trying to do, but those of those are problematic.

and this would be ok

var MyList: Array = ["123", "456", "789\r",101112", "131415"];

if you wanted to add a carrage return after "789"

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
Contributor ,
Jan 02, 2017 Jan 02, 2017

Thank you kglad.

It is my fault I have not explained well.

I'm trying to have, a long script, in a portion of screen without drag the page to see the portion of this script that I can't see.

Do this many times is boring

So I would ask if it is possible to start a new line  without effect to the script.  

Thanks.

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
Community Expert ,
Jan 02, 2017 Jan 02, 2017

you have a textfield onstage that's not displaying all the text?

if so, is the textfield multiline with word-wrap enabled?

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
Contributor ,
Jan 02, 2017 Jan 02, 2017

No I need this in the script window.

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
Community Expert ,
Jan 02, 2017 Jan 02, 2017

i don't understand you.  copy and paste the relevant part of your actionscript and indicate what you want.

if you've already one that with:

function reportKeyDown(event: KeyboardEvent): void {

  trace("Key Pressed: " + String.fromCharCode(event.charCode) + " (key

code: " + event.keyCode + " character code: " + event.charCode + ")");

try:

function reportKeyDown(event: KeyboardEvent): void {

  trace("Key Pressed: " + String.fromCharCode(event.charCode) + "\n(key

code: " + event.keyCode + "\ncharacter code: " + event.charCode + ")");

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
Contributor ,
Jan 02, 2017 Jan 02, 2017

I'm sorry I misunderstood your suggestion which was right!

Thank you!!

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
Community Expert ,
Jan 02, 2017 Jan 02, 2017
LATEST

you're welcome.

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