Copy link to clipboard
Copied
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!!!
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"
Copy link to clipboard
Copied
"\n" is the next line character.
"\r" is the carriage return.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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"
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
you have a textfield onstage that's not displaying all the text?
if so, is the textfield multiline with word-wrap enabled?
Copy link to clipboard
Copied
No I need this in the script window.
Copy link to clipboard
Copied
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 + ")");
Copy link to clipboard
Copied
I'm sorry I misunderstood your suggestion which was right!
Thank you!!
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now