# Scrollers Tutorial

**URL:** <https://forum.kirupa.com/t/scrollers-tutorial/2470>\
**Category:** flash\
**Created:** [March 22, 2002, 11:54pm UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470 "2002-03-22T23:54:17Z")\
**Posts on this page:** 20\
**Page:** 1

<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:** [March 22, 2002, 11:54pm UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/1 "2002-03-22T23:54:17Z")

</div>

Does anyone know where there’s a good tutorial on image scrollers that involves both the scroller and the buttons?\r\rI’ve got mine working, but there are some minor imperfections that I’d like to improve upon and I was wondering how other people would go about doing some parts.\r\rI’ve looked and looked for one of these, but they all either only have the scroller or only have the buttons or only work for text.

---

<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:** [March 23, 2002, 12:05am UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/2 "2002-03-23T00:05:34Z")

</div>

What do you mean ??\r\rpom 0] , qui voit que tu ne lâches pas le morceau avec tes scrollers 😃

---

<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:** [March 23, 2002, 12:27am UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/3 "2002-03-23T00:27:39Z")

</div>

Simply put, do you know where there’s a tutorial for a scroller with buttons?\r\rYknow…\r\r/\ \<------ Click me!\r|\r|\r[] \<------ Move me!\r|\r|\r/ \<------ Click me, too!\r\r… And it can’t be just for text. It has to work for images, too.\r\rBien sur je n’arrete pas de le demander. Je doit le savoir.\r\r… Bien… En verité, je le sais deja. Mais le mien n’est pas parfait, et… Bien… L’imperfection n’est pas acceptable.

---

<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:** [March 23, 2002, 10:45am UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/4 "2002-03-23T10:45:00Z")

</div>

Then make it perfect ! Can you send me the fla, I’d like to look at it.\r\rpom 0]

---

<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:** [March 23, 2002, 3:59pm UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/5 "2002-03-23T15:59:22Z")

</div>

Alright, let’s do it this way…\r\rUsing Pom’s code for the scroller, what code would you use for the buttons?

---

<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:** [March 25, 2002, 1:32am UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/6 "2002-03-25T01:32:35Z")

</div>

I KNOW somebody knows the answer to this question.\r\rFine, I’ll make it more general.\r\rHow would you use to make a scroller with buttons that works for images as well as text?

---

<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:** [March 25, 2002, 2:52am UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/7 "2002-03-25T02:52:40Z")

</div>

do you want the images/text to scroll in a seamless loop, or just from one edge to the other?\r:) \rjeremy

---

<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:** [March 25, 2002, 5:09pm UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/8 "2002-03-25T17:09:57Z")

</div>

Edges. Vertical and edges.

---

<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:** [March 25, 2002, 7:22pm UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/9 "2002-03-25T19:22:22Z")

</div>

Check out this generic scroller tutorial: [www.enetserve.com/tutoria…orial.html](http://www.enetserve.com/tutorials/scrollbartutorial.html)\r\rThey give the basics about scrollers. After this tutorial, I was able to make all kinds of scrollers for anything.

---

<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:** [March 26, 2002, 12:13am UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/10 "2002-03-26T00:13:26Z")

</div>

Thanks, but it’s still not exactly what I’m looking for.\r\rThe most important part is the buttons. It has to have both the scroller and the buttons.

---

<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:** [March 26, 2002, 3:45pm UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/11 "2002-03-26T15:45:58Z")

</div>

(This message was left blank)

---

<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:** [March 26, 2002, 3:47pm UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/12 "2002-03-26T15:47:11Z")

</div>

I know somebody knows this…

---

<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:** [March 26, 2002, 7:54pm UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/13 "2002-03-26T19:54:34Z")

</div>

OK, let’s say that your buttons make the movie move by 10 pixels, up or down. Hypothetically, all you’d have to do is divide the space between the buttons into small areas, 10 pixels wide, and when you actually stop dragging the scroller, it goes to the closest area. Does that make any sense ??\r\rpom 0]

---

<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:** [March 26, 2002, 9:27pm UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/14 "2002-03-26T21:27:20Z")

</div>

I’m still fiddling with some numbers, but yes, you’re right, that seems to work.\r\rI spent too much time assuming the answer was complicated when it was really quite obvious.\r\rThanks.

---

<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:** [March 26, 2002, 9:33pm UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/15 "2002-03-26T21:33:54Z")

</div>

Could you post your fla ? Or show us the swf, I’d like to see it work, and what your code exactly is.\r\rpom 0]

---

<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:** [March 26, 2002, 9:55pm UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/16 "2002-03-26T21:55:35Z")

</div>

Well, I haven’t really got it working yet, it would appear. Here’s the .swf:\r\r\<a href = “[http://may17th.tripod.com/whatever.html](http://may17th.tripod.com/whatever.html)”\>[http://may17th.tripod.com/whatever.html](http://may17th.tripod.com/whatever.html)\</a\>\r\rOnly the up-button and the scroller work right now. Click on the up-button for a while, then click on the scroller. You’ll see the problem.\r\rI’m using Pom’s code from his tutorial. The problem is that it’s too based on the location of the cursor.\r\rI’m getting kind of annoyed with this.\r\rI’d be very, very happy if somebody would just give me a link to a tutorial that tells me exactly how to do this.

---

<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:** [March 26, 2002, 10:10pm UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/17 "2002-03-26T22:10:54Z")

</div>

I’m a try.\r\rpom 0] \rWhat code did you use in the buttons ??

---

<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:** [March 26, 2002, 11:19pm UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/18 "2002-03-26T23:19:52Z")

</div>

That’s what I managed to do. Not too bad, but not perfect…\rIt’s really very close to the tutorial, so I don’t think you’re gonna have trouble understnding it. I added an array prototype in the “code” frame, the one given by Supra to find the nearest value. The rest is silence…\r\rYou can find the source \<a href=http://www.multimania.com/ilyaslamasse/kirupa/endofdays2.fla\>THERE\</a\>. Tell me what you think.\rpom 0]

---

<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:** [March 27, 2002, 9:09pm UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/19 "2002-03-27T21:09:21Z")

</div>

Thanks.\r\rI haven’t checked the .fla yet, but the .swf looks like exactly what I’m looking for.\r\rAs soon as I get this done with, I’m making a tutorial for it.\r\rI can’t believe I couldn’t find a single tutorial for this on the entire internet.\r\rIt’s got to be one of the most practical things on earth.

---

<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:** [March 27, 2002, 9:19pm UTC](https://forum.kirupa.com/t/scrollers-tutorial/2470/20 "2002-03-27T21:19:53Z")

</div>

Actually, I’ve made it much more difficult that it could have been, because of that \*\* pitch\*\* thing. It works very well for small values of pitch, although the speed of the scroll is way too high, but for high values of pitch, it’s totally useless. You’ll see, I hope, because it’s a real mess.\r\rpom 0] \r\rThere’s also a problem of alignement, as I don’t seem to allow the scroller to go to the right extremity of the bar.

[Next page](https://forum.kirupa.com/t/scrollers-tutorial/2470.md?page=2)
