# Fmx - sliding menu AS question

**URL:** <https://forum.kirupa.com/t/fmx-sliding-menu-as-question/21218>\
**Category:** Uncategorized\
**Created:** [May 19, 2003, 3:06am UTC](https://forum.kirupa.com/t/fmx-sliding-menu-as-question/21218 "2003-05-19T03:06:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dr\_ew](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@dr\_ew](https://forum.kirupa.com/u/dr_ew)\
**Post date:** [May 19, 2003, 3:06am UTC](https://forum.kirupa.com/t/fmx-sliding-menu-as-question/21218/1 "2003-05-19T03:06:27Z")

</div>

Hi,  
I have a few q’s about the sliding menu tutorial by Ilyas…  
[http://www.kirupa.com/developer/flash5/slidingmenu.htm](http://www.kirupa.com/developer/flash5/slidingmenu.htm)

I’ve done a search, and found a few good replies, but i still don’t completely understand the code well enough to be able to modify it for more clips, or different sizes…

ok, so AS on the clipgeneral mc:  
onClipEvent (load) {  
\_root.xnew = \_root.mask2.\_x + (4-1)\*100/2 ;  
}

So, (i think…) that the \*100 refers to the clip size (of each of the images) so if my images were, say, 300px wide, i’d change this # to 300?  
And, after reading a few posts on the tute, the (4-1) refers to the number of clips total? (so, if there were 10, it’d be 10-1…)

In the buttons, this second line is also used, but the (4-1) changes as you move through the images: 4 decreases by 2 each clip. Would this also be true if i had 10 clips? (10-1, 8-1, 6-1,…)  
Why? I don’t understand the logic here…  
I guess what I’m asking is for someone to explain this line of code in relation to # of clips and width of clips.  
Thanks a bunch!!
