# Check var

**URL:** <https://forum.kirupa.com/t/check-var/174292>\
**Category:** Uncategorized\
**Created:** [January 4, 2006, 1:09pm UTC](https://forum.kirupa.com/t/check-var/174292 "2006-01-04T13:09:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snake\_NL](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@Snake\_NL](https://forum.kirupa.com/u/Snake_NL)\
**Post date:** [January 4, 2006, 1:09pm UTC](https://forum.kirupa.com/t/check-var/174292/1 "2006-01-04T13:09:43Z")

</div>

hi,

i have made a small test for myself for checking vars.

i have made 3 buttons:

- green
- blue
- send

they al stand on frame 1. on frame 10 stands a var text field named “blok” and on frame 15 stand the text “error try again”.

On frame 1 stands this script:

```auto
stop();
_root.blok = "none";

```

When you press the green button and then the send button you go to frame 10 and in the text field appears “green”. (same with the blue one)

But when you press inmidiatly the send button you must go to frame 15 that shows the error.

it works fine with this script: (but only for 1 color)

```auto
on (release) {
    if (blok eq "green") {
        gotoAndStop(15);
    } else {
        blok = "";
        gotoAndStop(30);
    }
}

```

How can i make this work for more colors? Or do i need another script for that?

thx,

Snake
