PDA

View Full Version : Scroller by Claudio



Pages : 1 [2]

hoteurochick
December 2nd, 2005, 01:10 AM
Scroller by Claudio works just fine,
BUT used in external movie, which loads into the main movie (each button in the main movie has a name as btn1, btn2, etc, on the command:

for (i=1; i<12; i++) {
this["btn"+i].file = "ext_"+i+"_mov.swf";
this["btn"+i].onPress = mypress;
}
function mypress() {
clearInterval(preloader.interval);
trace(this.file)
container.loadMovie(this.file);
preloader.interval = setInterval(preloader, 50, container, "function2");
}



does not work at first, shows up, but its "frozen". After I click other buttons , and then come back, then it works just fine. i tried to change a movie name, etc, but did not help. ***

update:
ok so i mooved out all scroll's content with its AS from the first frame, seems to work fine now.

kingofnukes
December 5th, 2005, 10:14 PM
Hi, love the scroller, does anyone know the code to make it blur when it scrolls. I saw it done on gotoandlearn.com,but it didnt say how to do it.

Thanx

TheCanadian
December 6th, 2005, 02:17 AM
Sure, it's fairly simple :).

kingofnukes
December 6th, 2005, 02:34 AM
kool thanx. You should be a moderator or something. :king:

TheCanadian
December 6th, 2005, 02:49 AM
Glad I could help :hoser:.

Mage
December 7th, 2005, 05:52 PM
Hey'a, I think this scroller is fantastic! Exactly what I was after just one little querey.

As a usabilty thing, is there anyway to create the 'pointing hand' when you mouse over the dragable scroller part.

I'm removin the arrows and would just like to be able to drag the scroller. But feel in order for some (less knowledgeble internet users) it is optimal to have the 'pointing hand' to clarify it is a clickable object.

Cheers :D!

TheCanadian
December 8th, 2005, 05:19 PM
Simply remove this line :):


bar.useHandCursor = dragger.useHandCursor = false;

illamc
December 8th, 2005, 06:55 PM
Simply remove this line :):


Well done TheCanadian! That's prob a very good idea. It's amazing how dumb some people can be online, especially when things are so customised.

I'm having problems opening your blur effect scrollbar. Is it Flash8?
Any chance you could post up a MX04 version?

cheers :pleased:

kingofnukes
December 8th, 2005, 10:19 PM
The blur effect actually uses the blur filter (new to flash 8) and shouldn't be able to be placed in lower versions.

TheCanadian
December 8th, 2005, 10:59 PM
I'm having problems opening your blur effect scrollbar. Is it Flash8?
Any chance you could post up a MX04 version?
Sorry, like kingofnukes said, the filter classes were introduced in Flash 8 so they will not work with earlier versions of Flash Player.

illamc
December 9th, 2005, 04:53 AM
ahhh. of course!! :hat:
Never mind.
Think I'd better upgrade soon.
Thanks anyway guys.

AgentFitz
December 9th, 2005, 10:54 AM
hey guys, I'm using the superb claudio scroller, but it's doing something weird and I wanted to see if you guys could offer up some advice.

check out the presentation here:

www.goelst.com/rep_intro.swf

ok, now advance to the second slide and scroll the scroller all the way down and leave it there. now advance to the third page. notice the scroller is stuck in the down position?

now start over and go back to the second page and slide it only half way down and then move on to third page. see how it's not stuck now?

why is it that the scroller gets stuck, but only when the user scrolls it all the way down?

much love and thank you!!

illamc
December 9th, 2005, 11:51 AM
Hey. Maybe it's to do with that problem with having 2 scrollers on one page. I guess 2 in one SWF is the same.

Try looking at the example of 2 scrollers on 1 page. Page 16.

Mvespa
December 12th, 2005, 07:38 AM
Hi! I'm using Claudio ScrollBar, but I have a huge text do scroll and at the end it the text desapear. Why?

Somebody can help me? Thanks!

AgentFitz
December 12th, 2005, 08:06 AM
Hey. Maybe it's to do with that problem with having 2 scrollers on one page. I guess 2 in one SWF is the same.

Try looking at the example of 2 scrollers on 1 page. Page 16.

thanks bro, I'll check it out.

TheCanadian
December 12th, 2005, 07:17 PM
Hi! I'm using Claudio ScrollBar, but I have a huge text do scroll and at the end it the text desapear. Why?

Somebody can help me? Thanks!
For some reason Flash isn't getting the right value from the height property of your main movie clip. You may have to manually set the height of it:


bottom = main._y + mask_mc._height - 5719.5 - space;

davezbox
December 13th, 2005, 10:58 AM
When I embed this scroller MC into my Main MC it, the text doesn't show. It only works as a stand alone MC. Anyone have any ideas?

TheCanadian
December 14th, 2005, 12:54 AM
You'll have to change the paths to the movie clips. Or more simply put all of the code into the frame of your Main MC where the scrollbar is located.

Sarah_h
December 14th, 2005, 03:43 AM
Ok, I'm a newbie flashie looking to find some scroller code to customise and learn from. I've a couple of questions about Claudio's scroller:

1. Can I read text from a text file? If so what format must the file contents take?

2. Can I style the text i.e. <b>Some text</b>, or <i>Some text</i> or add a link <a href="www.google.com">A link to Google</a>

Sarah

illamc
December 14th, 2005, 05:42 AM
Ok, I'm a newbie flashie looking to find some scroller code to customise and learn from. I've a couple of questions about Claudio's scroller:

1. Can I read text from a text file? If so what format must the file contents take?

2. Can I style the text i.e. <b>Some text</b>, or <i>Some text</i> or add a link <a href="www.google.com">A link to Google</a>

Sarah

This should do the trick.
Edit the txt file and it will change the content of the scroller. HTML tags work too.
Be sure to leave the:
newsinfo= in at the start. :smirk:

davezbox
December 14th, 2005, 10:22 AM
You'll have to change the paths to the movie clips. Or more simply put all of the code into the frame of your Main MC where the scrollbar is located.

THANK YOU!

illamc
December 14th, 2005, 01:10 PM
perhaps you have stretched the textbox or the movie clip.
I think you must manualy make the text box the size you want rather than stretch it.
The size in the transform window should be 100%.

Maybe reset the textbox to 100%, then double click on the text box and resize it with the corner bit.

Hope that helps

Sarah_h
December 14th, 2005, 01:21 PM
perhaps you have stretched the textbox or the movie clip.
I think you must manualy make the text box the size you want rather than stretch it.
The size in the transform window should be 100%.

Maybe reset the textbox to 100%, then double click on the text box and resize it with the corner bit.

Hope that helps

Yes, I think that helped, the transform numbers wern't 100% but now they are so, fingers crossed! Thanks for all your help with this.

Sarah_h
December 14th, 2005, 01:54 PM
Ok, final question I think! The text file now includes links like this:

<a href="http://www.google.com">Google</a>

The hand appears on hover, but when I click nothing happens! I've tried adding a target but no go. It works when testing within flash but when I place the swf in another html document no go. Also I get no underline under the link either. Any advice on these things?

jimjiminyjimjim
December 14th, 2005, 02:15 PM
Can someone help me change the code of this scroller so that I can have two working side by side at the same time?

I've tried putting them side by side but they aren't working - I persume this is because they share the same variables and instance names. I've tried changing the second scrollbar code and instance names but the problem is I don't understand the actionscript well enough and end up not having the new one work at all - even on its own.

Please can someone help me do this
.
Thanks very much.

illamc
December 14th, 2005, 06:56 PM
Ok, final question I think! The text file now includes links like this:

<a href="http://www.google.com">Google</a>

The hand appears on hover, but when I click nothing happens! I've tried adding a target but no go. It works when testing within flash but when I place the swf in another html document no go. Also I get no underline under the link either. Any advice on these things?

Hi Sarah.
It seems to work fine when within an html for me. So I'm not sure why it's not working for you. Maybe it's something to do with your html. I just used the publish settings in flash to make my html and it worked ok.

As for the underlined thing. Why don't you just add a <u> tag to it?

good luck!! :afro:

illamc
December 14th, 2005, 06:58 PM
Can someone help me change the code of this scroller so that I can have two working side by side at the same time?

I've tried putting them side by side but they aren't working - I persume this is because they share the same variables and instance names. I've tried changing the second scrollbar code and instance names but the problem is I don't understand the actionscript well enough and end up not having the new one work at all - even on its own.

Please can someone help me do this
.
Thanks very much.

Hey Jim. Have a look at page 16 of this thread. There is an example of 2 scrollers on one page there. :elderly:

zeko
December 14th, 2005, 09:11 PM
Hi all,

I'm really new to Flash so i need some help. I used Claudio's scroller and i added some buttons and stuff. Now i have really hard time to figure how to load external *.jpg images to a empty container MC. I used some code but nothing happens. :puzzle:


but1.onRelease = function(){
var MyMCL:MovieClipLoader = new MovieClipLoader ();
MyMCL.loadClip("pic1.jpg","container");
};
Link to fla (flash 8) http://www.zeko.100megs22.com/flash/scrollbar_2.fla
Please help me if u can.
Thx

TheCanadian
December 14th, 2005, 11:27 PM
THANK YOU!
Welcome :hoser:.

Sarah_h
December 15th, 2005, 02:29 AM
Hi Sarah.
It seems to work fine when within an html for me. So I'm not sure why it's not working for you. Maybe it's something to do with your html. I just used the publish settings in flash to make my html and it worked ok.

As for the underlined thing. Why don't you just add a <u> tag to it?

good luck!! :afro:

Thanks for taking the time to get back to me on this frustrating point. I cannot get it to work at all unless it's within the flash environment i.e. ctrl/enter (test). Then I can launch the link. And even within Flash I get no underlines with the <u></u>. What version of flash are you using and what are you publishing out to? Would you mind if I sent you the fla to test your end?

Sarah_h
December 15th, 2005, 02:47 AM
Thanks for taking the time to get back to me on this frustrating point. I cannot get it to work at all unless it's within the flash environment i.e. ctrl/enter (test). Then I can launch the link. And even within Flash I get no underlines with the <u></u>. What version of flash are you using and what are you publishing out to? Would you mind if I sent you the fla to test your end?

Typical, I posted that last message a bit too soon!

I found the main problem: Using Flash 8 I made sure that the global security settings allowed communication between the flash file and the index/text file. After I'd added the swf to the allowed it then worked! This I think is a Flash 8 thing.

The underline is resolved by using <u></u> tags.

Is there anyway to use styles with the text from the file? I was thinking in particular link hovers etc. I tried but flash ignores them.

TheCanadian
December 15th, 2005, 06:55 PM
Is there anyway to use styles with the text from the file? I was thinking in particular link hovers etc. I tried but flash ignores them.
You can use CSS with text fields rendering text as html. Take a look at the attached example of loading an external style sheet.

Sarah_h
December 16th, 2005, 02:42 AM
You can use CSS with text fields rendering text as html. Take a look at the attached example of loading an external style sheet.

Thanks, to apply the style sheet to dynamic text from a text file I guess I could use something like this:

var myStyle = new TextField.StyleSheet();
var cssLocation = "flash_style.css";
myStyle.onLoad = function(ok) {
if (ok) {
// If the style sheet loaded without error,
// then assign it to the text object,
// and assign the HTML text to the text field.// make sure that the Text Area Component has HTML set to "true"
myTxt.styleSheet = myStyle;
myTxt.text = newsinfo; // newsinfo is the name of the textfile
} else {
// error message
trace("The Style Sheet has not loaded!");
}
};

but I tried this and nothing happens - no styles are applied.

kritikal
December 17th, 2005, 01:32 PM
Hey guys,

what should I change to be able to use this on a diagonal scroller..
scroller looks something like this

\
-\
--\
---\
----\ (without the -)
Of course it looks better than that but you get my point :P
I tried adding x values and make it add +1 as the scroller goes down but that didn't seem to have an effect...

any ideas would be greatly appreciated

TheCanadian
December 18th, 2005, 03:44 AM
Thanks, to apply the style sheet to dynamic text from a text file I guess I could use something like this:

var myStyle = new TextField.StyleSheet();
var cssLocation = "flash_style.css";
myStyle.onLoad = function(ok) {
if (ok) {
// If the style sheet loaded without error,
// then assign it to the text object,
// and assign the HTML text to the text field.// make sure that the Text Area Component has HTML set to "true"
myTxt.styleSheet = myStyle;
myTxt.text = newsinfo; // newsinfo is the name of the textfile
} else {
// error message
trace("The Style Sheet has not loaded!");
}
};

but I tried this and nothing happens - no styles are applied.
What is all of your code?

Pixelate
December 18th, 2005, 07:49 PM
This should do the trick.
Edit the txt file and it will change the content of the scroller. HTML tags work too.
Be sure to leave the:
newsinfo= in at the start. :smirk:

I downloaded this, because the Claudio scroller wasn't showing bold text, and this version still doesn't show bold text??

TheCanadian
December 18th, 2005, 11:40 PM
what should I change to be able to use this on a diagonal scroller..
Trigonometry.

massive3215
December 19th, 2005, 09:02 AM
I'm having trouble getting the scroller to work. I've nested the file within a movieclip contentText_mc. When you click on the press button I have the code

on (release) {
contentText_mc.gotoAndStop("press");
}


When you get to the press section it should call in the text file but nothing is happening. My trace("success"); is working but that' s about it. I think I've updated all the paths in the code but I can't seem to get the text to load in correctly. If someone could take a look at my file and help me out I would appreciate it. Thanks!

rusty27851
December 20th, 2005, 06:38 PM
How do you soften the edges at the top and bottom of the mask on this? I tried making the mask into a gradient and messing with the alpha setting, but no luck.

kritikal
December 20th, 2005, 10:02 PM
Trigonometry.

thanks! but I'm not sure how to integrate this into Claudio's script, the drag kind fo works when I want to scroll down but it goes lower than the bar and if I try to scroll up it just blocks and won't go up... Don't know why it's doing that

d0dge
December 24th, 2005, 09:30 PM
Hello Guys,

The scroller work perfectly... May I ask if I can use it on my website?

Btw, Its hard to scroll and it gets kinda jerky if i place it in a .swf which loads to main.swf , Are there solutions to this?

BDore
February 9th, 2006, 08:03 AM
Thank you very much for this script. So easy to use.

But I came across one problem:

I'm loading a XML file into the dynamic txt field. No problem there but I'm using CSS to style the text and that's the problem. The text doesn't show up...I tested and it's definitely the CSS. I already embedded the fonts.

my code:


//TextArea
data1.html =
data1.wordWrap =
data1.multiline =
data1.label.condenseWhite = true;

titulo.html =
titulo.wordWrap =
titulo.multiline =
titulo.label.condenseWhite = true;

descricao.html =
descricao.wordWrap =
descricao.multiline =
descricao.label.condenseWhite = true;


//load css
estilo = new TextField.StyleSheet();
estilo.load("conteudo.css");
data1.styleSheet =
titulo.styleSheet =
descricao.styleSheet = estilo;


//load in XML
xmlConteudo = new XML();
xmlConteudo.ignoreWhite = true;
xmlConteudo.load("conteudo.xml");
xmlConteudo.onLoad = function()
{
data1.text = xmlConteudo.firstChild.firstChild.firstChild.first Child;
titulo.text = xmlConteudo.firstChild.firstChild.firstChild.first Child.nextSibling;
descricao.text = xmlConteudo.firstChild.firstChild.firstChild.first Child.nextSibling.nextSibling;
};

ok...solved with setMask();

FlashPlaya
March 13th, 2006, 03:13 PM
Did anyone else get the css working? I cant seem to get my working? Thanks!!

massive3215
March 13th, 2006, 03:15 PM
I tried as well to get the CSS to work with no luck. If someone knows how please post the solution

BDore
March 14th, 2006, 02:13 PM
Hey guys i got it working with "no trouble" (yeah...right...) ;)

I did not use classes though, only redefined the tags I created.

The code I posted above works fine! If you are using xml and css, make sure you point the "firstChild.childNodes" and so on thing to the right tag or else it wont style the text. I thought sometimes css wasn't working but it was, I was pointing to the wrong element in the xml...

Solidus
March 17th, 2006, 06:01 PM
Quick question where can i control in the code what angle the slider is dragged. Right now its straight up and down but i would like it to be dragged
at a angle.
Any thoughts?
Chris

lejon
March 21st, 2006, 01:49 AM
if i hadn't gotten my scrollpane to actually work 100% of the time this would've seriously saved me, but i might just use it in the future to reduce my file sizes. i added this line of code to the bar to initiate the dragging of the dragger if the bar is pressed:



bar.onPress = function() {
drag = true;
if (this._parent._ymouse>this._y+this._height-this._parent.dragger._height) {
this._parent.dragger._y = this._parent._ymouse;
this._parent.dragger._y = this._y+this._height-this._parent.dragger._height;
} else {
this._parent.dragger._y = this._parent._ymouse;
}
dragger.scrollEase();
dragger.onPress(); //<-------------- initiates on bar press to start dragging the dragger as well
};


great job on it claudio!

Ygramul
April 6th, 2006, 05:32 PM
I used a horizontal version a few pages back, and I'm having the same troubles he had: the drag effect works fine along the bar, but the left and right buttons continue to scroll off into infinity. How can I fix it?


bar.useHandCursor = dragger.useHandCursor=false;
space = 500;
friction = 2;
speed = 2;
xD = dragger._x;
top = main._x;
bottom = main._x+mask_mc._width- 6622 -space;
dragger.onPress = function() {
drag = true;
this.startDrag(false, this._parent.xD+this._parent.bar._width-this._width, this._y, this._parent.xD, this._y);
dragger.scrollEase();
};
dragger.onMouseUp = function() {
this.stopDrag();
drag = false;
};
bar.onPress = function() {
drag = true;
if (this._parent._xmouse>this._x+this._width-this._parent.dragger._width) {
this._parent.dragger._x = this._parent._xmouse;
this._parent.dragger._x = this._x+this._width-this._parent.dragger._width;
} else {
this._parent.dragger._x = this._parent._xmouse;
}
dragger.scrollEase();
};
bar.onMouseUp = function() {
drag = false;
};
moveDragger = function (d) {
if ((dragger._x>=xD+bar._width-dragger._width && d == 1) || (dragger._x<=xD && d == -1)) {
clearInterval(myInterval);
} else {
dragger._x += d;
dragger.scrollEase();
updateAfterEvent();
}
};
up_btn.onRollOver = function() {
myInterval = setInterval(moveDragger, 0, -.1);
};
down_btn.onRollOver = function() {
myInterval = setInterval(moveDragger, 0, .1);
};
up_btn.onRollOut = down_btn.onRollOut=function () {
clearInterval(myInterval);
};
MovieClip.prototype.scrollEase = function() {
this.onEnterFrame = function() {
if (Math.abs(dy) == 0 && drag == false) {
delete this.onEnterFrame;
}
r = (this._x-xD)/(bar._width-this._width);
dy = Math.round((((top-(top-bottom)*r)-main._x)/speed)*friction);
main._x += dy;
};
};


Thanks!

sophia
April 30th, 2006, 09:34 PM
I have always loved this scroller. It works like a charm and it is easy to alter. However, I was wondering if it is possible to add something to the script that would have the dragger snapping to certain locations on the way down the scroll. The code is beyond me, but I think it would be a nice addition to the .swf

If this is possible, TIA

micheeel
May 11th, 2006, 06:35 PM
Since this topic is about scrollers, maybe this can help out some people, dont know... check out. I took kirupa's tutorial script and made it AS2 OO class

http://www.kirupa.com/forum/showpost.php?p=1843650&postcount=118

ilikedesign
May 27th, 2006, 05:53 PM
Hi, hopfully people still read this thread and someone can help me.
I'm new to flash and this forum. I am using the edited version of claudio's scroller so that it is horizontal. On my site, I have it so that you can switch movie clips to load in the scollable area, but here's the problem:

How do I reset the scollbar to the left each time a movie clip is loaded?

zooey74
June 9th, 2006, 11:51 AM
I have a similar problem to the one mentioned above. I have a long horizontal map that I'm scrolling and I need it to reset the position when the user makes a different selection. I'm not sure how to do this. I've adjusted portions of the code but nothing seems to work just right.

artistwantab
June 16th, 2006, 08:13 PM
I am trying to use this scroll bar with some dynamic text and cssStyle sheets.

My text loads but doesn't scroll here is the code.


stop ();
#include "mc_tween2.as"
//
var lv_buyingWorks:LoadVars = new LoadVars ();
lv_buyingWorks.onData = function (stateData) {
this.buyingWorks.htmlText = stateData;
};
//
this.createTextField ("buyingWorks", 10, 200, 110, 400, 400);
buyingWorks._alpha = 0;
buyingWorks.embedFonts = true;
buyingWorks.multiline = true;
buyingWorks.wordWrap = true;
buyingWorks.html = true;
buyingWorks.setNewTextFormat (mf);
var lvArticleContent:LoadVars = new LoadVars ();
lvArticleContent.onData = function (sHTMLData:String):Void {
buyingWorks.htmlText = sHTMLData;
};
var cssStyles:TextField.StyleSheet = new TextField.StyleSheet ();
cssStyles.onLoad = function ():Void {
buyingWorks.styleSheet = this;
lvArticleContent.load ("vars/buyingWorks.html");
bottom = buyingWorks._y+mask_mc._height-buyingWorks._height-space;
};
cssStyles.load ("styles/buying_rentingWorks.css");
buyingWorks.alphaTo (100, 2, "linear");
//
fscommand("allowscale", "false");
bar.useHandCursor = dragger.useHandCursor=false;
space = 20;
friction = 0.9;
speed = 4;
y = dragger._y;
top = main._y;
dragger.onPress = function() {
drag = true;
this.startDrag(false, this._x, this._parent.y, this._x, this._parent.y+this._parent.bar._height-this._height);
dragger.scrollEase();
};
dragger.onMouseUp = function() {
this.stopDrag();
drag = false;
};
bar.onPress = function() {
drag = true;
if (this._parent._ymouse>this._y+this._height-this._parent.dragger._height) {
this._parent.dragger._y = this._y+this._height-this._parent.dragger._height;
} else {
this._parent.dragger._y = this._parent._ymouse;
}
dragger.scrollEase();
};
bar.onMouseUp = function() {
drag = false;
};
moveDragger = function (d) {
if ((dragger._y>=y+bar._height-dragger._height && d == 1) || (dragger._y<=y && d == -1)) {
clearInterval(myInterval);
} else {
dragger._y += d;
dragger.scrollEase();
updateAfterEvent();
}
};
up_btn.onPress = function() {
myInterval = setInterval(moveDragger, 18, -1);
};
down_btn.onPress = function() {
myInterval = setInterval(moveDragger, 18, 1);
};
up_btn.onMouseUp = down_btn.onMouseUp=function () {
clearInterval(myInterval);
};
MovieClip.prototype.scrollEase = function() {
this.onEnterFrame = function() {
if (Math.abs(dy) == 0 && drag == false) {
delete this.onEnterFrame;
}
r = (this._y-y)/(bar._height-this._height);
dy = Math.round((((top-(top-bottom)*r)-main._y)/speed)*friction);
main._y += dy;
};
};

artistwantab
June 16th, 2006, 11:49 PM
Here are the make it easier.

artistwantab
June 17th, 2006, 09:12 PM
Anyone???...I am totally lost on this one....

DanontheMoon
June 22nd, 2006, 03:42 PM
scroll pane can (i think)
I've been having the same problem, trying to use scrollbars on a movie clip - to no avail. Do you know of any good resources on scrollpanes?:toad:

phez999
June 23rd, 2006, 10:05 AM
Claudio, you are the man, thank you for your time and effort. may your flash life be long and prosperous :]

could either claudio or someone else please explain to me how i can go about resizing, and repositioning the horizontal image scrollbar?

p.s. by resize i mean, is there some form of mask i can resize so that the 'number' of visible thumbnail images within the scrollbar would be less?.

and once that is done, i would like to re-position the scrollbar in the center of the screen.

if someone could help me that would be most appreciated.

thank you in advance.

hozkara
June 23rd, 2006, 11:15 AM
thanks for share

Clark
July 13th, 2006, 02:07 PM
Guys, I really wannna know if its possible to load images into a scroller like this dynamically? I want to create a big ribbon of images to scroll through and sticking them all in one big movieclip is just not gonna work. Any ideas or help appreciated, thanks...

moyger
July 14th, 2006, 07:46 AM
I downloaded your scrollbar claudio. It works perfect. However, how can I scroll an external Image loaded into the content. I was trying to loadmovie the image into the content movie. However, doesnt work.

jamiehunter
July 17th, 2006, 09:03 AM
Does anyone know how to add Mouse Wheel functionality too this scroller? I've been trying but I don't know enough about accessing the Scroll Wheel with AS.
Thanks.

ar
July 17th, 2006, 10:27 AM
I love your scroller! Could you possibly make version 2? I know this one is perfect, but there could be so many new features to add with actionscript 3 :D.

GBP

mxo22
September 2nd, 2006, 11:22 AM
if somebody wanna use the mousewheel for claudio scroller can make :

mouseListener = new Object();
mouseListener.onMouseWheel = function(delta) {
trace(delta);
if (delta<0) {
moveDragger(1);
}
if (delta>0) {
moveDragger(-1);
}
};
Mouse.addListener(mouseListener);

hope is would be usefull

nitras
September 3rd, 2006, 10:00 AM
hello guys / galls


i am in need of some quick help if that's possible

i make a connection with the database
and then i fill in the scroller

the problem is i can't seem to get the right height for the main movieclip in any way
i tried onLoad, onEnterFrame ... no use for me :s

the height of the mc will always be different cuz the table in the database changes every day/maybe week

i tried when the querrie has been triggered and load to define the height, that works
each item is 213 pixels in height

so for 3 items i need the main movieclip to be 213*3 right!
i tried to pass that variable as mainH to define the height but i won't budge

each item is cast with an attachmovie & for i iteration and thus is a movieclip inside the main

can anyone assist me

i tried to past the code here, but i am having some weird "not able to paste" errors

thanx!

wrs_2
September 13th, 2006, 02:46 PM
I'm trying to create a menu that looks like the new 2advanced submenu, i mean you can scroll the sublinks under a mask, I've been trying to do this with normal scrolling way but noting is working.
The problem is that i use a dragger(button or movie clip), the dragger is controlled by onRollOver, and here is the problem, when i rollover the Dragger, it over rides the buttons under the mask in the submenu.
any help would be great.
attached is a scroller i got from here, with my editing.

Tyg3r
September 16th, 2006, 02:48 AM
if somebody wanna use the mousewheel for claudio scroller can make :

mouseListener = new Object();
mouseListener.onMouseWheel = function(delta) {
trace(delta);
if (delta<0) {
moveDragger(1);
}
if (delta>0) {
moveDragger(-1);
}
};
Mouse.addListener(mouseListener);

hope is would be usefull

hmmm... it works, but there's nothing telling the dragger to stop scrolling. I can just scroll infinitely making everything go off screen. Is there an additional statement that will fix this?

ilikelegs
September 22nd, 2006, 02:42 AM
I am using this scroller and it works great for what I needed.

Thanks for posting it for us!:thumb2:

wrs_2
October 2nd, 2006, 12:59 PM
hi guys, anyone got the css to work? i've tried but nothing is working :(

ika_nursila
October 17th, 2006, 06:13 AM
Switch the instance names for the buttons.
Name the up arrow "down_btn" and the down arrow "up_btn".

hem...how if i want to scroll MovieClip "A" from the library, and other MOvieClip "B" that i create by attachMOvie in the same frame?
please help..
because of the MOvieClip "A" is load some data from database, n looping by amount of records. (by duplicateMoviclip)..and MOviclip "B" is the button that will go to detail page of those records...
how to scroll it?
thanks
ika

jupenz
November 26th, 2006, 03:56 AM
hmmm... it works, but there's nothing telling the dragger to stop scrolling. I can just scroll infinitely making everything go off screen. Is there an additional statement that will fix this?
Here's the working Mousewheel code for claudio's scrollbar



var mouseListener:Object = new Object();
mouseListener.onMouseWheel = function(delta:Number) {

dragger._y -= Math.round(delta*2) ;
dragger.scrollEase();

if(dragger._y <= y){
dragger._y = y;
}else{
if(dragger._y >= y + (bar._height-dragger._height)){
dragger._y = y + (bar._height-dragger._height);
}
}

};

Mouse.addListener(mouseListener);

achisholm
November 26th, 2006, 11:53 AM
I've been trying to figure out where the code goes to add the mousewheel functionality. I copy&pasted into the script on the first frame but that didn't work.

Also, i am trying to use this scrollbar where there will be several pages of text and images. There will be 5 buttons on the left that open a different page. Could somebody explain the best way to do this?

many thanks everyone

azukizero
November 29th, 2006, 01:01 AM
Hi All,

First off, the length of time that this thread has lasted is amazing. Testiment to the quality of the scroller! I'm going to replace the scroll script I have now and use Claudios but first I wanted to see if it's possible to add buttons to the main content.

For example, in Claudio's FLA, I'd like the image to be able to link to and external site (getURL). Can I put an invisible button over the image and have it scroll up or down with the rest of the content?

With the script I'm using now, the content (images and text) will scroll up and down but the buttons (which are invisible buttons on a separate layer) will not scroll, so the links won't always be over their respective images...

Please help with this as I've been banging my head trying to make this work!

thanks!!

jupenz
December 5th, 2006, 12:05 PM
Good day azukizero!

Put your invisible button inside the main movieclip and that will make it work.

jpixels
December 14th, 2006, 04:46 AM
yes but what about if the text is being dynamically loaded, and the height has to be adjusted automatically from that???

azukizero
February 2nd, 2007, 02:52 PM
Has anyone experienced the scroller not scrolling the content all the way back to the top?

I've got the scroller to work perfectly with this small exception: when I scroll down then back up to the top, the content is slightly cut off at the top. I've played with the placement of the content, mask, and scrollbar without success.

Here's the site that show this problem in action:
http://ttt-movie.com/

(it's more apparent when you click on "Crew" from the About page)

Please help!

skyhawk
February 5th, 2007, 03:23 AM
I’ll try to make this simple…I watched the thumbnail tutorial off of gotoandlearn.com (great tut) and I’m trying to reproduce it in a flash site I’m doing for a client. my scrollpanel frames are under an instance later on in the timeline…obviously, not the same circumstances as Lee did his in the tutorial. I’ve followed along and got to the end…and my results are:
1. the scrollpanel doesn’t scroll. It is viewable… also, the viewable thumbnails revealed by the mask do not react on rollover. Okay then I tried moving the scroll panel actions keyframe to the first frame…then I get this:
2. the scroll panel doesn’t scroll…but then rolling over the thumbnails present shows the buttons reacting.
I’m dying here…looked around on the net but found nothing to help. I’ve gotta get this project done soon! I would be willing to send the .fla file to anybody that could offer some help. My email is reallifeross@yahoo.com

thanks… site: www.kmhairworksandspa.com (http://www.kmhairworksandspa.com/)

(http://www.kmhairworksandspa.com/)

Neuhaus3000
February 9th, 2007, 11:17 AM
Hello everyone,

Do you know what I need to do to put two Claudio scrollbars side by side without interfering with each other? I have modified the variable names (bar, mask_mc, dragger) without success. :stare:

Thank you!

neuhaus3000

flashintox
February 10th, 2007, 06:09 PM
First of all ,,greetings to you all, this is my first psot and a first question.
If you have some spare time to help me it woudl be brilliant cuz I'm struggling here -
I made Claudio scroll bar works with my content, but for some reason whenever I upload the fla with scrollbar using component loader it doesn't scroll images, but instead the 'drag handle' can be pulled out without any of the images moving.
Any ideas?
I use flash 8 pro.
In other words , how to use claudio scrollbar with component preloader?
thanx

JimTester
March 11th, 2007, 01:41 PM
You could always use your own scrollbar.
Something like this.

updated the file


Claudio

I tried customising the scrollbar (and publishing it for Flash 8) so that it pulled data from an external XML file rather than just scrolling hard coded text and images but the text doesn't show up. I guess that it's something to do with the combination of fonts and masks or it's some kind of bug.

I've tried _sans and verdana as my text and I've tried embedding and not embedding fonts but with no joy.

Any ideas why this isn't working for me? :puzzle:


:-)

PDidee
March 12th, 2007, 02:28 PM
This scroller is very customizable and works great. I've been re-working a website I created to be completely Flash and on three different locations I'll be using the scroller. Question though:

Is it possible to have the scroller automatically scroll when a user mouses over the up or down button? I'm fairly new to actionscript & Flash though I've been making several leaps considering I didn't know anything about a month ago.

Also I've read that the only way to have several of the same scroller work independantly is to "change all the variable in each" I've changed the instance names in the AS as well as the symbols. Still can't seem to get it to work for more than one instance. Any suggestions as to what else I should change.
Thanks in advance. Sorry if this is a silly question. (-:

mikedkap
March 28th, 2007, 02:02 PM
I just downloaded your fla and it worked great, first try!! Thanks!!

LittleFenris
May 3rd, 2007, 01:56 PM
Great code and example claudio. Thanks

ajit007
May 29th, 2007, 06:49 AM
thnxssssssssssssssssss

dail
June 7th, 2007, 07:55 PM
Great scroller. I actually downloaded this from somewhere else, but looking at the source code of the two files (yours) and (theres) its obvious that they are the same.

Anyway, nice work.

newbaxnscriptr
June 19th, 2007, 10:40 AM
Ya, this plus Kirupa's XML menu system would be GREAT!!! New scrollers areas for every new menu tier.

SilverChariot
July 7th, 2007, 07:05 AM
Hey guys, anyone got the mousewheel part to work ? not sure if its becuz i am on a mac or something .... the mousewheel thing just dont seem to work for me ... can someone please post a working FLA with the mousewheel functionality ?

Thanks

viiespk
July 8th, 2007, 10:42 AM
You could always use your own scrollbar.
Something like this.

updated the file

This is a great scroller, but I cannot apply this when I need it move horizontally. Do you know how I could go about solving this problem?

SilverChariot
July 8th, 2007, 11:58 AM
Hey viiespk ,, trying going through the earlier threads .. someone posted a horizontal version of it

tabogarcia
July 11th, 2007, 03:14 PM
PERFECT scroller, claudio!!!

does anyone knows what should i do, to set up how far my content goes up or down when i click on a button. for example, i want that every time i hit the down button, it scrolls 50 pixels.

can anyone help m, pleeeeeeeeease!?!

djmousetek
July 12th, 2007, 04:22 PM
hello everyone .... can you tell me where's that horizontal version of the scroller? that's a great scroller but i really need it horrizontally... and that's urgent :stunned:

jdcon
July 23rd, 2007, 11:43 AM
hey guys! this scroller is really very good. Only problem i've encountered is when loading an external swf into the main mc. The scroll seems to be the wrong way. Anyone try this or have a fix for this? thanks! =)

jbruso
July 23rd, 2007, 10:04 PM
This is a great thread... what a long life too!

I took a bunch of different contributions from folks here and put them together into one... for the community to work with. (Note, none of this is from me... just everyone else's work... put together.) Otherwise, one has to sift through 23 pages to find all the pieces like I did :)

This scrollbar has:

easing
mousewheel scroll
external txt fileI would be curious to see what anyone could do to make it even better. One issue is that it looks like there's just a long vertical empty movie clip that acts as a container. If your text varies in length, then this scrollbar is going to have problems cause it's fixed to only a certain amount of text.



:) John

.FLA is in version 8 now.

skinjob
July 26th, 2007, 08:12 AM
Hi,

I think Claudio scroll (claudioscroll (total).zip (http://www.kirupa.com/forum/attachment.php?attachmentid=43479&d=1185287750)) is great, but is there a possibility to use regular buttons for scrolling text instead of movie clips acting like buttons? I'd like to see rollover and hit states like normal button do...any help will be appreciated.

mikedkap
August 7th, 2007, 06:28 PM
Has anyone figured out how to fix the problem of the Over-Scroll when the scroller is being used for Horizontal purposes?

The dragger works great, but the left and right arrows go on forever in either direction.

sdpkelkar
August 12th, 2007, 05:02 AM
Hi everyone,
I'm a n00b at AS so excuse me if this sounds silly (-:

How does one get the scroller to work if it is embedded within a movie clip (a container, for example)?

vijju_225
August 14th, 2007, 03:18 AM
How to do slide show with horizontal scrollbar? plz help me anybody..........:):)

sam2
November 25th, 2007, 04:46 PM
You could always use your own scrollbar.
Something like this.

updated the file

can this scrollbar be scrollable with a the mouse scroller??:ponder:

kool_dvd
December 25th, 2007, 08:19 PM
Hi!! I saw this scroller from Claudio (which is excellent by the way), and decided to try out the horizontal version of this scroller. However, it does not seem to work. I am trying to make an XML Flash Gallery that scrolls horizontally with easing. The problem lies when it tries to scroll, the "dragger" just travels on to infinity and beyond, without having any boundaries set. How can I adjust this? Please, let me know as soon as possible. Thanks in advance :D!!

kool_dvd
December 25th, 2007, 08:22 PM
Just so you know, I am trying to create the effect of the flashloaded.com Photoflow component. Please, let me know how can I do this ASAP. Thanks!!

lordy18
December 30th, 2007, 05:14 PM
does anyone know how to make a custom scroller that works inside a movie clip, i cant get the one from this site to work!

saros
June 11th, 2008, 01:26 PM
I thought I might share this with you dudes.

First, thanks DeeTex for sharing this with us dudes, I read this TRUELY long threads and it seems your the only one who was able to fix this problem with height of the dynamically loaded text.
And thanks to Claduio for coming up with this awesome scroller.

saros
June 11th, 2008, 01:36 PM
sam you didin't read all of the threads did you ?
I think on page 20 or something they discussed this.

daynie
June 16th, 2008, 08:50 AM
Claudio nice job .. How does it work on horizontally slide bar? Thanks

jo3.14
February 11th, 2009, 09:21 AM
anyone still reading this?

im having a problem with masking. when i apply the mask i see no text in the published swf, but the text is loading, i can select the text and copy and paste it into notepad, but i see no text in the published swf.

any idea?

annkie
March 20th, 2009, 07:48 PM
You could always use your own scrollbar.
Something like this.

updated the file


I need to make this code work on a horizontal scroll. I've been trying to adjust the code but my dragger seems to have the ability to follow the mouse all over the stage and I have no clue how to fix it. Ideas anyone?

iamkeith26
May 5th, 2009, 11:41 AM
I used the horizontanal code which was attached and altered the arrows to large boxes so I could create a rollover action, this works although there is one problem.

the dragged goes off the edge, to view what I have done please look at:

http://www.planet-media.co.uk/

please help me out! please!! :)

the code I have used is below:


fscommand("allowscale", "false");
bar.useHandCursor = dragger.useHandCursor=false;
space = 50;
friction = 2;
speed = 10;
xD = dragger._x;
top = main._x;
bottom = main._x+mask_mc._width-main._width-space;
dragger.onPress = function() {
drag = true;
this.startDrag(false, this._parent.xD+this._parent.bar._width-this._width, this._y, this._parent.xD, this._y);
dragger.scrollEase();
};
dragger.onMouseUp = function() {
this.stopDrag();
drag = false;
};
bar.onPress = function() {
drag = true;
if (this._parent._xmouse>this._x+this._width-this._parent.dragger._width) {
this._parent.dragger._x = this._parent._xmouse;
this._parent.dragger._x = this._x+this._width-this._parent.dragger._width;
} else {
this._parent.dragger._x = this._parent._xmouse;
}
dragger.scrollEase();
};
bar.onMouseUp = function() {
drag = false;
};
moveDragger = function (d) {
if ((dragger._x>=xD+bar._width-dragger._width && d == 1) || (dragger._x<=xD && d == -1)) {
clearInterval(myInterval);
} else {
dragger._x += d;
dragger.scrollEase();
updateAfterEvent();
}
};
up_btn.onRollOver = function() {
myInterval = setInterval(moveDragger, 0, -3);
};
up_btn.onRollOut=function () {
clearInterval(myInterval);
};


down_btn.onRollOver = function() {
myInterval = setInterval(moveDragger, 0, 3);
};
down_btn.onRollOut=function () {
clearInterval(myInterval);
};
MovieClip.prototype.scrollEase = function() {
this.onEnterFrame = function() {
if (Math.abs(dy) == 0 && drag == false) {
delete this.onEnterFrame;
}
r = (this._x-xD)/(bar._width-this._width);
dy = Math.round((((top-(top-bottom)*r)-main._x)/speed)*friction);
main._x += dy;
};
};


/*
fscommand("allowscale", "false");
bar.useHandCursor = dragger.useHandCursor=false;
space = 20;
friction = 0.9;
speed = 4;
y = dragger._y;
top = main._y;
bottom = main._y+mask_mc._height-main._height-space;
dragger.onPress = function() {
drag = true;
this.startDrag(false, this._x, this._parent.y, this._x, this._parent.y+this._parent.bar._height-this._height);
dragger.scrollEase();
};
dragger.onMouseUp = function() {
this.stopDrag();
drag = false;
};
bar.onPress = function() {
drag = true;
if (this._parent._ymouse>this._y+this._height-this._parent.dragger._height) {
this._parent.dragger._y = this._parent._ymouse;
this._parent.dragger._y = this._y+this._height-this._parent.dragger._height;
} else {
this._parent.dragger._y = this._parent._ymouse;
}
dragger.scrollEase();
};
bar.onMouseUp = function() {
drag = false;
};
moveDragger = function (d) {
if ((dragger._y>=y+bar._height-dragger._height && d == 1) || (dragger._y<=y && d == -1)) {
clearInterval(myInterval);
} else {
dragger._y += d;
dragger.scrollEase();
updateAfterEvent();
}
};
up_btn.onPress = function() {
myInterval = setInterval(moveDragger, 18, -1);
};
down_btn.onPress = function() {
myInterval = setInterval(moveDragger, 18, 1);
};
up_btn.onMouseUp = down_btn.onMouseUp=function () {
clearInterval(myInterval);
};
MovieClip.prototype.scrollEase = function() {
this.onEnterFrame = function() {
if (Math.abs(dy) == 0 && drag == false) {
delete this.onEnterFrame;
}
r = (this._y-y)/(bar._height-this._height);
dy = Math.round((((top-(top-bottom)*r)-main._y)/speed)*friction);
main._y += dy;
};
};
*/

Neuhaus3000
May 5th, 2009, 03:17 PM
Design is very nice! :thumb:

franky5
May 21st, 2009, 01:43 PM
Hi Claudio, GREAT scroller.

One question, I have some very long text and it doesn't seem to be able to handle the full height of the movieclip. Where in the code could I adjust for this? It scrolls down to the bottom but not to the end of my text.

Thanks!

GoldenLeo
October 31st, 2009, 04:34 PM
I have the same problem, images&text, it scrolls all the way and it shows all images but not all text.
Anyone solved this? Please :)

hobia1
November 21st, 2009, 06:35 AM
Can anyone get me started on an image scroller? I have text from a mysql database which is a url to a list of jpg images 250x150. I want to display them automatically moving from left to right. Have no idea where to start from as am new to flash. Any help would be much appreciated.
F

Ckp
November 21st, 2009, 09:22 PM
I want to modify The Best of Post.fla file - (the one that searches an xml file to display the best post by author or comment) to fit more of what I'm trying to display. I want to search my xml file to look for an person's name or email address using a text input box . When I click go, I want it to simply display on the flash stage 2 jpg files that are associated with that name. OR bring up 2 menu thumbnails so that when I click on one of the 2 thumnails, it will display that image. Can anyone help? I've very new to xml and flash and I'm not sure which variables to change. Any help will be greatly appriciated. I have the following xml file:

<?xml version="1.0" ?>
<xml>


<Models>



<Star>
<Name>Bruce Lee</Name>
<Photo1>Ying123.jpg</Photo1>
<Photo2>Dragon123.jpg</Photo2>
</Model>

<Star>
<Name>Jackie Chan</Name>
<Photo1>Monkey123.jpg</Photo1>
<Photo2>Snake123.jpg</Photo2>
</Starl>

<Star>
<Name>Jet Li</Name>
<Photo1>cat123.jpg</Photo1>
<Photo2>tiger123.jpg</Photo2>
</Star>

</Models>
</xml>

western
February 24th, 2010, 10:32 PM
hey guys this is my first time here and i was looking a long time 4 the code's that ware made here so i ty all 4 the briliant work spesalie Claudio ^^ btw here is a source file ware is blure and a mouse wheal movment i put some explaining 2 the code 4 peaple who dont know how it works i hope my small tribuut wil help ^^

jajabinx35
March 1st, 2010, 06:54 AM
I need help on something that can be answered very quickly:

If you look at this custom bar I made:

http://i14.photobucket.com/albums/a3.../scrollbar.png

What code would make my 'scroll_mc' move? (AS2 btw) through the x axis?

ultraviolet
March 28th, 2010, 03:54 PM
I've loaded into the original scrollbar some text and images. I would like to vary the alpha value of the images according to the dragger position. I've been trying to use a condition based on dragger._ymouse related to the images' y positions to no avail. Anyone has a clue on how to do this?

onegunshot
May 18th, 2010, 09:29 PM
just wanted to say thanks claudio, i used your scroller, thanks bro. i know we are in the age of as3 :I

ivan.magic
May 20th, 2010, 12:45 PM
Hello all, need help with claudio scroll. found a version of the scrool that works with mac scroll wheel - great but it seems that the area for the wheel scroll is shifted from the text as much as the whole thing is shifted from x=0 and y=0

is there a way to fix that accept aligning everything to stage origin?

thanks in advance

fuat122
June 11th, 2011, 06:52 PM
thanks Brownie for sharing:)