Go_Cats_Go!
04-06-2004, 04:50 PM
How do I substitute a variable in for the named arguments in the addNewRectangle method of JSFL?
Instead of this:
flash.getDocumentDOM().addNewRectangle({left:0,top :0,right:100,bottom:100},0);
I need to do this:
flash.getDocumentDOM().addNewRectangle({left:myvar[0],top:myvar[1],right:myvar[2],bottom:myvar[3]},0);
I keep getting the message "argument number is not valid". I've tried building the parameter string ahead of time, and I've tried using the eval() function, but still can't get past this error.
Anybody else have any ideas?
Thanks!
Instead of this:
flash.getDocumentDOM().addNewRectangle({left:0,top :0,right:100,bottom:100},0);
I need to do this:
flash.getDocumentDOM().addNewRectangle({left:myvar[0],top:myvar[1],right:myvar[2],bottom:myvar[3]},0);
I keep getting the message "argument number is not valid". I've tried building the parameter string ahead of time, and I've tried using the eval() function, but still can't get past this error.
Anybody else have any ideas?
Thanks!