How is bitmap change " if two slider ranges do 50 and 100 then bmp1 will change"

if two slider ranges do 50 and 100 then bmp1 will change. how is it do?

rollout ck "test" width:200 height:250
(
	slider sld1 "Slider" pos:[48,10] width:136 height:44 range:[0,100,$.morpher[1].value]
	slider sld2 "Slider" pos:[48,60] width:136 height:44 range:[0,100,$.morpher[2].value]
	bitmap bmp1 "Bitmap" pos:[30,120] width:152 height:120 fileName:((getDir #ui) + "\\ame\\Patches_24i.bmp")
on sld1 and sld2 changed mrph2 do   --where is eror--	
	(
	    mrph2=$.morpher[1].value or $.morpher[2].value --where is eror--
  	    SliderTime +=0
 
if mrph1=50  and mrph1=100 and mrph2=50  and mrph1=100 then --where is eror--
		(
		bmp1.filename=(getDir #ui) + "\\ame\\AtmosApp_24i.bmp"
		)
	)	
)
registertimecallback --how is it do?--
createdialog ck

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
decapitator's picture

Hope this helps its kind of

Hope this helps its kind of hard to figure out what exactly your trying to do with your bad explanation (the language barrier) what this does is just change the img when the sliders are 50 and 100.

rollout ck "test" width:200 height:250
(
	slider sld1 "Slider                  " pos:[48,10] width:136 height:44 type:#integer range:[0,100,0]
	slider sld2 "Slider                  " pos:[48,60] width:136 height:44 type:#integer range:[0,100,100]
 
	bitmap bmp1 "Bitmap" pos:[30,120] width:152 height:120 fileName:((getDir #ui) + "ame\\AtmosApp_24i.bmp")
 
	fn sldChange sld =
	(
		sld.caption = "Slider (" + sld.value as string + ")"
		if (sld1.value == 50 AND sld2.value == 100) OR (sld1.value == 100 AND sld2.value == 50) then bmp1.filename = (getDir #ui) + "ame\\AtmosApp_24a.bmp"
		else bmp1.filename = (getDir #ui) + "ame\\AtmosApp_24i.bmp"
	)
 
	on sld1 changed val do sldChange sld1
	on sld2 changed val do sldChange sld2
)
createdialog ck

And for the timecallback

fn time_p = print currentTime
registerTimeCallback time_p

As quoted from the manual look at "Time Change Callback" its quite simple. it just triggers the function name in this case time_p every time there is a change in the timeline's time.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.