-
Need syntax for defining an array of names
Hello,
Can someone tell me the syntax for defining an array of names.
I will put in the values myself, like myArray["pete.swf", "laura.swf".....]
This array will be accessed later from a function in the same level.
So something like
_level0.myArray["pete.swf", "laura.swf"...]
and then,
name = _level0.myArray[i];
-
Monkey Moderator
Code:
var trumpton:Array = ['Pugh', 'Pugh', 'Barney McGrew', 'Cuthbert', 'Dibble', 'Grub'];
for(var i:Number=0; i<trumpton.length; i++)
{
trace( trumpton[i] );
}
www.lexicon-design.co.uk
If we aren't supposed to eat animals, then why are they made of meat?
If Vegetarians like animals so much, why do they eat all their food?
-
Thank you very much. One quick question, what does trace do?
Thanks again
-
Monkey Moderator
it writes to the 'output' window in Flash.
www.lexicon-design.co.uk
If we aren't supposed to eat animals, then why are they made of meat?
If Vegetarians like animals so much, why do they eat all their food?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|