How do I stop my scrolling effect in Flash

Posted on 2010-08-23
Last Modified: 2013-11-11
Hey Guys

I have this setup where I want the movieClip to scroll up and down the page but it seems to flick back to the beginning.

It's kinda hard to explain but I have attached the swfs and code that run the scrolling effect for you to have a look at and get an idea of what is happening.

I just want the bio.swf file to stop at the top and bottom of itself and not "repeat" itself. I don't really know why it is.

Any help as to what I'm doing wrong?


onClipEvent (load)
onClipEvent (enterFrame)
   var distance=_root._ymouse-ycenter;
   if (_y > 0) _y=-2000;
   if (_y < -2000) _y=0;

Open in new window

Question by:Leroice
  • 2

Accepted Solution

chorejason earned 500 total points
ID: 33507877
Try this:

onClipEvent (enterFrame)
   var distance=_root._ymouse-ycenter;

   if (_y < 0 && _y > -2000)


Expert Comment

ID: 33551126
Hi, was my comment helpfull? Did it solve your problem?

Author Closing Comment

ID: 33552139
Hey Jason

Sorry for the late reply - just saw this now.

I just tried it and it worked great! Thanks heaps. The only problem is that when it stops it doesn't head back the other way. I need it to continue to scroll back and forth. Do I need to ask another question or can this code be edited to achieve that.

Thanks again


Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now