Forum Topic: Arrays Help Please:)

(216 views • 2 replies)

This topic is 1 page long.

<< < > >>
None

ApeLord

Reply To Post Reply & Quote

Posted at: 3/31/06 10:37 AM

ApeLord EVIL LEVEL 15

Sign-Up: 12/24/04

Posts: 1,562

Hey, ive got a small code that ive put on my button to check the player, can anyone help me wit this?

on(press) {
_root.names.new Array ("Tom", "Dick", "Harry")
if(_root.name_txt.text == null)
//PROBLEM HERE
}

See, if the name is nothing then i want one of the names from the array to be pushed into the name space for example _root.name_txt = ( either tom dick or harry )

Can anyone help me with this? Thank You!


None

GustTheASGuy

Reply To Post Reply & Quote

Posted at: 3/31/06 10:53 AM

GustTheASGuy LIGHT LEVEL 08

Sign-Up: 11/02/05

Posts: 9,716

on (press) {
names = new Array("Tom", "Dick", "Harry");
!name.text ? name.text = names[random(3)] : 0;
}

haXe AliceML Box2dLite Learn AS
#ngprogramming at irc.freenode.net
OVER NINE THOUSAAAAND!!!


Happy

ApeLord

Reply To Post Reply & Quote

Posted at: 3/31/06 10:55 AM

ApeLord EVIL LEVEL 15

Sign-Up: 12/24/04

Posts: 1,562

Thank You! XD


All times are Eastern Standard Time (GMT -5) | Current Time: 01:09 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!