View Full Version : rollout questions

03 March 2009, 12:37 PM
I have three or above rollouts in a floater , when a rollout is opened I want to the others be closed , how can do that , thanks

03 March 2009, 02:43 PM
Some combination of the ON ROLLEDUP event with the property perhaps? Check out the help file, it shouldn't be too hard to figure out.

03 March 2009, 09:52 AM
I've just used this code in a tutorial which may help. this refers to only one rollout but I'm sure it'll be easy to adapt it

if ((yourrollout != undefined) and (yourrollout.isdisplayed)) do
destroyDialog yourrollout

04 April 2009, 12:30 AM
thanks , I will try it ;)

04 April 2009, 08:55 AM
destroydialog will actually close the dialog the rollout is in. You'll want to try something like this (as per Marco):

global test_hello, test_world
rollout test_hello "Test Hello" (
label lbl_hello "Hello"

on test_hello rolledup state do ( = not state
rollout test_world "Test World" (
label lbl_world "World"
on test_world rolledup state do ( = not state
myFloater = newRolloutFloater "Test" 400 200
addRollout test_hello myFloater
addRollout test_world myFloater rolledup:true

The above is a true toggle - so only one rollout is open at a time and closing one rollout will open the other. If you want it to only 'close' the other rollouts when one rollout is opened, check that 'state == true' before closing the others.

04 April 2009, 01:08 AM
ZeBoxx2, thanks a lot
perform as a beauty

CGTalk Moderation
04 April 2009, 01:08 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.