# Image scroll with cursor

**URL:** <https://forum.kirupa.com/t/image-scroll-with-cursor/266004>\
**Category:** Uncategorized\
**Created:** [July 15, 2008, 2:08pm UTC](https://forum.kirupa.com/t/image-scroll-with-cursor/266004 "2008-07-15T14:08:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patch](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/patch/32/1095_2.png) [@Patch](https://forum.kirupa.com/u/Patch)\
**Post date:** [July 15, 2008, 2:08pm UTC](https://forum.kirupa.com/t/image-scroll-with-cursor/266004/1 "2008-07-15T14:08:42Z")

</div>

Hi all!

I found this site, where you can scroll through images with the cursor and they fade between each other.

I’m sure I saw a tutorial or source code for something similar a while back, but I can’t find it.

Here is the link:

[http://www.onehydepark.com/flash.html](http://www.onehydepark.com/flash.html)

Any idea or know of any resource that might help me produce something similar?

Thanks, much appreciated.

---

<div class="post-metadata">

**Author:** ![gigaboost](https://avatars.discourse-cdn.com/v4/letter/g/58956e/32.png) [@gigaboost](https://forum.kirupa.com/u/gigaboost)\
**Post date:** [July 15, 2008, 3:00pm UTC](https://forum.kirupa.com/t/image-scroll-with-cursor/266004/2 "2008-07-15T15:00:50Z")

</div>

if mouse is between A and B fade in this image if mouse is between B and C fade in that image.

Shouldn’t be too hard to code?

---

<div class="post-metadata">

**Author:** ![Patch](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/patch/32/1095_2.png) [@Patch](https://forum.kirupa.com/u/Patch)\
**Post date:** [July 15, 2008, 4:35pm UTC](https://forum.kirupa.com/t/image-scroll-with-cursor/266004/3 "2008-07-15T16:35:02Z")

</div>

ok, I think I understand what you mean. But I can’t seem to get it to work…sort of. I think I may have my conditional statement wrong or something.

I’m a noob, just so you know

```auto

this.onEnterFrame = function()

{

	mouseX = _root._xmouse;

	mouseY = _root._ymouse;

	xvalue = mouseX;

	yvalue = mouseY;

}

//this.onEnterFrame = function () {

	
	if(mouseX >= 800)
	
		{
			hello = "Hello, World!";
		}
		
	if(mouseX <= 800)
		
		{
			hello = "Goodbye, Cruel World!";
			
		}
		
//}

```

It just constantly says “Goodbye, Cruel World”. But I want it so when I move the cursor greater or equal to 800 on the x axis I want it to change to “Hello, World” and back to “Goodbye…” etc when it is less than.

If I can get this to work I should be able to modify it for images / movieclips etc

Thanks!

---

<div class="post-metadata">

**Author:** ![Patch](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/patch/32/1095_2.png) [@Patch](https://forum.kirupa.com/u/Patch)\
**Post date:** [July 16, 2008, 8:17am UTC](https://forum.kirupa.com/t/image-scroll-with-cursor/266004/4 "2008-07-16T08:17:05Z")

</div>

anyone help me, please?

---

<div class="post-metadata">

**Author:** ![Patch](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/patch/32/1095_2.png) [@Patch](https://forum.kirupa.com/u/Patch)\
**Post date:** [July 16, 2008, 8:19am UTC](https://forum.kirupa.com/t/image-scroll-with-cursor/266004/5 "2008-07-16T08:19:03Z")

</div>

nevermind lol. Think I’ve solved it
