A little problem

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

I’m working on this file source

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.

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.



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

Hope this helps :smirk:

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

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

glad to help :wink:

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