Making a sound loop?

After some tests… it’s not working properly.

Here’s what I’m doing.

On the movie on level 1 (that calls movie on level2)
I’ve added this code on the first frame.

MovieClip.prototype.enable = function(action) {
for (k in this) {
this[k].enabled = action;
}
};

Note : A " ; " was added after the " } " at the end…
I don’t know if it’s normal.

Then, I’ve added this code in the first frame of level 2

_level1.enable(false);

I’ve also added this code on the button of level 2
to unload the movie.

on (release) {
_level1.enable(true);
unloadMovieNum(2);
}

Do you know where’s my error?

I truly appreciate your help !
:slight_smile:

Neuhaus3000

MovieClip.prototype.enable = function(action) {
	for (k in this) {
		this[k].enabled = action;
	}
};

Note : A " ; " was added after the " } " at the end…
I don’t know if it’s normal.

it doesn’t matter

now … try to place the script in the movie on level 2

first frame:

MovieClip.prototype.enable = function(action) {
	for (k in this) {
		this[k].enabled = action;
	}
}
_level1.enable(false);

button actions:

on (release) {
	_level1.enable(true);
	unloadMovieNum(2);
}

Me again… :-\

I’ve added :

MovieClip.prototype.enable = function(action) {
for (k in this) {
this[k].enabled = action;
}
}
_level1.enable(false);

in the first frame of the movie level 2.

I’ve added :

on (release) {
_level1.enable(true);
unloadMovieNum(2);
}

on the button in level 2.

But no success… There’s nothing to add in the movie
of level 1 right?

:x

Thanks!
Neuhaus3000

that’s it … :hair:

could you attach all your files please … ??

Actually I can’t… :-\

The buttons in my level 1 (those that
are calling the movie on level 2) are in
a sroll elements movieClip in a scroll component.
Maybe that’s what is causing my problem…

Why doesn’t a code like this exist ??? :angry:
_level1.myMovieClip.enabled = false;

Oh my ! ;(

Here’s an alternative…

I’ve added a tranparent button in the background of my
movie on level 2. There’s the hand but when I click,
nothing happens. So it’s like the buttons on the level 1
movie are “disabled” by the transparent movie on
level 2. It’s the best I can do for now… :hangover:

Thanks a million Kax!!! :crazy:

oh well … i don’t see what could be the problem :frowning:

i have used it before without problems … :-\

Thanks Kax,

I will make some more tests and let you know if I find something.

Have an nice day muchacho! :slight_smile:

Neuhaus3000

ok. i hope you get it to work =)

Hey Kax,

Just wanted to let you know that your script
works fine. I’ve noticed that it can’t disable
content (buttons) that is in a scrollBar.

Thanks for your generosity! :beam:

Neuhaus3000