PDA

View Full Version : Scrollers Tutorial



liveacoustic
March 22nd, 2002, 07:54 PM
Does anyone know where there's a good tutorial on image scrollers that involves both the scroller and the buttons?

I'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.

I'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.

ilyaslamasse
March 22nd, 2002, 08:05 PM
What do you mean ??

pom 0] , qui voit que tu ne lâches pas le morceau avec tes scrollers :D

liveacoustic
March 22nd, 2002, 08:27 PM
Simply put, do you know where there's a tutorial for a scroller with buttons?

Yknow...

/\ <------ Click me!
|
|
[] <------ Move me!
|
|
\/ <------ Click me, too!

... And it can't be just for text. It has to work for images, too.

Bien sur je n'arrete pas de le demander. Je doit le savoir.

... Bien... En verité, je le sais deja. Mais le mien n'est pas parfait, et... Bien... L'imperfection n'est pas acceptable.

ilyaslamasse
March 23rd, 2002, 06:45 AM
Then make it perfect ! Can you send me the fla, I'd like to look at it.

pom 0]

liveacoustic
March 23rd, 2002, 11:59 AM
Alright, let's do it this way...

Using Pom's code for the scroller, what code would you use for the buttons?

liveacoustic
March 24th, 2002, 09:32 PM
I KNOW somebody knows the answer to this question.

Fine, I'll make it more general.

How would you use to make a scroller with buttons that works for images as well as text?

sinfiniti
March 24th, 2002, 10:52 PM
do you want the images/text to scroll in a seamless loop, or just from one edge to the other?
:)
jeremy

liveacoustic
March 25th, 2002, 01:09 PM
Edges. Vertical and edges.

RenaissanceGirl
March 25th, 2002, 03:22 PM
Check out this generic scroller tutorial: www.enetserve.com/tutoria...orial.html (http://www.enetserve.com/tutorials/scrollbartutorial.html)

They give the basics about scrollers. After this tutorial, I was able to make all kinds of scrollers for anything.

liveacoustic
March 25th, 2002, 08:13 PM
Thanks, but it's still not exactly what I'm looking for.

The most important part is the buttons. It has to have both the scroller and the buttons.

liveacoustic
March 26th, 2002, 11:45 AM
(This message was left blank)

liveacoustic
March 26th, 2002, 11:47 AM
I know somebody knows this...

ilyaslamasse
March 26th, 2002, 03:54 PM
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 ??

pom 0]

liveacoustic
March 26th, 2002, 05:27 PM
I'm still fiddling with some numbers, but yes, you're right, that seems to work.

I spent too much time assuming the answer was complicated when it was really quite obvious.

Thanks.

ilyaslamasse
March 26th, 2002, 05:33 PM
Could you post your fla ? Or show us the swf, I'd like to see it work, and what your code exactly is.

pom 0]

liveacoustic
March 26th, 2002, 05:55 PM
Well, I haven't really got it working yet, it would appear. Here's the .swf:

<a href = "http://may17th.tripod.com/whatever.html">http://may17th.tripod.com/whatever.html</a>

Only 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.

I'm using Pom's code from his tutorial. The problem is that it's too based on the location of the cursor.

I'm getting kind of annoyed with this.

I'd be very, very happy if somebody would just give me a link to a tutorial that tells me exactly how to do this.

ilyaslamasse
March 26th, 2002, 06:10 PM
I'm a try.

pom 0]
What code did you use in the buttons ??

ilyaslamasse
March 26th, 2002, 07:19 PM
That's what I managed to do. Not too bad, but not perfect...
It'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...

You can find the source <a href=http://www.multimania.com/ilyaslamasse/kirupa/endofdays2.fla>THERE</a>. Tell me what you think.
pom 0]

liveacoustic
March 27th, 2002, 05:09 PM
Thanks.

I haven't checked the .fla yet, but the .swf looks like exactly what I'm looking for.

As soon as I get this done with, I'm making a tutorial for it.

I can't believe I couldn't find a single tutorial for this on the entire internet.

It's got to be one of the most practical things on earth.

ilyaslamasse
March 27th, 2002, 05:19 PM
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.

pom 0]

There's also a problem of alignement, as I don't seem to allow the scroller to go to the right extremity of the bar.

liveacoustic
March 27th, 2002, 05:35 PM
Yeah, but I think I can get past that.

One thing that still drives me insane... Even on yours, when you click on the scroller it moves slightly based on the location of your mouse.

There has to be some way to do this with just startDrag... That way that wouldn't happen... It would stay nice and immobile until you dragged it yourself...

liveacoustic
March 28th, 2002, 07:58 PM
I can't pull it off. Too many movie clips. The X and Y values get all messed up.

Anybody who wants a crack at the .fla, give me your e-mail and I'll send it to you.

I need this done, but I can't get it working...

ilyaslamasse
March 29th, 2002, 06:27 AM
What's the prob, Bob ?
pom 0]

liveacoustic
March 29th, 2002, 08:37 AM
Simply put, I still haven't gotten it working perfectly. Actually, now I'm further off than ever.

The real problem is that when the program looks at the x and y values of the scroller, they're all in a huge complicated mesh of movie clips that gives them weird, inconstant x and y values that don't work very well together.

ilyaslamasse
March 29th, 2002, 10:13 AM
Are you talking about my fla ? I don't remember putting clips all around the place...

pom 0]

liveacoustic
March 29th, 2002, 11:28 AM
No, I'm talking about my .fla. It's covered with clips, and they're all completely necessary.

ilyaslamasse
March 29th, 2002, 08:58 PM
I don't know how I can help. Good luck then...

pom 0]

liveacoustic
March 29th, 2002, 09:03 PM
Well that sucks.

Oh well. It's not the most important section. I'll just perfect everything else and procrastinate until I feel like doing it.