PDA

View Full Version : .apply fuction - problem


antimatter
02-20-2003, 12:39 PM
I seem to be having issues with .apply

I'm trying to attach a function to a buttons in a loop but it's not working. I've tried several variations and combination but it's not working. It's proabely just a synthax issue but for the life of me I cant see it!

the code works fine if I just use :
printDriver.apply(movingfloor.bwprinter1"_btn);

but I would much rather automate the process

here is the code that is giving me problems

for (i=0; i<=20; i++) {
trace("i:" +i);
printDriver.apply(movingfloor."bwprinter"+i"_btn");
}

thanks in advance:confused:

JGizmo
02-20-2003, 02:40 PM
Try

printDriver.apply(movingfloor["bwprinter"+i+"_btn"]);

Regards
John