I would like to create an evenListener for my menu, so when clicking on different buttons I load content (MovieClips) into a MC called Content.
I don’t know how to pass on variables with my function handleMouseUp or how to onload already (if any) MC in Content.
This is my code so far:
MC1.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
MC2.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
function handleMouseUp(event:MouseEvent):void {
changePage();
}
function changePage(event:MouseEvent, SOMETHING):void {
Content.REMOVE_ALREADY_LOADED_CONTENT
Content.addChild(new SOMETHING());
}