View Full Version : Name inputs
jumpinjax
05-30-2008, 06:19 PM
Hi guys,
I want to know how to make a input name field, and make it show up in several parts of my flash.
Example:
If i type in 'Bob' and click 'ok
Then at the top of the screen it said 'welcome Bob' or something similar.
Cheers!
RIT_FlashKid
06-02-2008, 02:35 AM
Hey JumpinJax,
I wrote a lil script that store the users name and when you click go it displays their name in a welcome box. The code looks like this:
var vars:URLVariables = new URLVariables();
go_btn.addEventListener(MouseEvent.CLICK, sendname);
function sendname (event:MouseEvent):void {
vars.name = name_txt.text;
welcomebox.text = "Welcome " + (vars.name);
}
I'm not sure if this is the best way to do it but it is the only way I know how. Attached is the .fla file if you want to further look at what I did. Basically I'm having the users name stored in "vars.name" so I can reuse vars.name wherever I want the users name to be displayed.
-BC
jumpinjax
06-05-2008, 05:35 PM
I can't seem to open the fla. file. I am using flash professional 8.
Anyway, i do roughly understand what you are saying. Cheers for your time.
Jumpinjax
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.