Function on / function off

I have the function
_root.screen.onSoundComplete = function() {
combobox.setselectedindex(combobox.getselectedindex()+1);
};

on fram 2 of the main time line.

When I am on frame 1 for the first time in published mode, the function does not exist, but when I go to frame 2 and back to frame 1 the function now exist in frame 1.

any Suggestions would be great.

Ask yourself this, how can the function exist is Flash hasn’t read it yet?

Help any?

The action only exists in frame 2.
The 1st time I enter frame 1, all is well.
When I go to frame 2 and back to 1,
the action exists on frame 1.

Is there a way to turn the function off when I go back to frame 1 ?

I don’t think it is the function that is doing that.

You go to frame one and the function does what it does (moves your item up 1), then change will stick frame one since it is a direct edit to the component. I think that is how it works.

If you want it to go back, try added another function of -1 on the first frame ?? Just theory, but worth a try.

Ok, got it down.

Your negative 1 idea is almost it. Load a movie from your library into a new blank movie clip on frame 1 of the main timeline. The move you load has to have the same function as in frame two.

weird - but it works.

Hmmm, interesting. Glad you could figure it out though :slight_smile: