# Xml menu DONE :)

**URL:** <https://forum.kirupa.com/t/xml-menu-done/38934>\
**Category:** Uncategorized\
**Created:** [January 1, 2004, 4:03am UTC](https://forum.kirupa.com/t/xml-menu-done/38934 "2004-01-01T04:03:11Z")\
**Posts on this page:** 20\
**Page:** 3

<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:** [July 13, 2004, 8:38am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/41 "2004-07-13T08:38:27Z")

</div>

I can run you movie, its either that your flash mx04 didnt convert this fla to mx properly, or the fla is corrupt.

---

<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:** [July 13, 2004, 8:50am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/42 "2004-07-13T08:50:03Z")

</div>

here try this one i dont know what happened with the other one.

---

<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:** [July 13, 2004, 9:04am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/43 "2004-07-13T09:04:19Z")

</div>

there ya go 🙂

---

<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:** [July 13, 2004, 9:10am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/44 "2004-07-13T09:10:10Z")

</div>

ibeetles its better if you use ‘setMask’ (actionscript) to mask the menu thumbs than the traditional way (layered mask). That way the fonts wont be blurry like that…

---

<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:** [July 13, 2004, 9:18am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/45 "2004-07-13T09:18:01Z")

</div>

cheers hga77 once again, lol i would like to see how many times ive said that in this tread.  
Was i only missing the word “currentThumb.” in the actionscript???

thanks for the tip on the mask too.

---

<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:** [July 13, 2004, 9:20am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/46 "2004-07-13T09:20:12Z")

</div>

well lets just say you had a few mistakes here n there 😉

---

<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:** [July 13, 2004, 9:22am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/47 "2004-07-13T09:22:30Z")

</div>

cheers, do u think it would be easy to do next and previous buttons??? im trying but having no joy at the mo, but i wont give up.

---

<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:** [July 13, 2004, 9:35am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/48 "2004-07-13T09:35:22Z")

</div>

it shouldnt be that hard…I’ll give you a hint 🙂

You know you have a variable calle ‘currentThumb’. If you trace this, you get “\_level0.instance1.menu.3” (since we clicked on thumb 3).

Now to go next or previous, we need to increment or decrement this variable. But how? We only need the number, which in our case is 3, the instance name. So to get this alone, we do this:

```auto
currentThumb._name

```

Now if you would trace this, you would only get 3. Cool. But now we have another problem. This number is not stored as integer, Its a character. This means that we cant add/subtract it. So to convert this into an int, we do this:

```auto
parseInt(currentThumb._name)

```

Now we have an integer. Add a ‘next’ and ‘previous’ button. On release of ‘next’ we would increment this value, then load image. On release on ‘previous’ we would decrement this value, then load image.

Try it and let us know 🙂

That was a big hint :hugegrin:

---

<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:** [July 13, 2004, 10:17am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/49 "2004-07-13T10:17:41Z")

</div>

would i have to make the currentThumb var a global var, cos for some reason i cant trace that var, on my next prev button.

---

<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:** [July 13, 2004, 10:19am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/50 "2004-07-13T10:19:27Z")

</div>

nope, just remove the ‘var’ in front of 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:** [July 13, 2004, 10:20am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/51 "2004-07-13T10:20:53Z")

</div>

there is no var in front of it already.

---

<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:** [July 13, 2004, 10:21am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/52 "2004-07-13T10:21:01Z")

</div>

oh wait it depends if you not assigning the button on the same time line though…post you current fla

---

<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:** [July 13, 2004, 10:23am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/53 "2004-07-13T10:23:56Z")

</div>

here it is

---

<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:** [July 13, 2004, 10:41am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/54 "2004-07-13T10:41:11Z")

</div>

yeah you need to have it as \_global. Cos you put your buttons outside the menu itself

---

<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:** [July 13, 2004, 10:57am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/55 "2004-07-13T10:57:19Z")

</div>

ive no sorted that. Now to make the increment would i need a for statement. would it be:-

for(i=0, i\<=Number\_Items; i++);

---

<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:** [July 13, 2004, 11:04am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/56 "2004-07-13T11:04:13Z")

</div>

no no you dont need a for loop! Leave it to me, i’ll do it. I’ll send in an hour, need to do other stuff now

---

<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:** [July 13, 2004, 11:05am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/57 "2004-07-13T11:05:11Z")

</div>

ok thank you very much, as you can see my actionscripting is not all that good. I will try and have a go thou without using a for loop.

---

<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:** [July 13, 2004, 11:15am UTC](https://forum.kirupa.com/t/xml-menu-done/38934/58 "2004-07-13T11:15:32Z")

</div>

im nearly there, ive managed to get the trace working correctly and its incrementing a decrementing properly. Now ive just gota sort out the loadMovie bit. 🙂  
here is the code im using now.

```auto
next_btn.onRelease = function(){ 
 currentThumb._name ++
 trace(currentThumb._name); 
 loadMovie(action, pictureHolder);
}  

```

---

<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:** [July 13, 2004, 12:44pm UTC](https://forum.kirupa.com/t/xml-menu-done/38934/59 "2004-07-13T12:44:26Z")

</div>

done 🙂

---

<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:** [July 13, 2004, 12:47pm UTC](https://forum.kirupa.com/t/xml-menu-done/38934/60 "2004-07-13T12:47:44Z")

</div>

cheers, hga77 that is perfect i really appreciate all your time an deffort you have put into this.

[Previous page](https://forum.kirupa.com/t/xml-menu-done/38934.md?page=2)

[Next page](https://forum.kirupa.com/t/xml-menu-done/38934.md?page=4)
