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

Display text from file on click.AS2

Guest
Mar 07, 2014 Mar 07, 2014

Hello again!

Once again I have a question for You! So I made a button and an output text window to show a text from file and it works, when I play my swf file, but I need the text  to show only after the click of the button, not right away when the swf file is opened.

So .I press on the button, then press F9 for actionscript panel and write the following code, but its not working :

button.onRelease = function(){

myText_txt.text.show";

}

myText_txt is the instance name for the text output field and its a dynamic text.

I am only a begginer in Flash and im sorry, if my code is incorrect...

Could You please tell me what am I doing wrong?

TOPICS
ActionScript
479
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 ,
Mar 07, 2014 Mar 07, 2014
LATEST

it's incorrect. 

1.  there's an unpaired double quote.

2.  there's no show property of textfields and especially of a textfield's text property.

use something like:

button.onRelease = function(){

myText_txt.text = "show this text";

}

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