Advanced Rollovers

I 've been trying to create a button that on rollover reveals a piece of txt and on roll out disappears again. I have followed the instructions on ‘Advanced Rollovers’ on this site. using the code for the button:

on (rollOver) {
tellTarget ("/rollover’") {
gotoAndPlay (“frame label”);
}
}
on (rollOut) {
tellTarget ("/rollover’") {
gotoAndPlay (“frame label back”);
}
}

The frame labels are positioned in a movie clip in my library. For the button to read the frame labels does the movie clip need to be included in the scene (if it does, wouldn’t the scene just play the movie clip?). At the moment the button isn’t seeing the target.

It would be great if anyone could help. I’m very much a learner so keep it simple. Thanks

Welcome Sharon :slight_smile:
There’s a problem with your path. Make sure that you gave the right instance name to your clip (in the Properties panel) and that the clip is on the scene when you press the button.

Also, you should switch to Flash MX syntax and drop the tellTarget thing:

on (rollOver) {
_root.rollover.gotoAndPlay ("frame label");
}
on (rollOut) {
_root.rollover.gotoAndPlay ("frame label back");
}

pom :phil:

Thanks 4 ur speedy help. I’ve labeled the key frames (i guess this is what u mean by ‘instance names’) within the movie clip. Do i need to include the movie clip name in my button coding as well as the key label so that the button goes and finds the movie clip?

When i’ve put my movie clip into the scene it plays when the scene runs through so i’m not sure how to put the movie clip on the scene just when the button is pressed.

I’ve never had to deal with Flash Mx syntax - so i’m feeling a bit lost on that one :slight_smile: Really sorry to come across a thick-o

Instance names are not the frame labels. An instance name is a name you give a movie clip. Click on any kind of mc you have look in the properties window. To the left there should be window that says “instance name”.

firstly if the clip isnt in the scene at all then you wont see anything unless you do some coding to attach it to a clip.
Assuming you dont want to do that an alternative is to have the first frame of you text clip as completely blank then position them where they are going and adda simpler code like this.
[AS]
on (Rollover) {
_root.yourtextclip.gotoAndPlay(2);
}
on(Rollout){
_root.yourtextclip.gotoAndStop(1);
}[/AS]
that way you have any text or animations on the 2nd and proceeding frames and the first frame as blank.
if the clip has any internal animation you just add a looping command at the end so it goes back to frame 2 rather than frame (which is now blank and would ruin any flowing animation effects)
This no great way of doing it but since you say you are new to flashMX thought id suggest it anyway, hope it helps