View Full Version : a few simple questions about arrays and functions
999aphelion999
05-11-2002, 06:41 PM
heres an array
hello=new Array()
hello=(
999aphelion999
05-11-2002, 06:48 PM
heres an array
(ill write it the simple way so as not to confuse myself)
hello=new Array()
Hello = [["first",1,1,1,0,0,0,0,0],
["second",2,2,1,0,0,0,1,0]];
how would i access one of the value inside the array? for instance
the second value of hello[2]
another thing
function Man(age, name, height)
new Man(1,greg,1)
how would i access a value in the man and give it a variable name
also, how do i give a name to the 'instance' of the man function
for example the new man would be man 1 so man 1.age=1
so i could write a script if man 1.age<18 he can buy beer
someone help!!!!!!!!!!!
CyanBlue
05-11-2002, 09:23 PM
Hi...
Hello[1][1]; --> will show you '2'
Remember that array arguements starts from 0 in Flash...
And... for your another question... check out the Objects and Classes in Flash at http://www.macromedia.com/support/flash/action_scripts/object_model/index.html
HTH
Jason
PS>> You have a duplicate post and you might want to delete it... :)
jimburton
05-11-2002, 09:44 PM
var imConfused = new Array("what's "," your "," question?");
trace(imConfused.toString());
CyanBlue
05-11-2002, 11:57 PM
Man... you are funny!!!
:)
999aphelion999
05-12-2002, 12:06 AM
i love a good laugh a my expense....
jimburton
05-12-2002, 07:05 AM
no offence 999aphelion999 ;) .......do you have a query re arrays then?
cancel that, seen your cross post and presume yr question is answered.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.