Help with Check Box and Slider

Is there a tutorial or example for the slider and checkbox tools.

I am trying to figure out the commands that return the slider bar and check box status?

You mean on and off status? Here ya go
Slider and Checkbox.wick (4.0 KB)
Use a variable or a global variable project.variable_name if other object will also use the variable

1 Like

Thanks for the example…I am not clear how you get the value of the slider bar (the one that is in the asset library). I tried mySliderName.value

image

I found one solution: Prefer to get it from the slider though…
-go into the slider and click on the blue button
-then click the “update” script.
you will see this

if(!isMouseDown()) {
this._dragging = false;
}

if(this._dragging) {
this.x = mouseX - this.parentClip.x;
if(this.x < -this._bounds) {
this.x = -this._bounds;
}
if(this.x > this._bounds) {
this.x = this._bounds;
}
this.value = (this.x + this._bounds) / this._bounds * 2;
project.speed.setText(this.value);
}

INSERT code after this.value = (this.x + this._bounds) / this._bounds * 2;
project.speed.setText(this.value); (i used it in a text box named “speed” for now… later i will make it a variable…

1 Like