Forum Topic: Please I Need Help - Variables

(99 views • 7 replies)

This topic is 1 page long.

<< < > >>
None

D3m0n1c707

Reply To Post Reply & Quote

Posted at: 6/10/09 11:45 PM

D3m0n1c707 EVIL LEVEL 06

Sign-Up: 09/29/06

Posts: 29

I intended to have a input text with the variable name of "name" to interact with a dynamic text of the same variable name. but when i test play, the dynamic text appears as undefined.

I was here.

BBS Signature

None

Headshot777

Reply To Post Reply & Quote

Posted at: 6/10/09 11:46 PM

Headshot777 LIGHT LEVEL 20

Sign-Up: 05/04/08

Posts: 3,176

"name" targets a movie clip's instance name.
Er... Well it does in AS2; I don't know about AS3...
Try using a different variable name.

12

BBS Signature

None

Cryoma

Reply To Post Reply & Quote

Posted at: 6/10/09 11:47 PM

Cryoma DARK LEVEL 13

Sign-Up: 12/18/07

Posts: 1,620

Wait.
What.

var text = "Sally is Naked"

Set both dynamic and input to the variable text.

Unless you want something else?

-Chabitsku
I'm looking for more e-friends!
msn: Cryoma@live.com


None

D3m0n1c707

Reply To Post Reply & Quote

Posted at: 6/10/09 11:50 PM

D3m0n1c707 EVIL LEVEL 06

Sign-Up: 09/29/06

Posts: 29

At 6/10/09 11:46 PM, Headshot777 wrote: "name" targets a movie clip's instance name.
Er... Well it does in AS2; I don't know about AS3...
Try using a different variable name.

i dont think you understood what i ment, i have a input text with the variable name of "name" on the main frame, and i also have a movie clip with the dynamic text inside of it, but when i put the variable name "name" it still wont communicate and wont show what i would like it to, instead it shows up as "undefined"

I was here.

BBS Signature

None

jakk22

Reply To Post Reply & Quote

Posted at: 6/10/09 11:58 PM

jakk22 LIGHT LEVEL 12

Sign-Up: 07/12/06

Posts: 700

try name1 and name2 instead of just one. I don't think you can have two of the same name


None

Zuggz

Reply To Post Reply & Quote

Posted at: 6/11/09 12:02 AM

Zuggz FAB LEVEL 16

Sign-Up: 06/23/03

Posts: 1,060

Try _root.name in the box.

|- I'm on a Boat - Collab -|- List -|- AS3 -|- Game Poll -|

BBS Signature

None

Cryoma

Reply To Post Reply & Quote

Posted at: 6/11/09 12:05 AM

Cryoma DARK LEVEL 13

Sign-Up: 12/18/07

Posts: 1,620

At 6/11/09 12:02 AM, Zuggz wrote: Try _root.name in the box.

Oh yeah.

Duh.

-Chabitsku
I'm looking for more e-friends!
msn: Cryoma@live.com


None

Afro-Ninja

Reply To Post Reply & Quote

Posted at: 6/11/09 12:20 AM

Afro-Ninja EVIL LEVEL 38

Sign-Up: 03/02/02

Posts: 13,467

At 6/10/09 11:45 PM, D3m0n1c707 wrote: I intended to have a input text with the variable name of "name" to interact with a dynamic text of the same variable name. but when i test play, the dynamic text appears as undefined.

Older versions of flash allow a sloppy and improper way to do this. I'm not sure when they took it out, maybe it's just if you're using AS3. Anyway, this is what you want to do- give your dynamic text box an instance name. Then, in your code, do

textBoxInstanceName.text="whatever";

get rid of whatever you have filled in for the 'variable name' option on the text box, if that's the case.

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 02:18 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!