# Flash as3 infinite scrolling

**URL:** https://forum.kirupa.com/t/flash-as3-infinite-scrolling/301979
**Category:** Uncategorized
**Created:** [December 18, 2009, 4:59pm UTC](https://forum.kirupa.com/t/flash-as3-infinite-scrolling/301979 "2009-12-18T16:59:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![koko\_kitty](https://avatars.discourse-cdn.com/v4/letter/k/97f17d/32.png) [@koko\_kitty](https://forum.kirupa.com/u/koko_kitty)
#### Post date: [December 18, 2009, 4:59pm UTC](https://forum.kirupa.com/t/flash-as3-infinite-scrolling/301979/1 "2009-12-18T16:59:05Z")

</div>

Ok. first off, forgive me, because I know this has been asked a ton of times, in this forum especially.  
I’ve been reading these posts trying to solve my problems and I can’t solve them, ☹

I want to make images scroll infinitely across a flash file.  
I used the infinite scrolling tutorial, googled how to convert to as3, and it works, almost.

things I need help with–  
the speed=it’s too fast.  
mouseover=I don’t WANT to mouse over, I want it to just scroll continuously.

problems–  
it almost works, but it jumps over and over instead of scrolling.

I took 2 flash classes in college and dont remember any of it.  
if anyone could help… ;-; thanks

the code—

import flash.events.Event;  
var xcenter:Number=150;  
var speed:Number=1/10;

infiniteGallery.addEventListener(Event.ENTER\_FRAME, functionGo);

function functionGo(event:Event):void  
{  
var distance:Number=mouseX-xcenter;  
event.target.x+=(distance_speed);//or clip.x+=(distance_speed);  
if (event.target.x \> 0) {  
event.target.x = -300;  
}  
if (event.target.x \< -300) {  
event.target.x = 0;  
}  
}
