Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-29-2000, 07:27 PM   #1
jake88
Registered User
 
Join Date: Dec 2000
Posts: 72
Default To FlashGuru - Help

does anyone know of a tutorial that shows you how to do a continuous text scroll. I know how to scroll a text but you have to keep pressing the scroll button to scroll each line. What I need to do is to scroll the text by pressing down on the scroll button and it scrolls continuously without me having to press the button each time. a good example would be the MS Windows scroll bars, you could either press once to scroll one line or keep it down to scroll continuously. I've found ones that has continuous scroll but the text has to be within the moive, What I am looking for is to do the continuous scroll with a loaded text with the loadvariablenum command.
jake88 is offline   Reply With Quote
Old 12-29-2000, 11:40 PM   #2
FlashGuru
Flash'a'holic
 
Join Date: Dec 2000
Location: London, UK
Posts: 82
Send a message via ICQ to FlashGuru
Default

ok create a new movieclip and give it these actions:

onClipEvent(enterFrame){
if(_root.scrollup){
_root.textfieldname.scroll++
}else if(_root.scrolldown){
_root.textfieldname.scoll--
}
}

now on your up button add this code:

on(press){
_root.scrollup=true
}
on(release, release outside){
_root.scrollup=false
}

And finally add this code to your down button:

on(press){
_root.scrolldown=true
}
on(release,release outside){
_root.scrolldown=false
}


now you should have a fully functional continuous scroller
FlashGuru is offline   Reply With Quote
Old 12-30-2000, 12:18 AM   #3
jake88
Registered User
 
Join Date: Dec 2000
Posts: 72
Default

Thank You, I'll try that.
jake88 is offline   Reply With Quote
Old 01-03-2001, 12:01 AM   #4
jake88
Registered User
 
Join Date: Dec 2000
Posts: 72
Default

Hey FlashGuru

I followed the instructions you gave, but it didn't work.

Here is what I have:


On the main time line I have a movie clip called update
and on the clip I have put the following action into it:

onClipEvent (enterFrame) {
if (_root.scrollup) {
_root.textfieldname.scroll++;
} else if (_root.scrolldown) {
_root.textfieldname.scoll--;
}
}

Then, within the update movie clip I have the scroll buttons and on the up button I have assigned the following actions:

on(press){
_root.scrollup=true
}
on(release){
_root.scrollup=false
}

and on the down button I have the following actions:

on(press){
_root.scrolldown=true
}
on(release){
_root.scrolldown=false
}

The text field variable is update as well.

in the movie clip I also have assigned the following actons to load the text file:

loadVariables ("/update.txt", _root.update);


but when I go and test it, it doesn't work. Could you, or perhaps some other expert please help me out? Thanks

jake88 is offline   Reply With Quote
Old 01-03-2001, 05:31 AM   #5
minor
Registered User
 
Join Date: Jan 2001
Location: toronto
Posts: 10
Question scrollup/scrolldown

are the scrollup/scrolldown instances, variables or built-in properties of flash5? just wondering...
minor is offline   Reply With Quote
Old 01-03-2001, 07:37 AM   #6
jake88
Registered User
 
Join Date: Dec 2000
Posts: 72
Default

never mind,

I figured it out. But Now I have questions in regards to the script:

1st: Why was the "if" command used?
2nd: the line "_root.textfilename.scroll--;" in flash 5
normal mode, how do you enter it (for people that are
new to actionscript)? I can't find anything to click
on to generate that. I just copy and pasted, but I'd
like to know for the future.
3: Perhaps someone could explain in detail how
the scripts work or why the certain commands
are used.

Thanks



[Edited by jake88 on 01-03-2001 at 01:45 AM]
jake88 is offline   Reply With Quote
Old 01-17-2001, 04:25 PM   #7
flyrod
way of the other
 
flyrod's Avatar
 
Join Date: Jan 2001
Location: Brooklyn, NY
Posts: 107
Default additional Question

can i make flash check for certain .txt files @ a specific time interval? i guess you can think of thia as similar to an outlook date/time reminder...

tah!
flyrod is offline   Reply With Quote
Old 10-11-2002, 04:10 PM   #8
stanlee_max
StanLee_Max
 
Join Date: Oct 2002
Location: Canada
Posts: 54
Question Scrolling Text

I am having the same problem... I wonder if you could show me how to set it up? I wonder if you could attach the Flash file so I can take a look at to see where I made the mistake.

I have this scrolling text flash file that only work with static text but when i convert it to dynamic text it won't show up.

Please can you help me out on this...Thanx..


Here is the file..

// =========== SCROLL INIT ===================

// Specify the name of the clip to scroll.
var scrollTarget = _root.content;

// Specify the name of the clip that will act
// as the background for the scrolled clip.
// scrollTarget will only move within the bounding
// box of scrollBG.
var scrollBG = _root.contentBG;

// Specify amount of room to allow scrolling after
// the bottom of the scrollTarget has been reached.
var bottomBuffer = 20;

// Specify scrolling speed, in pixels per second.
var scrollSpeed = 100;





/*
*************************
*** FUNCTION scroll() ***
*************************

> DESCRIPTION:
Moves scrollTarget up or down, within legal scrolling limits
determined by the dimensions of scrollBG. Called by an
enterFrame event on an empty clip on the scroll process layer.
*/

function scroll () {
// Determine how much time has last since the last scroll.
thisScrollTime = getTimer();
elapsed = (thisScrollTime - lastScrollTime);

// Calculate distance to move based on elapsed time.
scrollDist = (elapsed / 1000) * scrollSpeed;

// Move at least .5 of a pixel. Smaller amounts are not
// rendered by the player.
scrollDist = scrollDist < .5 ? .5 : scrollDist;


// If the down button is being held...
if (scrolling == "down") {
// Determine the y-coord of the bottom of scrollTarget
var scrollBottom = scrollTarget._y + scrollTarget._height + bottomBuffer;
// Determine the y-coord of the bottom of scrollBG
var scrollBGbottom = scrollBG._y + scrollBG._height;
// Check how far scrollTarget is from the legal lowest scroll point.
var distanceToBottom = scrollBottom - scrollBGbottom;

// If the amount to move won't overshoot the legal lowest scroll point...
if (distanceToBottom > scrollDist) {
// ...then move the calculated amount.
scrollTarget._y -= scrollDist;
} else {
// ...otherwise just go to the legal limit.
scrollTarget._y = scrollBGbottom - (scrollTarget._height + bottomBuffer);
}
} else if (scrolling == "up") {
// The up button is being held, so scroll up if possible.

// If the amount to move won't overshoot the legal highest scroll point...
if (scrollTarget._y + scrollDist < scrollBG._y) {
// ...then move the calculated amount.
scrollTarget._y += scrollDist;
} else {
// ...otherwise just go to the legal limit.
scrollTarget._y = scrollBG._y;
}
}

// Remember the time so we can calculate how long it's been
// between moves next time we scroll.
lastScrollTime = thisScrollTime;
}

Last edited by stanlee_max; 10-11-2002 at 05:20 PM..
stanlee_max is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Text / Var into 1 Scroll Box brutalbliss ActionScript 1.0 (and below) 7 01-06-2008 01:26 PM
Text Scroll rather than MC Huw Components 2 09-25-2006 05:08 PM
CSS in external scroll text helvetica ActionScript 2.0 2 07-26-2006 07:04 PM
dynamically loaded text isn't masked in a scrollpane? Darkware Components 0 09-10-2005 11:49 AM
scrolling dynamic text in loaded .swf DiDi ActionScript 1.0 (and below) 2 09-10-2002 05:46 PM


All times are GMT. The time now is 11:37 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.