I am making a puzzle with scoreboard with error addressed in subject.
Pasting part of the code:
var textfont: TextFormat = new TextFormat();
textfont.size = 40;
textfont = "Showcard Gothic";
1b1.setStyle("textFormat", textfont); /*error line in compiler*/
Hopefully someone can help me.
I am new to this kind of forum so if i forgot something please let me know.
Properties and variables names cannot start with numbers. So you're gonna have to rename 1b1 to something else.
Naming limitations for variables in ActionScript 3
• Variable names cannot be a reserved word or keyword. For more information, see ActionScript 3 fundamentals: Syntax
• Variable names must start with a letter, an underscore, or a dollar sign
• Variable names cannot use special characters (except
in certain situations)
• Variable names must be unique
More details here:
Thank you for the quick answer, changed it to kb1 and the error disappeared. I will read the variable page to learn more about as3. After the changes the compiler has the following error: 1172: Definition com.adobe.tvsdk.mediacore.TextFormat could not be found.
When i click on it this line is selected: import com.adobe.tvsdk.mediacore.TextFormat;
What am i doing wrong now? Thanks in advance.
Yeah. Because that's probably not the TextFormat class you want to use.
Please let us know if this fixes the issue.