# Sliding bar

**URL:** https://forum.kirupa.com/t/sliding-bar/18649
**Category:** flash
**Created:** [April 18, 2003, 11:43pm UTC](https://forum.kirupa.com/t/sliding-bar/18649 "2003-04-18T23:43:16Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![thekok](https://avatars.discourse-cdn.com/v4/letter/t/9e8a1a/32.png) [@thekok](https://forum.kirupa.com/u/thekok)
#### Post date: [April 18, 2003, 11:43pm UTC](https://forum.kirupa.com/t/sliding-bar/18649/1 "2003-04-18T23:43:16Z")

</div>

Still here asking x help.  
Hi everyone,  
I got some problems with the dimension of a series of pics that are suppose to slide.  
Some details:  
Simple layout, Stage size 400w X 300h  
45 x 400 bottom bar for 14 buttons ( so r the pics)  
400 x 255 usable space to slide the pics  
every button has an action like that:

on (release) {  
\_root.controller.targXpos2 = 1500;  
}

the last number, the x position make me going crazy, I know it should be easy but I can handle 14 pics moving around x the stage ( 5230 pixel width )

---------Actions x the controller: -----------

onClipEvent (enterFrame) {  
setProperty(\_root.bar, \_x, cX-(difX/14));  
cX2 = \_root.content.\_x;  
difX2 = cX2-targXpos2;  
setProperty(\_root.content, \_x, cX2-(difX2/14));  
}  
onClipEvent (load) {  
targXpos = 65;  
targXpos2 = 2615;  
}

Does any one can help me understand how i can calculate the right number for every button so all the pics will be showed centered.  
glad to give u more details if u need.  
There is also a bar following the mouse over the button but i will take it away.  
sorry if all this sound stupid but i am quite new to AS .  
good Easter:pope:

---

<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: [April 19, 2003, 12:08am UTC](https://forum.kirupa.com/t/sliding-bar/18649/2 "2003-04-19T00:08:59Z")

</div>

i am on line if u need some more details … 🙂

---

<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: [April 20, 2003, 3:25am UTC](https://forum.kirupa.com/t/sliding-bar/18649/3 "2003-04-20T03:25:41Z")

</div>

i’m not sure what you mean by making them show centered…:-\

---

<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: [April 20, 2003, 10:37am UTC](https://forum.kirupa.com/t/sliding-bar/18649/4 "2003-04-20T10:37:38Z")

</div>

first of all thanks x your interest, after two days i was givin’ up.  
With centered i mean that my stage w. is 400px and the "content "which is suppose to slide is around 5000px.  
I need to find the key to assign to every button the right \_x position but as i said B4 i am not so good with A.S.  
there is a downlodable sample at [www.yahoo.com](http://www.yahoo.com)  
I.D. = [justxtheslider@yahoo.com](mailto:justxtheslider@yahoo.com)  
password = ssssssss  
TONS oF THanks x your TIME & Interest  
good Easter  
ciao

---

<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: [April 20, 2003, 10:40am UTC](https://forum.kirupa.com/t/sliding-bar/18649/5 "2003-04-20T10:40:20Z")

</div>

i can’t seem to find it on yahoo? Do you think you can put it on the forum?

---

<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: [April 20, 2003, 10:44am UTC](https://forum.kirupa.com/t/sliding-bar/18649/6 "2003-04-20T10:44:42Z")

</div>

2 mins

---

<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: [April 20, 2003, 10:47am UTC](https://forum.kirupa.com/t/sliding-bar/18649/7 "2003-04-20T10:47:43Z")

</div>

try now  
[http://mail.yahoo.com/](http://mail.yahoo.com/)

I D = justxtheslider

Psw = ssssssss

---

<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: [April 20, 2003, 10:52am UTC](https://forum.kirupa.com/t/sliding-bar/18649/8 "2003-04-20T10:52:28Z")

</div>

i’m nto sure whats wrong, but one of the file is zip which i can’t open, and the other one seems to not be an fla when i open the zip…?!

---

<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: [April 20, 2003, 10:54am UTC](https://forum.kirupa.com/t/sliding-bar/18649/9 "2003-04-20T10:54:04Z")

</div>

2 mins

---

<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: [April 20, 2003, 10:57am UTC](https://forum.kirupa.com/t/sliding-bar/18649/10 "2003-04-20T10:57:10Z")

</div>

one of the files were 170kb, i’m sure that’d fit onto this forum…just stick it here, much quicker and easier

---

<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: [April 20, 2003, 11:01am UTC](https://forum.kirupa.com/t/sliding-bar/18649/11 "2003-04-20T11:01:50Z")

</div>

is just a zipped fla, is all right with u ??

---

<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: [April 20, 2003, 11:02am UTC](https://forum.kirupa.com/t/sliding-bar/18649/12 "2003-04-20T11:02:46Z")

</div>

max 100 x this forum … : (

---

<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: [April 20, 2003, 11:04am UTC](https://forum.kirupa.com/t/sliding-bar/18649/13 "2003-04-20T11:04:24Z")

</div>

oh…hm…

---

<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: [April 20, 2003, 11:07am UTC](https://forum.kirupa.com/t/sliding-bar/18649/14 "2003-04-20T11:07:35Z")

</div>

any other place where i can post this ugly stuff ??

---

<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: [April 20, 2003, 11:10am UTC](https://forum.kirupa.com/t/sliding-bar/18649/15 "2003-04-20T11:10:17Z")

</div>

was the size still overlimit with it zipped? hmm…dunno, sorry ☹

---

<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: [April 20, 2003, 11:11am UTC](https://forum.kirupa.com/t/sliding-bar/18649/16 "2003-04-20T11:11:44Z")

</div>

yes ! and ill be glad if u can see the fla with the original pics on it

any suggestion ?

---

<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: [April 20, 2003, 2:59pm UTC](https://forum.kirupa.com/t/sliding-bar/18649/17 "2003-04-20T14:59:37Z")

</div>

here is the .fla  
i took out all the pics and put some simple shapes instead.  
Many thanks to any kind of suggestion u can make!  
enjoy the egs  
:battery: :battery: :battery:
