Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Change Vert Scroll Script To Horiz Scroll



I found this tutorial for a scrollbar. It works great for vertical scrolling (ex:http://www.matthewterry.net/safetyguide.html click any section), but I want to change it to scroll horizontally, for another project.

Can someone help me change it to affect horizontal scrolling?

On the content's movie:

onClipEvent(load){
goY = this._y;
myY = this._y;
ySpeed = 0;
clicked = false;
delay = 2;
barDis = 380;
barPercent = 0;
}
onClipEvent(enterFrame){
if(math.round(myY) != math.round(goY) || clicked == true){
barPercent = (_parent.scroller.scrolllever._y/barDis)*100;goY = 116.7 - ((340/100)*barPercent);
myY = this.setonescroll._y;
ySpeed = (myY-goY)/delay;
this.setonescroll._y -= ySpeed;
}
}

On the scroller:

on(press){
startDrag(this,0,0,0,0,_parent._parent.setone.barD is);
_parent._parent.setone.clicked = true;
}
on(release, releaseOutside){
stopDrag();
_parent._parent.setone.clicked = true;
}

Thanks,
Matt



FlashKit > Flash Help > Flash ActionScript
Posted on: 07-03-2004, 07:16 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Horiz And Vert Scrolling
Hello all,
I'm trying to have a border around the edges of my movie that controls the direction of scrolling when rolled over. (One across the top, bottom, left, and right)
I have this script attached to my background image:

onClipEvent (enterFrame) {
if (_root.hit == L) {
this._x += 6;
}
else if (_root.hit == R) {
this._x -= 6;
}
else if (_root.hit == U) {
this._y += 6;
}
else if (_root.hit == D) {
this._y -= 6;
}
}
I had this working when I had just the left and right bars on each side. But after adding the top and bottom, nothing seems to work right. Can anyone tell me what I am doing wrong here?
I would also like it to stop when it hits the end of the background image.
I am using FlashMX and I also sent a copy of the fla file so you can see what I'm talking about.

X-tra Wide Horiz Scroll Q
I want a continuous scroll of graphics 35,000 pixels wide. I'm following instructions that advise to duplicate the set and combine as a symbol (now 70k pixels wide). Then place a second instance of the symbol later on, on the timeline.

It doesn’t work as simply with my extra-wide symbol. My attempts either don't move or prematurely restarts. And I don't understand the concept enough to know how to compensate.

Here is a simple (290 pixels wide) example of what I want to do:
http://coronasdomain.net/edu/q/hscroll.htm

Any advice greatly appreciated. - Please let me know if I am unclear.

Thanks,
Corona






























Edited: 04/28/2008 at 11:08:31 AM by GrnSpdr

Graphics Horiz Smooth Scroll
I've got a long graphic that is tweened from right to left and masked off.

It's not real smooth looking.

I'm thinking it's more of a visual thing as it has about eight images with space between them: image______image_____image_____image etc.

It's self running and doesn't look bad but I'd like even more smoothness.

150 Images As Horiz Scroll Menu Using Array...?
Looking for suggestions from the experts....
Have to create a horizontal scrolling menu out of 150 jpges, upon which when clicking will open a larger format of the specific jpeg. Have spent hours looking through tutorials and mc's, however, most deal with an mc object which is then scrolled - a non starter with 150 jpegs. Assming a better approach would be using an array, but these tutorials/mc's use text in the array. Have tried replacing with jpegs, but no go. Any suggestions or links would be greatly appreciated!

How To Make Oringe.com Blur Script Scroll Horiz?
Hey guys,

Does anyone know how I can make oringe.com's blurring-scroll script scroll horizontally?
Script: http://www.oringe.com/download/blurScroll.fla
So far Ive managed to make the site scroll horizontally, but it lacks the blurring effect.
Also instead of using a scrollbar I want to use my 4 menu buttons as seen in the interface HERE

Thanks a lot

Change Horizontal Scroll To Vertical Scroll
Hi,

I've flash source code that is having a horizontal scrolling. Anybody can help me to change this to a vertical scroll.

Pls check the attached file.

thanks in advance...

How Do I Change The Scroll Bar's Color In IE?
i seem some site that changes color
and i wan t to ask how to do that
thanks

Change Scroll Bar Colour Using AS Or CSS?
Is it possible to change the colour of the browser scroll bar using AS. I have tried it with CSS but I can't get it to work.

Help With Change Style Of Combo/Scroll Box
hi...
after using a combo box i hv a white frame around my iframe field.
i changed the background to black but i cannot remove the white
outline around the combo /filed / box.
can somebody help me?
thxs

the actionscript is:

stop();

splashesscroll.setStyleProperty("arrow", 0xFFFFFF);
splashesscroll.setStyleProperty("background", 0x000000);
splashesscroll.setStyleProperty("backgroundDisable d", 0x000000);
splashesscroll.setStyleProperty("scrollTrack", 0x000000);
splashesscroll.setStyleProperty("textColor", 0xFFFFFF);
splashesscroll.setStyleProperty("textSelected", 0xFF0000);
splashesscroll.setStyleProperty("selection", 0x000000);
splashesscroll.setStyleProperty("highlight3D", 0x000000);
splashesscroll.setStyleProperty("highlight", 0x000000);
splashesscroll.setStyleProperty("face", 0x000000);
splashesscroll.setStyleProperty("darkshadow", 0x000000);
splashesscroll.setStyleProperty("shadow", 0x000000);
splashesscroll.setStyleProperty("foregroundDisable d", 0x000000);
splashesscroll.setStyleProperty("textSize", 10);

Change Scroll Direction If Statement
I have a MC that has a really wide graphic in it that scrolls right to left with actionscript. The script also resets the graphic so it appears to loop forever. This graphic will also stop at certain spots when the user clicks buttons. I'm using the following script and it works:

// reset the variables
cityPos = whole_city._x;
cposRound = Math.round(cityPos);
// loop the city back to the begining if it has reached the end
if (cityPos<-645) {
whole_city._x = 1360;
}
// scroll city towards target position or stop
if (cposRound == _root.targetPos) {
whole_city._x = whole_city._x-0;
} else if (cposRound<_root.targetPos) {
whole_city._x = whole_city._x+10;
} else if (cposRound>_root.targetPos) {
whole_city._x = whole_city._x-10;
}

The PROBLEM is that when the user clicks enter the first time I don't want the scroll to switch directions, I want it to continue to scroll left (-10) until it stops. So I added these lines just before the third comment and really screwed something up:

// check to see if this is the first time user clicks enter and goto "about"
if (_root.enter == "in" && cposRound != _root.targetPos) {
whole_city._x = whole_city._x-10;
gotoAndPlay (2);
}

It works until the user clicks enter and that sets the variable enter to "in". It gives the error that an action script is causing flash to run slow and may crash if not aborted...

How To Change The Background Of A Scroll Pane
Can anyone tell me how to change the background color of a scroll pane so that it matches the rest of my background? I tried using the "color: advanced" settings in the properties, but I can't seem to figure it out. Thanks.

Change DataGrid Scroll Colors
I'm using the MX04 DataGrid component and have managed to set all the other styles the way I want but have had trouble changing the colors used by the scrollbar.

So far I've been using code similar to this:
ActionScript Code:
////myDataGrid.setStyle("backgroundColor", 0xFF0000);////  


Can anyone help me change the colors of MyDataGrid's scroll bar?

Thanks.

Scroll Pane Change Handler
i'm using the scroll pane component and what i wana do is when you click on a button it changes what is in the scroll pane can someone tell me how i can do this.

I've looked at using the setScrollContent actionscript but i can't seem to get it to work.

Scroll Bar Component - Change Color
How can I change the scroll bar color?
Can this be done with ActionScript? :)

Tinting The Scroll Box. Why Does It Change Text Colour?
i have used a scroll box component in my flash movie. Id like it a rather plesant blue (336699 in fact) it's defaulted to white. Inside the box are some (well loads) of links, how can i change the colour of the background of the box without changing the colour of the text/buttons that lies inside of it (the text/butons are inside a seperate movie clip). Or is there another way i can make a scrolling box with buttons in it?
thanks all.

Change Style Of Combo Box(scroll Field)
hi...
after using a combo box i hv a white frame around my iframe field.
i changed the background to black but i cannot remove the white
outline around the combo /filed / box.
can somebody help me?
the actionscript is:

splashesscroll.setStyleProperty("arrow", 0xFFFFFF);
splashesscroll.setStyleProperty("background", 0x000000);
splashesscroll.setStyleProperty("backgroundDisable d", 0x000000);
splashesscroll.setStyleProperty("scrollTrack", 0x000000);
splashesscroll.setStyleProperty("textColor", 0xFFFFFF);
splashesscroll.setStyleProperty("textSelected", 0xFF0000);
splashesscroll.setStyleProperty("selection", 0x000000);
splashesscroll.setStyleProperty("highlight3D", 0x000000);
splashesscroll.setStyleProperty("highlight", 0x000000);
splashesscroll.setStyleProperty("face", 0x000000);
splashesscroll.setStyleProperty("darkshadow", 0x000000);
splashesscroll.setStyleProperty("shadow", 0x000000);
splashesscroll.setStyleProperty("foregroundDisable d", 0x000000);
splashesscroll.setStyleProperty("textSize", 10);

Thanks a lot for your help!

And a great start in 2003 to everybody!!

Newbie..need Code To Change Color Of My Scroll Bar
sliderColor = new Color(sliderButton);
trackColor = new Color(track);
arrowColor = new Color(arrows);
sliderColor.setRGB(myColor);
trackColor.setRGB(myColor);
arrowColor.setRGB(myColor);

hmm...i got a scroller that i want to turn white and black
this is what it is set to..
what is the code ? is it hex color code? this is weird

help would be appreciated thanks.

Change Scroll Slider Bar To Left Right Buttons...
I have a dynamic move clip that has a slider, and I cannot figure out for the life of me how to change the slider controlling the dynamic clip to 2 buttons, one to scroll left, the other to scroll right...

I wish I could keep the slider, but... Here's the code:
Also, if u need a slider code... this one works great!

I found the the fla here on flashkit:

http://www.flashkit.com/movies/Scrip...0203/index.php

Frame 1 Actions:

_root.createEmptyMovieClip("featuredProjects", 1);
featuredProjects._y = 0;
featuredProjects._visible = true;
i = 0;
while (i<numItems) {
featuredProjects.attachMovie("thumb", "thumb"+i, i);
myN = eval("featuredProjects.thumb"+i);
myN.hitArea = myN.hA;
myN.createEmptyMovieClip("pic", 1);
myN.createEmptyMovieClip("txt", 2);
myN.txt._y = 0;
myN.hA._visible = false;
myN.attachMovie("thumbLabel", "thumbLabel", 2);
myN.thumbLabel.txt = getLabel(i);
myN.thumbLabel._y = 0;
myN.thumbLabel._alpha = 100;
myPic = getPic(i);
myLabel = getLabel(i);
myN.pic.loadMovie("images/"+myPic, 1);
myN.txt.attachMovie("txt", "txt", 2);
myN.txt.txt.txt = myLabel;
myN.launchURL = getLink(i);
myN.onPress = function() {
};
i++;
}


Frame 2:

function moveProjects(_arg1) {
perC = (_arg1/slider.maxW)*100;
newY = (projMaxW/100)*perC;
featuredProjects._x = (5+featuredProjects._x)+(((-newY)-featuredProjects._x)/6);
}
j = 0;
while (j<numItems) {
nN = eval("featuredProjects.thumb"+j);
prevN = eval("featuredProjects.thumb"+(j-1));
if (prevN == undefined) {
nN._x = 0;
} else {
nN._x = prevN._x+80;
}
j++;
}
projMaxW = featuredProjects._width-600;
featuredProjects._visible = true;


Frame 3:

stop();


The slider itself has actions of it's own... the slider mc frame actions:

maxW = 547;
minW = 10;
sliderControl.hitArea = sliderControl.hA;
sliderControl.hA._visible = false;
sliderControl.onPress = function() {
sliderControl.startDrag(false, minW, -1, maxW, -1);
};
sliderControl._visible = false;

And the actual slidercontrol Movie clip:

onClipEvent (mouseUp) {
this.stopDrag();
}
onClipEvent (enterFrame) {
_root.moveProjects(this._x);
}

Thanks for any help

Change The Color Of The Scroll Bar For External Text?
how do u change the colors and such for the scroll bar for loading exernal texzt, like u would do to a html scroll bar?

How Do You Make Text Change Color As You Scroll Over It?
For example on www.drakebell.com there they have his name and as you scroll over it, it changes. Does anyone know how to do that on FLASH?? if you can please email me at argh_imma_pirate@yahoo.com ASAP! thanks! =]

Change The Color Of The Scroll Bar For External Text?
how do u change the colors and such for the scroll bar for loading exernal texzt, like u would do to a html scroll bar?

How Do You Make Text Change Color As You Scroll Over It?
For example on www.drakebell.com there they have his name and as you scroll over it, it changes. Does anyone know how to do that on FLASH?? if you can please email me at argh_imma_pirate@yahoo.com ASAP! thanks! =]

Scroll Bar Show Up If Needed And Only Scroll To Dynamic Text Input Bottom... HOW
I have attached a copy of my scroll bar that i am currently using how can i make the scroll bar not show up unless needed (really not all that important but would be nice.)

The important thing is that i can setup a dynamic text box inside my item_holder movie clip but my scroller always scrolls to the bottom of the scroll box not matter if inside my scroll box i have on line of text loaded dynamicly or i have 100. So if i have 1 line of text and a large dynamic text box the scroll bar will scroll to the bottom of the scroll box even though it only has one line. See attachment and see if anyone can help. Thanks in advance. Brian

Scroll Text > Button > Load Txt File > Reset Scroll Bar...?
Hi i am looking for a tutorial or an explanation of how you can load an external text file into a text field and have...let's say 3 buttons that load the .txt files...when they are loaded...i want the scroll bar to be reset to the top of the text field/box....

any help...welcome...

ta...tiger...

Linking Text Buttons In Scroll To Image Outside Scroll Area
Hi,
I am desperately hitting my head against a brick wall - so please help me!

I have created a flash area that is divided up with an image on top and a scroll area under.

I am trying to get the text buttons in the scroll area to each change the image above and cant seem to get it to work because of the masking.

I have tried heaps and heaps of different ways and am going crazy!

PLEASE HELP ME!!!!


thanks,
kova

Using Buttons To Change Scroll Component's Dynamic Text
i haven't been using flash for real long and suprisingly have run into a problem, although, i have no idea why it isn't working. here's the dilemma: (using MX)

i have an instance of a scroll pane component called scrollPane located in the main movie, it automatically loads a file called news.txt. The goal is to have a new txt file load as the user clicks a button, however, this isn't happening. i've tried a million things, but this is the code i was told to use.

on (release) {
scrollPane.loadURL("bio.txt");
}

any ideas? i can send the fla file if anyone needs clarification.
thanks a bunch.

Scroll Bar Component OnRollOver Change Color Of Arrow
I have a scrollBar component and I want the arrow to change to a red color when I rollover it. How can I do this.
I have already set its globalStyleFormat.arrow = 0xFFFFFF;
Can this be changed when I rollOver a scroll button or press the button. But I only want it to effect the button I rollOver and not the other scroll button.

Listener Variable Change | NonCPU Useage Scroll
Last edited by pixcels : 2007-03-08 at 13:39.
























I have 2 questions, and I have tried to search for the answers but I can not find what I need.

First let me tell you about the platform. This is for a very slow 32meg Kiosk system, that uses an XML connection to send and receive information. First question - The XML connection sends text variables that change all the time. I need to be able to have several different dynamic text field in different movieClips that everytime the XML connection sends new text they will display it.

I have found that if I use "watch" then I can track the variable but is there a way to turn this off until it changes again? I am worried about CPU usage, will this effect it?

Second Question - I have multiple movieClips and I need a non CPU using(no OnenterFrame loops) marquee. If the text is to long to fit into the dynamic text box then it needs to scroll across the dynamic text box area, with no user interaction. I can use actionscript to tween if this will make it easier.

Make The Browser Scroll Bar Scroll A Flash Text Box?
Is there anyway that javascript can detect when and which scroll bar button is clicked? I want to use javascript to make the browser scrollbar scroll a flash textbox.

Please Help Me Place The Arrows Of My ScrollPane Scroll Bar Together On One End Of The Scroll Track
I have a scrollpane component with a movie clip of some thumbnail images.

I just want to have its scrollbar arrows together on one end of the track (or together ANYwhere) instead of having them at opposite ends of the scroll track.

I have been able to customize the appearance of the scrollpane and its scrollbar using the HaloTheme library, but that approach has so far been of no use in getting the arrows together.

I cannot tell you how deeply any help will be appreciated. I will probably sob and mewl with gratitude, the way I imagine someone lost in a vast rain forest for many weeks mewls when rescued. I am desperate. I am going insane. Please, please help me.

Modifying Position Of Scroll Arrows In Scroll Pane
Does anyone out there know how to modify the code of the standard Flash component scroll pane to allow you to place the arrows anywhere you want on the page? I was able to go in and assign x and y coordinates for them, but they seem to be linked to the bounding box somehow and whenever I raise or lower them the box follows suit, which ends up cutting of the content inside the box...

I didn't post any code because there is so **** much of it and I can't figure out where it is that the position of the arrows is linked to the position of that ****ed box (this is what I suspect the problem is, but please tell me if you know different!)!!!

HELP!!!!

Modifying Position Of Scroll Arrows In Scroll Pane
Does anyone out there know how to modify the code of the standard Flash component scroll pane to allow you to place the arrows anywhere you want on the page? I was able to go in and assign x and y coordinates for them, but they seem to be linked to the bounding box somehow and whenever I raise or lower them the box follows suit, which ends up cutting of the content inside the box...

I didn't post any code because there is so **** much of it and I can't figure out where it is that the position of the arrows is linked to the position of that ****ed box (this is what I suspect the problem is, but please tell me if you know different!)!!!

HELP!!!!

Scroll Bar Component Doesn't Scroll When Dynamic Txt Is Used?
I have a dynamic text box with the Flash UI component "Scroll Bar" attached to it. It works and scrolls fine when you enter text directelly into the dynamic box but when you use the loadVariables command to load an external txt file into it, it fails to scroll the text?
Is there a way to get it to scroll?

thx Bk9

Text + Image Scroll Function With Scroll Bar. Help
Hi, tring to create a scrollable text window that can also include different text colours, styles, links and images. I have tried a few tutorials but they only seem to work with dynamic text without different colours, styles, links and images. is there an easier solution i can use..

Please help

Scroll Page Scroll Bars/boarder
anyone have idea how to change the scrollpane scroll bars in 2004 and how to get wride of the border?

Scroll Gallery [doesn't Scroll After Particular Point]
Hello guys,

I have got this script from one of the opensource files on flashkit and want to use it for one of my requirements. Basically all I want to do is, scroll images vertically based on mouse movement. I've done that already but the issue is that when I have over 10-15 images, it doesn't scroll as there is no place left for the mouse to go further down. If you have a look at the attached file, you'll know what exactly I am talking about. Ideally, if mouse is held downwards, the images should keep scrolling untill it reaches it's end.

Can anybody have a look at the fla and help me out.

Cheers,
D

Scroll Wheel - Control Page Scroll?
Alrightly... So I have a flash file that is 750 x 1000 px and is embedded into an html page. Since it's height is a 1000px in order to see the whole flash file one needs to scroll down on the page. This is fine except that when people are working with the flash file (have clicked on it) and then want to use the scroll wheel it won't scroll the html page..

I realize this is because in flash you can assign your own properties to the scroll wheel. But is there a way to have the scroll wheel perform it's normal function of scrolling the html page?

I'm not sure if there is an easy way or if I would have to write some code for flash to call javascript to scroll the page? I know people must have run into this problem before and probably have some good solutions.

Thanks in advance

Scroll Text With Image In Scroll Panel ? Help
Hi,

I m trying scroll pannnel to show image and dynamic text both in scroll panne but when i select dymanic text in text option it comes outer from scroll pannel but static text is coming.

I need help to show dynamic text also in scroll pannel.

Thanks

Changing Quality On Scroll :: Scroll Plane
Hi There,

Does anyone know a easy way of getting the flash movie to change quality when a scroll plane is scrolling... I have loads of content in the plane and need to set the quality to low whilst scolling to improve performance....

at the moment I have this code.

Code:
var dragQual:Object = new Object();
dragQual.scroll = function(eventObj){
_quality = "LOW"
}
tDragObject.addEventListener("scroll", dragQual);
but it only sets the quality to low, once the user has finnished scolling I want the quality to go back to best....

Any Ideas?

Scroll Large Image With Out Scroll Bars
Does anyone know how to do this, not profient in Flash.

This is the effect I am after

http://www.moochi.co.nz/collection.html

Thanks

Scroll Text With Image In Scroll Panel ? Help
Hi,

I m trying scroll pannnel to show image and dynamic text both in scroll panne but when i select dymanic text in text option it comes outer from scroll pannel but static text is coming.

I need help to show dynamic text also in scroll pannel.

Thanks

Changing Quality On Scroll :: Scroll Plane
Hi There,

Does anyone know a easy way of getting the flash movie to change quality when a scroll plane is scrolling... I have loads of content in the plane and need to set the quality to low whilst scolling to improve performance....

at the moment I have this code.

Code:
var dragQual:Object = new Object();
dragQual.scroll = function(eventObj){
_quality = "LOW"
}
tDragObject.addEventListener("scroll", dragQual);
but it only sets the quality to low, once the user has finnished scolling I want the quality to go back to best....

Any Ideas?

Scroll Large Image With Out Scroll Bars
Does anyone know how to do this, not profient in Flash.

This is the effect I am after

http://www.moochi.co.nz/collection.html

Thanks

[scroll] Scroll That Reacts To The Mouse Wheel
Hy guys,

Do you know how can I make a scrollable text that reacts to the mouse wheel. Here you can see an example: link here

Look at the news section, or at the about us section.

The majority oh the text scrollers on the web didn't react at the mouse wheel. I found this site and I was surprised when I found that I can scroll with my mouse wheel.

Hope some one knows how they do that.

Thx.

Scroll Box Buttons - Constant Scroll?
Yo,

I've made a scrolling text box, but I cant figure out how to have it so when I simply hold my cursor over the up or down scroll button the text box will constantly scroll in the corresponding direction. I've tried while/for/do loops and I'm stuck, how would you do this utterly simple task?

Also, does anyone know how to make a working scroll bar? One that a user can click like a real windows environment window?

Scroll Bar With Buttons To Pics That Don't Scroll
Hi, I'm trying to make a scroll bar that has buttons in it, so that when you click on one of the buttons a pic shows up in the back ground...Trouble is that My pictures scroll also with the bar and I would like for them to stay stationary behind the scroll bar...Does this make any sense?

Thx Ezekiel

Scroll Pane Scroll Speed.
Can anyone tell me how to change the speed of scrolling for the scroll pane in MX? I have looked all over for it, but find nothing. When I am scroll it moves like half a line at at time...I'd like to see it faster.

Thanks

OnRollover Scroll Down...ondrag Scroll Up
Hey guys,

I was wondering if you guys could help me create a flash component for a site I'm working on right now. What I need is a scrollpane type thing, where when the user rolls over the content area, the content will begin to scroll down, and when the user rolls out, the content stops scrolling. Also, the user will be able to drag the content up (not down, they will only be able to drag the content up, they will rollover to make the content go down).

Could you please help me with this?

Thanks.

Nick

Copyright © 2005-08 www.BigResource.com, All rights reserved