[Closed] Rollouts/rollout floaters onopen?
Ok i have some rollouts which I add to my rolloutfloater dialog. Question is how to i use “on opened” and where do i put the code for this floater dialog.
For example from the maxscritp help…
rollout test "Test"
(
button btn_test "Press Me"
on test rolledUp state do
if state then print "Rolled Down!" else print "Rolled Up!"
)
nf = newRolloutFloater "Test" 200 200
addRollout test nf
in this example i want to put some code for “nf” the main floater rollout. For example, i have a clock in my script i need to get working, also some functions i use. Also does the button code go inside each rollout, or can i get away with having it outside the rollout, and put it in the main floaterrollout dialog?
Cheers…
Rollout floaters are only holdres for rollouts, they cannot accept UI controls. So you cannot put a button in the floater, just in rollouts inside that floater. Most event handlers are also rollout-dependent.
Rollout floaters have several properties, but no event handers. You should use the rollout event handlers instead – for example, on MyFirstRollout moved pos do () handler placed in the first rollout in the floater could be used to track changes of the whole floater’s position…