4 buttons -----> one function!

hi guys,
i’ve 4 buttons in the main root… :}
and if any of them clicked tell mc_main to gotoAndPlay(“mainon”).
mc_main is a movie clip contains from 20 frames if any buttons clicked it’s appear. :sure: and if i click on it .
… it disappear.
it’s ok for one button but if i clicked 2 or 3 buttons before click
on it.
so i create this function
[AS]onClipEvent (load) {
function homeClick() {
if (mc_main._currentframe == 10) {
// i don’t know what i’ve to write here
} else {
it works greate but if the _currentframe ==10 what supose to happen:h:

it’s ok for one button but if i clicked 2 or 3 buttons before click
on it.

well, what happens to it? can you post your fla? What exactly do you want to happen?

it disappear… :frowning:

here is the file… :sure:
have a look in my code… i think you can mangment it… i don’t know how to make it easy and more prof. :hangover:

like this? or diff?

thanx for your help but your function is more complicated :puzzle:
why you change all _root -----> _parent :h:
can you explain it to me :crazy:

good coding habits :slight_smile: find and replace… bam. lol

it’s just a reverse script. it reverses the animation no matter what frame it’s on. I was just a little unsure of what exactly you wanted. Oh and you had actions definitions on an onEnterFrame so i put them on the onLoad, What you were doing is defining what the buttons should do over and over again, but you only need to define them once.

norie you didn’t solve the problem… ;(
i think you don’t understand what i want to do :q:
ok… i want when you click on any buttons tell mc_main to appear… this movie to return to the main interface so if you click on another button… that doesn’t effect the mc_main… finaly if you want to return to the main interface click on mc_main for return and disappear itself in the same time.

i hope you get it :sure:

function homeClick() {
		if (_root.mc_main._currentframe != 10) {


you want it so that if you click any of the square buttons it plays (mc_main) and if you click on the home button it disapears?

:thumb: :thumb: :thumb: :thumb:
it’s working now as i wash :}

many thanx norie for your help. :beer: