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




Scrolling Text Won't Scroll



I have created a simple .txt file (review.txt) to load into a text field that begins with "textField=". I've created the dynamic text box with an attached scrollbar component, used a variable in the parameters (textField), and created an action layer with "loadVariablesNum("review.txt", 0);" in it.

The file loads, but won't scroll.

HELP!!! I have wasted too much time on this seemingly simple task and it must be simple to correct, right?



FlashKit > Flash Help > Flash ActionScript
Posted on: 10-20-2002, 11:29 PM


View Complete Forum Thread with Replies

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

Text Scrolling W/o Gap Afterwards- Making A Contstant Stream Of Text Scroll
How can I make some text scroll constantly without the whitespace gap afterwards e.g. if i was doing the string "Hello World ", it would scroll "Hello World Hello World Hello World", instead of waiting for "Hello World" to go completely off screen and then start again?

Thanks

Sam

Scrolling Text Using Scroll Bar
Hi mates,

I am facing problem when i try to scroll a dynamic text using a scrollbar. how to control using scrollbar??. i have to scroll buttons also. One on the top and other at bottom. The system is exactly like the windows scroll system.

Please help

sumal

Scrolling Text - Doesn't Scroll Using External Text
Okay, this is something I've got around using some fairly complex coding from these boards before, but I'm wondering if there's a much easier way.

I have a dynamic text box named "mainText", and am using buttons to scroll up or down with the following AS:

on (rollover, dragOver) {
_root.mainText.scroll -= 1; // change to += to go down
}

Now, this works fine if the txt is placed in the actual text box, but if I load external text it does not scroll.

Is there a simple way around this?

Cheers
Dave

Scrolling Text Have A Limit On Amount Of Text It Can Scroll?
Hi all,

I've created a dynamic scrolling text field with two buttons up and down. It seems to work fine except that it won't scroll the entire document. It gets about half way and just stops and won't let you scroll any further. I can't figure this one out and I can't seem to find any info on any forum. The file was created in text edit and doesn't have any funky characters in it and the down button code is:
on (release) {
biosText.scroll+=5;
}

the text code is:
stop();
loadVariables("biosText.txt", this);

Thanks

Scrolling Text Have A Limit On Amount Of Text It Can Scroll?
Hi all,

I've created a dynamic scrolling text field with two buttons up and down. It seems to work fine except that it won't scroll the entire document. It gets about half way and just stops and won't let you scroll any further. I can't figure this one out and I can't seem to find any info on any forum. The file was created in text edit and doesn't have any funky characters in it and the down button code is:
on (release) {
biosText.scroll+=5;
}

the text code is:
stop();
loadVariables("biosText.txt", this);

Thanks

Scrolling Text Have A Limit On Amount Of Text It Can Scroll?
Hi all,

I've created a dynamic scrolling text field with two buttons up and down. It seems to work fine except that it won't scroll the entire document. It gets about half way and just stops and won't let you scroll any further. I can't figure this one out and I can't seem to find any info on any forum. The file was created in text edit and doesn't have any funky characters in it and the down button code is:
on (release) {
biosText.scroll+=5;
}

the text code is:
stop();
loadVariables("biosText.txt", this);

Thanks

Scrolling Text Have A Limit On Amount Of Text It Can Scroll?
Hi all,

I've created a dynamic scrolling text field with two buttons up and down. It seems to work fine except that it won't scroll the entire document. It gets about half way and just stops and won't let you scroll any further. I can't figure this one out and I can't seem to find any info on any forum. The file was created in text edit and doesn't have any funky characters in it and the down button code is:
on (release) {
biosText.scroll+=5;
}

the text code is:
stop();
loadVariables("biosText.txt", this);

Thanks

Scroll Menu, Scrolling Text
I have seen a couple of flash sites with a scroll bar, and a "button" you can drag, and the text scrolls.

I am trying to figure out how to do this in flash- I have my bar, and button/movieclip that you have to drag and it even works when you drag it!

But how do I "attach" this to my text is what I want to know, so when the user drags the button/MC the text will scroll as they drag.

Thanks!!

Custom Scroll/scrolling Text Please Help
I am trying to figure out how to scroll text in my movie when the user either rolls over the button or when they click on the button? How is this accomplished. I have seen it on many sites. and would like to incorporate it. any suggestions? greatly appreciated.

ryan

Text Scrolling (creating A Scroll Bar)
I am working on a site with alot of text and am trying to make my inw scroll bar. I can get the up and down buttons to work, my prolbem is the up & down dragable part of the bar.

If anyone has any ideas it would help alot.

thanks
Ben

Scrolling Text Box, W/ Scroll Bar Control
Ok, I am frustrated!

I am trying to get a text box to fit in a limited about of screen space by providing a scrolling screen for it. (Similar to browsers,) you place your mouse on the scroll bar to the left anf press to make the display screen move up or down. This is in no way a new idea and it seems pretty simple, but I am floundering and embarassing MYSELF with my lame attempts at scripting this. I can not even get the slider to properly slide let alone move the text clip. I have included a fla and a swf so you can see what I mean and laugh at my pathetic script. (I did!) Thanks so much for your help!!!
Angie

FLA:
http://www.a1flash.com/flashkit/test.fla

SWF:
http://www.a1flash.com/flashkit/test.swf

Scrolling Text From XML Obj. W/scroll Prop
Does anyone know why the old scroll property for scrolling a text box in Flash doesn't work when filling the text box with content from a dynamically loaded XML file?

Scrolling Text: With Scroll Bar Component
Hi everyone i know how to scroll text using the scroll bar component but using that... it makes the backround white is there anyway i can change the colour of this using the scroll bar?

Scrolling Text By Using The Mouse Scroll
Hi,
I have scrolling text on my website, it scrolls if you hold your mouse on the UIScroller, but I want to be able to scroll my text just by clicking on the text field and using my mouse scroll. The problem is that I am new to Flash and to Actionscript. If somebody can help me will be great.
P.S.You can look what I am talking about on the following address:
http://oneplusone.missouristate.edu/home.htm
under "the project"

My Scrolling Text Doesn't Scroll
Well People,

Here I am with another problem. I am following the Kirupa tutorial on "Scrolling Dynamically Loaded Text". Once again I have followed the tutorial exactly, but it doesn't seem to be working.

This is what I'm seeing. When I preview the movie I see the first several lines of text in the text area, but the text is not formatted in the manner I chose in the properties dialog box. The text box scroll bar does not move and the text doesn't scroll.

What could I possibly be doing wrong? Any help is greatly appreciated.


Thanks,



Kelly

My Scrolling Text Doesn't Scroll
Ok guys,

That same problem from last night is still occuring. I did exactly what the tutorial stated, but it doesn't scroll. From all that I have done it appears that it might have something to do with the formatting of the text file - not sure though. would someone please look at my attached files and see if they can figure out what I'm doing wrong?


Thanks,



Kelly

Scroll Bar/Scrolling Text Field
Hello,
I am tryin to find how to make a scrooling text field like the one here at aisgrafiks under the services (bottom left hand corner) section please help me. I really need help with how to put the text in and make it scrool thank you in advanced

Loaded Text Anyway Of Text Scrolling Without Using Scroll Bar?
Hi All
Im only new-Was onto the tute about scrolling dynamically loaded text-
Its great got it working!I was wondering if there is any way of allowing the text to scroll automatically upwards as the info in the news box will be small so the clients want it to be constant eg"Dont forget halloween...Dont forget "etc scrolling upwards
they want to update the news box themselves
Thanks in advance!
L

Scrolling Text With A Mouse Scroll Wheel
Is it possible to scroll text in Flash with a mouse scroll wheel? If you don't know what I'm talking about, this is the wheel between the two mouse buttons found on PCs.

If you've done this, please give me some direction. How is it done? Is there an FLA somewhere? Etc.

Thanks in advance.

-scott
http://scottmanning.com

Scrolling Text By One Line Without Textbox.scroll
I'm trying to move a textbox line by line in a nice smooth way, rather than using textbox.scroll which would 'jump' from line to line.

My problem is finding the right amount of pixels to constrain by.

There seems to be an indefinite amount between lines??
I've set the linespacing to 0, and my fontsize is 15pt. During authoring, the distance between lines seems to be 15px, but this causes synch problems after publishing. I also tried finding the size of the textbox and dividing this by the number of lines. This gives me about 15.5 px, which for some reasn is also too much.
Code:
code:
t_info2.autoSize = "left";
info2 = "line1"+newline+"line2"+newline+"line3"+newline+"l ine4"+newline+"line5"+newline+"line6"+newline+"lin e7";
_root.onMouseDown = function() {
oldY = t_info2._y;
spacer = t_info2._height/7
_root.onEnterFrame = function() {
t_info2._y -= 1;
if (t_info2._y<=oldY-spacer) {
delete _root.onEnterFrame;
}
};
};

Is there a better way to do this??
Many thanks in advance.
fla attached.
Click to advance line by line, it will start to fall out of sync at about line5.

Scrolling Dynamic Text With Out Scroll Bar Or Buttons
I need to develop a .swf that slowly scrolls down dynamic text and loops it seamlessly. I have built an example in javascript but it needs to be done in flash. Is this even possible? For an example of what I am talking about go to http://www.lenderlab.com/subnetx and look on the left hand side under loan highlights. If it's possible please let me know asap.

much thanks

Scrolling Text Already Masked (how To Scroll W/o A Mask)
http://www.clayton.bellmor.com/

On the home page, I have a mask that slides up and shows the text in both tables.
As you probably can see, the text field on the right is long and I need to have it scrollable.

How is this accomplished considering I've already masked the text once, and it doesn't look like I can mask a mask...

the .fla is at http://www.clayton.bellmor.com/inlaytext.fla

Thanks!

Help With Scrolling Dynamic Text And Using Custom Scrollbars To Scroll It
Hi all,

Thank you for the interest in my post.

I have been having real serious problems with making dynamic text and making custom scrollbars to scroll the text from a .txt file. I've had a look at the Macromedia tutorial on their site and searched for an appropriate tutorial but just can't follow it as it doesn't say which frames etc. to put the code in as I'm new to MX - I either need step by step instructions for someone or need someone to make it all for me so I can see can check out the code and visually see how it's done.

Would it at all be possible if I gave someone an .fla with my custom scroll buttons and tracker etc. for them to make the dynamic text and add the code etc. and e-mail it back to me so I can fully see how it's done please.

You will get full credit for your work on the site and a link to your site - this site is for a signed band here in the UK so the hits are likley to be very high too. If you can help me, please put your e-mail address as a reply and I'll send you the fla.

Thank you very much for your assistance - if you can help me with this, it will be very much appreciated. I hope to hear from you.

Take care,

Mark

Dynamic Text Scroll Arrow Hold To Keep Scrolling
I'm desperately trying to see if someone has a way to scroll dynamic text that keeps scrolling up or down when the appropriate button is clicked and held. Here's my code for single click line up and down, but that's kinda weak.


Code:
texUp_mc.onPress = function(){
ctr_body_txt.scroll = ctr_body_txt.scroll -1;
}

texDown_mc.onPress = function(){
ctr_body_txt.scroll = ctr_body_txt.scroll +1;
}
Thanks!

Scrolling Text With A Motion Tween, But WITHOUT SCROLL BARS
Hello,

I'm desperate!!
I'm more or less a noop on Flash CS3 and I'm trying to learn it myself. Now I'm already for three or four weeks busy to get scrolling text WITHOUT SCROLL BARS!!! I see a lot scrolling text but everytime with scroll bars.

I'm a little bit further I believe. What I mean and where I'm looking for is called a news ticker or scrolling a news text

What I want is next:
On the http://www.nicovandekamp.nl/bin-debug/project.html you can see how far I'm.
The following steps.
1. I can switch the tv on with the left white square button.
2. The film movie starts. That's good.
3. After the movie, scrolling text commes up and start -to fast- scrolling. But so as you can see the mc_mask and the mc_scrollingtext are already there.
4. After the scrolling text is finished the (team) foto is comming up. That's good

Now I have the following questions:
1. When the movie is finished the textarea with the scroll text must come up (alpha 0.0 --> 1.0 OR with a mask?).
2. Minor issue: I have still problems with positioning the mc_mask/mc_scrolltext.
3. How can I control the scrollspeed?
4. Is there a event.complete to detect that the scrollingtext is finished. It's now done with a timer but I think it's better to do it with event.complete.
5. I have heard of mask but how does this work? On the upper and the bottom of the text area I like to have "soft edge", So that it seems that the text scrolling out of "mist" (i hope that you understand what I mean).
6. can this be done by an motion tween

I HOPE THAT SOMEBODY CAN HELP ME WITH A MORE CONCRETE EXAMPLE. It would give me a lot of peace of mind!!!!

THANKS IN ADVANCE.

Nico

Scrolling News Text Wont Scroll Off Screen Properly
Hello again -
I had some very useful help yesterday & got this news ticker working...
But one last thing eludes me -
How do I get the text to roll off the left of screen completely before returning from the right again?
I've tried loads of stuff but don't know what I'm doing!

Here's the code:

Code:
var loadText:LoadVars = new LoadVars();
loadText.load("news.txt");
loadText.onData = function(src:String):Void {
if (src != undefined) {
news_txt.htmlText = " "+src;
scrollText();
} else {
news_txt.htmlText = "could not load data";
}
};
function scrollText() {
onEnterFrame = function () {
if (news_txt.hscroll<news_txt.maxhscroll) {
news_txt.hscroll+=30;
} else {
news_txt.hscroll = 1;
}
};

}
Don't mind the speed of the text - it's just to get through it quicker for the sake of testing!

Anyone able to help?
I've included the files...

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

Scroll Bar That Keeps Scrolling?
Hello,

Does anyone know how to make a scroll bar that keeps scrolling even after you let go?

any help would be appreciated!!!!

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.

Scrolling Hyperlinks In A Scroll Box?
i want to make a scroller on a links section, its gotta be able to scroll links in a box about 200px wide, i want to make it like a regular hyperlink....what would be the easiest way to go about doing this, and take into consideration, that it has to be easy to update or change, because its not going to be me updating it.thanks in advance. =)

Scrolling Images With A Scroll Bar
I'm trying to set up a register form in flash and want to scroll the box's using the scroll bar is this possible???

Scroll Box - Scrolling Form
I have a 'form' which is too long for the page. I need to attach a scrollbar to the form, so that I am able to scroll the form up and down. What is the best way to do this?

Scrolling A Movie With A Scroll Bar
How do i make a movieclip scroll with a scroll bar of my own design? I created the scroll bar and the scroller on the scrollbar.

Scrolling A Movieclip Down (without A Scroll Bar)
Hi, I'm new to the site and was wondering if someone could help me. I have a movieclip that I am scrolling up and down using two buttons (and up and a down arrow). I found some code on how to continually scroll while the mouse is down, (on press and setProperty -- it works great except for one thing -- if doesn't stop scrolling. I put in an if statement but think i did it wrong because if i hold down the button, the movie clip continually scrolls. only if i release the mouse and then click will it listen to my if statement. can anyone help? anything that will make me able to scroll my movie clip would be soooooooooooooooooooooo helpful!!!!!!
thanks!
kathy

Using On Rollover To Scroll, And Keep Scrolling
Hi,

Cap in hand again. I'm trying to achieve a certain effect within a site, and I was wondering if it was even possible.

I have a mask set to the stage size that moves over a movieclip significantly larger than the stage. I would like to set the control buttons so that when the mouse was over them, the clip continued to move, without clicking, and when the mouse rolled off them, or it hits the edge of the movie clip it stops scrolling.

I'd be really grateful if someone could give me an indication as to whether this is possible, and if so, a heads up as to where to start (tutorials that might apply).

Thanks in advance.

Scroll Box Not Scrolling Once Loaded
I'm working on a project where I am loading an swf into the main swf using loadmovie into a target. The external swf is a text with a scroll bar which works fine alone but if I load it into the target of the main swf the scroller doesn't drag however the hitarea on the button is still appears to be working. Anyone got any idea what I need to do to fix the problem?

Also if I have multiple external files am I better off using the loadMovieNum command instead of loadmovie? What is the difference between them?

Scroll Bar Shows Only When Scrolling Is Needed.
I am trying to make a scroll bar show only when the text has gotten long enought to facilitate its use. The problem i am running into is how to count the number of lines in the text window so that if the line count is greater than set number then the display property is set to true. Right now I have it set to count the length of the text string but that doesn't work well because it counts ENTER as a charecter. So I hit enter 10 times its only 10 characters. Any ideas?

Scrolling Images With Scroll Buttons
can someone tell me how to or point me to a tutorial to build a navigation bar like the one on: http://nothingrecords.com/index2.html
(at the bottom of the page).

Scroll Pane Scrolling Problems
I have loaded a movie into the scroll pane. The problem is that the movie changes heights after XML is loaded in and the scroll pane doesn't register the change in height for the scroll bars. Is there a way to tell an instance of a Scroll Pane to update what it has registered as the min and max scroll positions.

Very Simple Scroll Bar That Won't Stop Scrolling
hey,

I have made a very simple scroll bar (attached). And it works fine. I stops scrolling where i want it to stop. But, when i export my "info.swf" file, the file that has the scroll bar, and load it into another movie, then my scroll bar scrolls continously. I don't know what i am doing wrong.


Baljinder

[ Scrolling Content With Scroll Button ]
Hi,

I have used various scrolling scripts but most seem out of date nowdays ...
I am hoping if someone has nice scrolling script with easing (for custom scroll content images and text) that can also be used with the mouse scroll button
and is portable easy to drop in to the page without having to adjust tons of parameters.

I found one script which is not all that flexible as it seem to be relevant to the top left corner ... most issues arise when I mask the text ... so I wont go into that unless there are no good solutions out there...

something like oringe.com just so that it can be used anywhere in the page not just full screen ....

Thanks

Scrolling Menu, Auto Scroll Help
I'm working with a scroll bar photo gallery in FlashMX, and am having trouble getting the action scripting just right. Everything seems to work fine at first glance, but when you begin to interact (click, then click/hover over the arrows) the auto scroll takes on a mind of its own and goes crazy. Can someone please tell me how to either remove the auto scroll function from this code or fix the problem? I'd be happy with either solution.

For reference, you can view the SWF in progress here :
http://www.thehiphouse.com/staging/b...inqueterre.swf

And here's my current action script associated with the scrolling menu:
function rightMove()
{
var _l1 = 0;
while (_l1 < len)
{
mc = sImg["Img" + _l1];
if (mc.targetx == -imgSpa)
{
mc._x = mc.targetx = imgSpa * viewImg;
mc.no = rightNum;
loadImg(mc, sroute, rightNum);
loadImg(rImg, rroute, rightNum);
if (rightNum == totalImg - 1)
{
rightNum = 0;
}
else
{
rightNum++;
} // end if
if (leftNum == totalImg - 1)
{
leftNum = 0;
}
else
{
leftNum++;
} // end if
}
else
{
mc.targetx = mc.targetx - imgSpa;
} // end if
_l1++;
} // end while
} // End of the function
function leftMove()
{
var _l1 = 0;
while (_l1 < len)
{
mc = sImg["Img" + _l1];
if (mc.targetx == imgSpa * viewImg)
{
mc._x = mc.targetx = -imgSpa;
mc.no = rightNum;
loadImg(mc, sroute, leftNum);
loadImg(rImg, rroute, leftNum);
if (leftNum == 0)
{
leftNum = totalImg - 1;
}
else
{
leftNum--;
} // end if
if (rightNum == 0)
{
rightNum = totalImg - 1;
}
else
{
rightNum--;
} // end if
}
else
{
mc.targetx = mc.targetx + imgSpa;
} // end if
_l1++;
} // end while
} // End of the function
function auto()
{
if (chk == true)
{
rightMove();
}
else
{
leftMove();
} // end if
} // End of the function
function loadImg(mc, route, num)
{
mc.loadImg.loadMovie(route + "image" + num + ".jpg");
} // End of the function
totalImg = 19;
viewImg = 19;
imgw = 50.500000;
space = 6;
rroute = "http://www.thehiphouse.com/staging/bellahomes/img/cinqueterre/rimage/";
sroute = "http://www.thehiphouse.com/staging/bellahomes/img/cinqueterre/simage/";
speed = 5500;
chk = true;
len = viewImg + 2;
imgSpa = imgw + space;
k = 0;
i = 0;
sImg.Img._visible = false;
rImg.loadImg.loadMovie(rroute + "image0.jpg");
while (k < len)
{
mc = sImg.Img.duplicateMovieClip("Img" + k, k);
mc.targetx = mc._x = imgSpa * k;
mc.no = i;
loadImg(mc, sroute, mc.no);
if (k == viewImg + 1)
{
mc._x = mc.targetx = -imgSpa;
mc.no = i = totalImg - 1;
loadImg(mc, sroute, mc.no);
} // end if
mc.onRollOver = function ()
{
clearInterval(time);
};
mc.onRollOut = function ()
{
time = setInterval(auto, speed);
};
mc.onRelease = function ()
{
if (tamp != this.no)
{
loadImg(rImg, rroute, this.no);
tamp = this.no;
} // end if
};
if (i == totalImg - 1)
{
i = 0;
}
else
{
i++;
} // end if
mc.onEnterFrame = function ()
{
this._x = this._x + 0.200000 * (this.targetx - this._x);
};
k++;
} // end while
rBt.onRelease = function ()
{
rightMove();
clearInterval(time);
chk = true;
};
rBt.onRollOut = function ()
{
time = setInterval(auto, speed);
};
lBt.onRollOut = function ()
{
time = setInterval(auto, speed);
};
lBt.onRelease = function ()
{
leftMove();
clearInterval(time);
chk = false;
};
rgn = sImg["Img" + viewImg].no;
if (rgn == totalImg - 1)
{
rightNum = 0;
}
else
{
rightNum = rgn + 1;
} // end if
leftNum = totalImg - 2;
time = setInterval(auto, speed);

Thanks in advance!

Adding Scroll Bar To Scrolling Arrows
Hi,

I've got this scrolling image. That use's arrows and

For scrolling up:

Code:
on (rollOver) {
tellTarget ("control") {
gotoAndPlay(2);
}
}
on (rollOut, dragOut) {
tellTarget ("control") {
gotoAndStop(1);
}
}


For scrolling down:

Code:
on (rollOver) {
tellTarget ("control") {
gotoAndPlay(5);
}
}
on (rollOut, dragOut) {
tellTarget ("control") {
gotoAndStop(4);
}
}


Then on my main stage I have a MC called "text" and inside text there's another movieClip called "content".

Is there a simple way to add a ScrollBar on the side? Without using a component?

Many Thanks
Bmcc

Scroll Bar Content Scrolling Issues
Hi! I am trying to get images to scroll with the scroll bar, and I am having trouble with which way the content is scrolling. What happens is that the content does not show what is masked and also shows empty space above when the scroll bar scrolls down. (Sorry, I'm probably not explaining very clearly). I have attached the .fla file, so hopefully that will help. Here is the code I have so far:

//Code for Scrollbar
//Scroll Track = tray_mc.physChar_mc.scrollBarTotal_mc.scrollTrack_ mc
//Scroll Bar = tray_mc.physChar_mc.scrollBarTotal_mc.scrollBar_mc
//Content Mask = tray_mc.physChar_mc.masker_mc
//Content = tray_mc.physChar_mc.physCharContent_mc

import caurina.transitions.*;

var scrollPercent:Number = 0;
var minScroll:Number;
var maxScroll:Number;
var yMax:Number = tray_mc.physChar_mc.scrollBarTotal_mc.scrollTrack_ mc.height - tray_mc.physChar_mc.scrollBarTotal_mc.scrollBar_mc .height;

function dragScroller(event:MouseEvent):void {
var dragX:Number = tray_mc.physChar_mc.scrollBarTotal_mc.scrollTrack_ mc.x - tray_mc.physChar_mc.scrollBarTotal_mc.scrollBar_mc .width/2 + 1;

var dragY:Number = tray_mc.physChar_mc.scrollBarTotal_mc.scrollTrack_ mc.y;
var dragW:Number = 0;
var dragH:Number = tray_mc.physChar_mc.scrollBarTotal_mc.scrollTrack_ mc.height -
tray_mc.physChar_mc.scrollBarTotal_mc.scrollBar_mc .height;

tray_mc.physChar_mc.scrollBarTotal_mc.scrollBar_mc .startDrag(false, new Rectangle(dragX,dragY,dragW,dragH));

stage.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
stage.addEventListener(Event.ENTER_FRAME, setScrollPercent);
}

function stopDragging(event:MouseEvent):void {
tray_mc.physChar_mc.scrollBarTotal_mc.scrollBar_mc .stopDrag();
stage.removeEventListener(Event.ENTER_FRAME, setScrollPercent);
}

function setScrollPercent(event:Event):void {

scrollPercent = (tray_mc.physChar_mc.scrollBarTotal_mc.scrollBar_m c.y)/yMax;

if(scrollPercent < 0) {
scrollPercent = 0;
} else if(scrollPercent > 1) {
scrollPercent = 1;
}

Tweener.addTween(tray_mc.physChar_mc.physCharConte nt_mc, {y:(-scrollPercent*(tray_mc.physChar_mc.physCharContent _mc.height-
tray_mc.physChar_mc.masker_mc.height)), time:1});
}

tray_mc.physChar_mc.scrollBarTotal_mc.scrollBar_mc .addEventListener(MouseEvent.MOUSE_DOWN, dragScroller);
tray_mc.physChar_mc.scrollBarTotal_mc.scrollBar_mc .buttonMode = true;

Thanks!

Adding Key Press Scrolling To Scroll Box
Hi all,

I have this code (see below) for a scrolling text box. I would like to add to it that if the user presses or holds down the down arrow key on the keyboard, (and if possible if the user scrolls with the mouse wheel) the scroll should work too. I have tried a number of ways including adding it as a listener, a variable and just a plain on function but it has not worked. No matter what I try, the player does not seem to recognize the key press. My file is over 13 mb and this is my first post so I'm not sure if I can upload it. If you need to see it, I'll email it to you.

The only thing is that it has to be compatible with AS1.


Here is my original code:

thanks!
Aryeh












Attach Code

txt.setMask(mask)
scrollbar.onMouseDown = function() {
if (this.hitTest(_root._xmouse, _root._ymouse) && txt._height>mask._height) {
this.startDrag(false, scrollbarBG._x, scrollbarBG._y, scrollbarBG._x, scrollbarBG._height-this._height)
txt.onEnterFrame = scrollThumbs;
dragging = true
}
};
scrollbar.onMouseUp = function() {
stopDrag()
dragging = false
delete this.onEnterFrame;
};
function scrollThumbs() {

var funkyVar = -this._parent.scrollbar._y*(((this._height-this._parent.scrollbar._height)/(this._parent.scrollbarBG._height-this._parent.scrollbar._height))-1)
this.Y = (funkyVar-this._y)*.2;
this._y += this.Y;
if(Math.abs(funkyVar-this._y)<1 && !dragging){
delete this.onEnterFrame
}

}

LoadMovie(scroll.fla)into Main.fla-not Scrolling
Hello. I have created a .fla file containing a scroll window (not scrollPane, homemade), scroll.fla. It scrolls fine as an independent .swf file but when I load it into my main movie, main.fla., it will not scroll.
I have changed the path in the scroll.fla to incorporate the path in main.fla but that didn't work either.
Any ideas are greatly appreciated.
Thank you and best regards...

Horizontal Scroll Won't Stop Scrolling
I've got a problem with nice horizontal scroll bar (originally from Claudio). It won't stop scrolling! There seems to be no way to set the end x coordinate for it in the as layer.
This would be the perfect thing if only it would stop scrolling empty space at the end
of the images. No matter how many images you have in there it will still have that empty white space at the end of the scroll. HELP ANYONE?

Attached fla.

I'll paypal $10 to the 1st one who will fix this succesfully. This should be an easy fix.

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