Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

continus scroll??... 1

Status
Not open for further replies.

BigBadDave

Programmer
May 31, 2001
1,069
EU
If you want to do this with tweening and keep it smooth I think you could use gotoAndPlay at the end to target a frame halfway through the animation which would give the illusion of continuity: target a frame after one that looks exactly the same as the final frame.

Crap explanation. It would be much easier if I could draw pictures...

Failing that, here's a script alternative...


Four boxes (box 1 thru box 4 as instance names), two buttons (one sets "direction" to -1, the other sets it to 1) and this code in the control clip...

onClipEvent (load) {
min = 20;
max = 360;
numBoxes = 4;
space = (max-min)/numBoxes;
for (i=1; i<=numBoxes; i++) {
_root[&quot;box&quot;+i]._y = Math.floor(min+(space*(i-1)));
}
}
onClipEvent (enterFrame) {
for (i=1; i<=numBoxes; i++) {
clip = _root[&quot;box&quot;+i];
clip._y += _parent.direction;
if (direction=-1 && clip._y<min) {
clip._y = max;
} else if (direction=1 && clip._y>max) {
clip._y = min;
}
}
}
 
Yep, just change the value of &quot;direction&quot; to a larger number and it'll scroll faster.
 
you're speed is _root.direction so increase it to -5 and it'll go up faster, +5 it'll go down
 
darn you wang you beat me while i was typing. i'll get you yet! muhahahahah
 
now that's funny...5 days ago you were typing at the same time..

amazing!!
logo.gif


carlsatterwhite@orlandomediasolutions.com
 
haha i'm blind i think. long day at work. hehe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top