hide/show objects dynamically in presentation mode

Apr 5, 2011 at 2:13pm

hide/show objects dynamically in presentation mode

hello,

using the different objects to design an interface using the presentation mode, I’m comfortable with fpic, playing with alpha & presentation_rect to hide, move etc.

Using jit.pwindow too, I can I play with it dynamically?
I don’t mean to load new movies etc.. I’m ok with that
I mean about making it … invisible?
I thought about sending into it the message (presentation_rect -20. -20. 10. 10.) in order to put it outside, BUT I’m afraid in standalone, it shows scrolling bars or something like that..

any tips? trick?

#56105
Apr 5, 2011 at 2:25pm

how about taking a panel with the same color as the background and put it over your pwindow? then all you need to do is play with bringtofront and sendtoback in thispatcher to either show or hide it.

#201486
Apr 5, 2011 at 2:40pm

you can set the object’s @presentation attribute to 1/0 to show/hide in presentation view:

– Pasted Max Patch, click to expand. –
#201487
Apr 5, 2011 at 2:47pm

MIB, I have special background, not solid color so I cannot use that; thanks.

Ben, didn’t even know that.
combining that + another presentation_rect message (because presentation 0 modify to patcher_rect) is FINE!

thanks to both of you :)

#201488
Apr 5, 2011 at 7:17pm

working on it, went further.
all seems to work very fine.

I chose another way to do that.
Using a lot of JS as a core of a lot of systems I designed, I’m using the method: this.patcher.message(); to address directly objects on the patcher.

Just wanted to put it here, in the case others find that on search engine.
Indeed, scripting Maxobj from JS works very fine.

#201489
Dec 29, 2013 at 4:16am

Good one…
the only issue with the

toggle > presentation $1

is that the position and size of the object in the presentation mode aren’t recalled because it will basically be withdrawn and re-added to presentation. The simple use of the

toggle > attrui (hidden)

hides the object from the presentation without altering its properties within it.

haven’t pasted a max code before, hope this works:

{
"boxes" : [ {
"box" : {
"maxclass" : "comment",
"text" : "< DELETE/ADD object (resets display settings)",
"linecount" : 2,
"presentation_linecount" : 2,
"fontsize" : 12.0,
"presentation_rect" : [ 381.0, 58.0, 150.0, 33.0 ],
"numinlets" : 1,
"frgb" : 0.0,
"patching_rect" : [ 45.0, 25.0, 150.0, 33.0 ],
"presentation" : 1,
"fontname" : "Arial",
"id" : "obj-16",
"numoutlets" : 0
}

}
, {
"box" : {
"maxclass" : "comment",
"text" : "< HIDE/SHOW object (whenn in presentation)",
"linecount" : 2,
"presentation_linecount" : 2,
"fontsize" : 12.0,
"presentation_rect" : [ 140.0, 58.0, 150.0, 33.0 ],
"numinlets" : 1,
"frgb" : 0.0,
"patching_rect" : [ 158.0, 188.0, 150.0, 33.0 ],
"presentation" : 1,
"fontname" : "Arial",
"id" : "obj-15",
"numoutlets" : 0
}

}
, {
"box" : {
"maxclass" : "toggle",
"presentation_rect" : [ 115.0, 58.0, 20.0, 20.0 ],
"numinlets" : 1,
"patching_rect" : [ 127.0, 188.0, 20.0, 20.0 ],
"presentation" : 1,
"id" : "obj-3",
"numoutlets" : 1,
"parameter_enable" : 0,
"outlettype" : [ "int" ]
}

}
, {
"box" : {
"maxclass" : "jit.pwindow",
"presentation_rect" : [ 60.0, 138.0, 509.0, 215.0 ],
"numinlets" : 1,
"patching_rect" : [ 20.0, 292.0, 80.0, 60.0 ],
"presentation" : 1,
"id" : "obj-7",
"numoutlets" : 2,
"outlettype" : [ "", "" ]
}

}
, {
"box" : {
"maxclass" : "toggle",
"presentation_rect" : [ 356.0, 58.0, 20.0, 20.0 ],
"numinlets" : 1,
"patching_rect" : [ 20.0, 25.0, 20.0, 20.0 ],
"presentation" : 1,
"id" : "obj-6",
"numoutlets" : 1,
"parameter_enable" : 0,
"outlettype" : [ "int" ]
}

}
],
"appversion" : {
"major" : 6,
"minor" : 1,
"revision" : 6,
"architecture" : "x86"
}

}

#276862
Dec 29, 2013 at 4:18am

doh…
how can I paste a compressed patch here and have it not flood the post?

#276864
Dec 29, 2013 at 4:24am

check copy-compressed feature.

#276865
Dec 29, 2013 at 4:35am

really too obvious, thanks…
like so?

<code>

– Pasted Max Patch, click to expand. –

</code>

#276868

You must be logged in to reply to this topic.