views:

243

answers:

2

Hello,

I am working on a flash step-by-step guide. and i have a problem.

There are 3 layers, 1 is scripts 2 is invisible button 3 is a cover screen(mc)

, inside cover screen. on its own timeline , it has an animation.

, what im trying to do is ; when i roll over the invisible button , i want the cover screen timeline to play and stop at a certain frame, when rolled out, i want it to play again and get to the beginning.

I used this on my invisible button.

on (rollOver){ cover.gotoAndPlay("fadein"); } on (rollOut) { cover.gotoAndPlay("fadeout"); } fadein and fadeout are the frame names inside cover_mc

but id doeswnt work:S

any idea's why?

A: 

First of all, try to use trace :)

on (rollOver){
    trace(cover);
    cover.gotoAndPlay("fadein");
}

if nothing traces than there's probably something wrong with your rollOver action. It must trace [Object MovieClip] (or something like that, i'm not quite sure.. its ages since i did some AS2 development)

if it traces coorect, then you probably have a problem with your frame label. it also could be that the cover instance is not know from your rollOver function, try _root.cover.gotoAndPlay("fadein");

Andy Jacobs
A: 

If I understand correctly, the code is on the button and you want the parent timeline to react on roll actions.

so try the following:

on (rollOver) {
   _parent.gotoAndPlay('fadein');
}

The key thing is the _parent, which obviously will address the parent of the button.

Pascal Immerzeel