# A little problem

**URL:** https://forum.kirupa.com/t/a-little-problem/20756
**Category:** Uncategorized
**Created:** [May 13, 2003, 4:07am UTC](https://forum.kirupa.com/t/a-little-problem/20756 "2003-05-13T04:07:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![olympiakos7](https://avatars.discourse-cdn.com/v4/letter/o/278dde/32.png) [@olympiakos7](https://forum.kirupa.com/u/olympiakos7)
#### Post date: [May 13, 2003, 4:07am UTC](https://forum.kirupa.com/t/a-little-problem/20756/1 "2003-05-13T04:07:51Z")

</div>

I’m having a little problem with my Flash actionscripting.

I’m working on this file [source](http://www.nikomedia.com/books/fish-info.fla)

when I test the MC “testme” the movie works fine, I press the buttons and the content slides to the coresponding section.

when I drop the MC into the main scene it doesn’t work however.

The code is contained inside the MC “sliding content”

onClipEvent (load) {  
\_x = 0;  
\_y = 82;

```
div = 5; 

```

}

onClipEvent (enterFrame) {  
\_x += (endX-\_x)/div;

\_root.home.onRelease = function() {  
endX = -0;

```
};
_root.stats.onRelease = function() {
	endX = -300;
	
};
_root.map.onRelease = function() {
    endX = -600;

};

```

}

any thoughts? I’m sure I’ve made a complete mess of things but can’t figure out why the MC works fine but not the movie.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 13, 2003, 2:52pm UTC](https://forum.kirupa.com/t/a-little-problem/20756/2 "2003-05-13T14:52:29Z")

</div>

_ **Yasou Re ti kanis!!** _ :beam:

Hey dude since you moved the movie into another location you need to fix your addressing issues to your buttons.

Just add \_parent.\_parent. instead of \_root.

```auto

_parent._parent.home.onRelease = function() {
		endX = -0;
		
	};
	_parent._parent.stats.onRelease = function() {
		endX = -300;
		
	};
	_parent._parent.map.onRelease = function() {
	    endX = -600;
	
	};
}
 

```

Hope this helps 😏

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 13, 2003, 3:09pm UTC](https://forum.kirupa.com/t/a-little-problem/20756/3 "2003-05-13T15:09:47Z")

</div>

Brilliant! Thanks a lot megale, works like a charm.

Can’t wait to see V.2 of soulty design, good work.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 13, 2003, 3:18pm UTC](https://forum.kirupa.com/t/a-little-problem/20756/4 "2003-05-13T15:18:35Z")

</div>

glad to help 😉

Thanks for the comment on my site. I would like to see the final version of my site as well. hehe… 😏
