# Menu Help

**URL:** <https://forum.kirupa.com/t/menu-help/20760>\
**Category:** Uncategorized\
**Created:** [May 13, 2003, 5:27am UTC](https://forum.kirupa.com/t/menu-help/20760 "2003-05-13T05:27:00Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 12:57am UTC](https://forum.kirupa.com/t/menu-help/20760/21 "2003-05-15T00:57:39Z")

</div>

yet for some odd reason I am not all here today. I haven’t used flash for a few months, started again 2 days ago. Trying to remember some of the code but its not coming…

if ( j = 5; ) {

lol idk anymore too much in my head…

for some reason now the rollover doesnt work…gg.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 1:08am UTC](https://forum.kirupa.com/t/menu-help/20760/22 "2003-05-15T01:08:09Z")

</div>

to check if a variable is equal to something or not you use ==

= is to set a variable/property/whatever to equal something

== is to check if it equals something

=== is strict equality (meaning “1” is not the same as 1 and such)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 1:12am UTC](https://forum.kirupa.com/t/menu-help/20760/23 "2003-05-15T01:12:08Z")

</div>

ok, now to set it to the text box…and can u suggest some books, or other actionscript advanced tuts…so i can refresh and learn all the things u kno 😃

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 1:16am UTC](https://forum.kirupa.com/t/menu-help/20760/24 "2003-05-15T01:16:18Z")

</div>

Umm, I’ve never read any AS books so I can’t really recommend any from experience, but I hear Actionscript Definitive Guide 2 (MX) by Colin Moock is a very good source for getting acquainted with AS.

I personally am in love with the AS Reference inside Flash (Window/Reference), this forum, site site, and sometimes I wander over to the [Bit-101.com](http://Bit-101.com) forums and the [FlashDevils.com](http://FlashDevils.com) forums. And every now and then I check out Flashkit (not the forums but the tutorials).

If I don’t find what I need at any of those sources I turn to my friend [google.com](http://google.com) 😉 Or I work my arse off to figure it out myself (good learning experience)

[edit]Oh yeah, and the online version of the Actionscript Reference (aka Actionscript Dictionary) can be found here…

[http://www.macromedia.com/support/flash/action\_scripts\_dict.html](http://www.macromedia.com/support/flash/action_scripts_dict.html)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 1:19am UTC](https://forum.kirupa.com/t/menu-help/20760/25 "2003-05-15T01:19:12Z")

</div>

basically what u said is how I learned mostly what I did, but asdf I cant get the blasdf thing to work…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 1:24am UTC](https://forum.kirupa.com/t/menu-help/20760/26 "2003-05-15T01:24:41Z")

</div>

I forgot to incorporate the rollover color change into my version of this script so I did that just now. It turns out to be a bit more complex than I had thought. So after you figure out the last one to “X” thing I will show you how to do the rollOver 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 1:26am UTC](https://forum.kirupa.com/t/menu-help/20760/27 "2003-05-15T01:26:27Z")

</div>

lol im so confused…i have tried all that I kno but i just seem to not get it. I will be back in about 40 min then I will try again. Hey man, do u still have ur aim name or?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 1:36am UTC](https://forum.kirupa.com/t/menu-help/20760/28 "2003-05-15T01:36:04Z")

</div>

Yeah I still have my AIM name, but I am rarely ever on it.

I will try and say it more clearly and maybe it will help you out…

Inside the for loop that labels the buttons (the one that uses “j” for its variable)…

if j is equal to 5, set the text label to be “X” else set the text label to be j (as in the value of the variable not the letter)

You can use the for loop that uses the variable “i” (in the pressed prototype function) as a reference on how to target the textbox if you need to, they use similar methods 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 2:23am UTC](https://forum.kirupa.com/t/menu-help/20760/29 "2003-05-15T02:23:25Z")

</div>

k lemme try it

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 2:36am UTC](https://forum.kirupa.com/t/menu-help/20760/30 "2003-05-15T02:36:21Z")

</div>

asdf…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 4:12am UTC](https://forum.kirupa.com/t/menu-help/20760/31 "2003-05-15T04:12:39Z")

</div>

is there a tutorial for this, its kinda hard to follow along.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 4:46am UTC](https://forum.kirupa.com/t/menu-help/20760/32 "2003-05-15T04:46:11Z")

</div>

nope, were actually testing something as we go I guess?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 4:52am UTC](https://forum.kirupa.com/t/menu-help/20760/33 "2003-05-15T04:52:43Z")

</div>

Precisely 😉 No tutorials that I know of.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 5:36am UTC](https://forum.kirupa.com/t/menu-help/20760/34 "2003-05-15T05:36:52Z")

</div>

still trying, what I think it is I am getting a error, so poop.

```auto
if (var j == 5) {
		this.button5.numLabel.text = X;
}

```

but I am getting a error.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 6:12am UTC](https://forum.kirupa.com/t/menu-help/20760/35 "2003-05-15T06:12:01Z")

</div>

X is read as a variable. Since the variable X doesn’t exist you can’t do that. Where “X” is a string (text)… so the quotes make all the difference here.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 12:10pm UTC](https://forum.kirupa.com/t/menu-help/20760/36 "2003-05-15T12:10:03Z")

</div>

I get Unexpect “!” occured? Well poop

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 4:05pm UTC](https://forum.kirupa.com/t/menu-help/20760/37 "2003-05-15T16:05:12Z")

</div>

It should tell you want line it is on, check that line and see if everything looks fine.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 8:01pm UTC](https://forum.kirupa.com/t/menu-help/20760/38 "2003-05-15T20:01:03Z")

</div>

Error is here:

Scene=Scene 1, Layer=actions, Frame=1: Line 21: Unexpected ‘!’ encountered  
if (var j == 5) {

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 8:12pm UTC](https://forum.kirupa.com/t/menu-help/20760/39 "2003-05-15T20:12:45Z")

</div>

get rid of “var” in the if statement. I didn’t even notice that was there before. It should be if (j == 5).

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 15, 2003, 8:17pm UTC](https://forum.kirupa.com/t/menu-help/20760/40 "2003-05-15T20:17:15Z")

</div>

the error goes away but the X doesnt show its a 5

[Previous page](https://forum.kirupa.com/t/menu-help/20760.md?page=1)

[Next page](https://forum.kirupa.com/t/menu-help/20760.md?page=3)
