why does this javascript not work in max?

prko's icon

Dear users,

I have copied a javascript and loaded in the object [jsui].
However, it does not work.
What is the reason?

Sincerely,
prko

var newDefs = new Object;
newDefs.overimg = 'arrow.gif';
flyDefs (newDefs);
makeLayer (
"menu1",
"First title=#",
"Item 1=#",
"Item 2=#>menu2a",
"Item 2 submenu=#",
"Subitem 1=#",
"Subitem 2=#",
"Subitem 3=#>menu2a3",
"Subitem 3 submenu=#",
"Sub Subitem 1=#",
"Sub Subitem 2=#",
"
"Subitem 4=#",
"
"Item 3=#",
"Item 4=#>menu4a",
"Item 4 submenu=#",
"Subitem 1=#",
"subitem 2=#",
"
);

Luke Hall's icon

It looks like it might be part of a dropdown menu css script which is extremely unlikely to work in max, especially as most of the code isn't there in the first place. I did look into writing a script for [jsui] but my attention span is short so the project was shelved. It would be quite useful though so I might have another go at piecing something together.

lh

prko's icon

I want to have a submenu function in MAX.
I have an algorithm just by using built-in max objects.
It is, however, very clumsy.
I think, we can have such thing in javascript easily.
I attach my patch for submenu in MAX.

Max Patch
Copy patch and select New From Clipboard in Max.

best,
prko

Luke Hall's icon

No need to re-post. As I mentioned: I shall look into writing something in javascript because it would be useful and a fun challenge. No promises though, and I am not in any great hurry. I'll let you know if I come up with anything that works.

lh

prko's icon

thanks!