problem creating newobject buffer~ js

I’ve run into a problem with a project I’m currently working on. I want to create a series of buffers using java and name them (buffer1, buffer2 etc) . However, I’ve run into a problem during my first step, while the code I’m using works for toggles (I’m hacking this together from one of the Delicious tutorials so forgive me), if I try and change the object name to buffer~ it doesn’t work. I get an error message "Does not understand buffer~".

Can anybody help a brother out? While I’m very familiar with the Max environment my Java skills…lack.

I’ve uploaded my code to the forum.

Cheers,

JM

-- Pasted Max Patch, click to expand. --

Copy all of the following text. Then, in Max, select New From Clipboard.