Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Script Help Please

Status
Not open for further replies.

Needalittlehelp

Technical User
Apr 20, 2004
2
US
hello!

im creating a little animal game for my 6 year old niece. ive used director a few times in the past so my memory is refreashing as i go along in this project. ive come across a slight problem though.

for the first movie i added a editalbe field so who ever is playing the game can enter their name, on the next movie i want it to say "hi " and then their name following the word "hi". i remember doing this when i was first using director but i cant remember the script for it =( if someone could help me out i would really appreciate it.

thanks a million,
forgetful me
 
You record the text entered in the field as a global variable in one movie then display it on another movie. To record the input, you can do something like: (attach this to a button goes to the next movie):
--
global gName

on mouseUp me
gName = member(“name field”).text
go movie “nextMovie”
end mouseUp
--[/color blue]
The in the next movie, attach the following behaviour to a text sprite:
--
global gName

on beginSprite me
sprite(me.spriteNum).member.text = "Hi," && gName
end beginSprite
--[/color blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top