Karnageddon
07-19-2009, 09:10 PM
I have been racking my brain over this and I'm sure the answer is pretty simple and I just cant figure it out right now.
I'm making an interface and the current portion I'm working on involves sliders that control objects. I have two sliders that need to be able to do the following:
-Slider1 will follow slider2 when the linking checkbutton1 is enabled
-Slider2 will follow slider1 when the linking checkbutton1 is enabled
-When checkbutton1 is disabled, both sliders will move independently
I can get the sliders to follow each other without the checkbutton, using:
on sld1 changed state do
sld2.value=sld1.value
on sld2 changed state do
sld1.value=sld2.value
but I cannot get it to work with the button
on chk2 changed state do
)
on sld1 changed state do
sld2.value=sld1.value
on sld2 changed state do
sld1.value=sld2.value
)
I know what I've done wrong in the second part but I cannot figure out how to use on events within on events. Any suggestions on how to fix it?
I'm making an interface and the current portion I'm working on involves sliders that control objects. I have two sliders that need to be able to do the following:
-Slider1 will follow slider2 when the linking checkbutton1 is enabled
-Slider2 will follow slider1 when the linking checkbutton1 is enabled
-When checkbutton1 is disabled, both sliders will move independently
I can get the sliders to follow each other without the checkbutton, using:
on sld1 changed state do
sld2.value=sld1.value
on sld2 changed state do
sld1.value=sld2.value
but I cannot get it to work with the button
on chk2 changed state do
)
on sld1 changed state do
sld2.value=sld1.value
on sld2 changed state do
sld1.value=sld2.value
)
I know what I've done wrong in the second part but I cannot figure out how to use on events within on events. Any suggestions on how to fix it?
