Thread: array of class
View Single Post
  #1 (permalink)  
Old Apr 8th, 2007, 21:12
janper janper is offline
New Member
Join Date: Apr 2007
Location: slovakia
Age: 26
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Question array of class

hello. i'm just an actionscript beginner so sorry for a dumb question...

i'm trying to use an array of my own classes. the class is called hostitel and works well - i have tested it. the array is called hostitelia

the definition is this:

var hostitelia:Array;
hostitelia[1] = new hostitel(hostitel1,10);
hostitelia[2] = new hostitel(hostitel2,10);
hostitelia[3] = new hostitel(hostitel3,10);
.
.
.


so far everything works well - the initial function runs.

problem comes here:

hostitelia[10].posun();

there's no error message, however, the function posun() won't run

if this is a wrong way of defining an array of class, what would be the right way than?

thanks!
Reply With Quote