• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 380
  • Last Modified:

Director 11.5 How do I change the text in the text member by clicking the button?

I have 1 button and 1 text member

How do I change the text in the text member by clicking the button?

Please xplain all steps and code.

Thanks!
0
NerdsOfTech
Asked:
NerdsOfTech
  • 2
1 Solution
 
NerdsOfTechTechnology ScientistAuthor Commented:
I must mention, the button is classified as a flash object inside director.
0
 
Chris-ChambersCommented:
Hi,

Put your button and your text member on the stage.
Select your button, open the Property Inspector, select the 'Flash Component' tab, and make sure the 'eventPassMode' is #passAlways.
Make sure the text member is named "myText".
Create a behavior script:

on mouseUp(me)
  member("myText").text = "Hello!"
end

Drop this onto the button on the stage.

Hope this helps,

Chris.

0
 
NerdsOfTechTechnology ScientistAuthor Commented:
Thanks! Worked perfectly.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now