Having a strange tellTarget problem

Alright, so I have these buttons that I want other animation to play when I rollOver and then again when I rollOut. I made a MC and named the instance. I have stop();s on frames 1 (empty), 15 and 30 (the last one). Here are my AS for the button:
on(rollOver){
tellTarget("/song1ani"){
gotoAndPlay(2);
}
}
on(rollOut){
tellTarget("/song1ani"){
gotoAndPlay(16);
}
}

Here’s the clincher!! It works fine, but when I hit Ctrl+Enter to test the movie; the output window tells me that the stop(); on frame 15 needs an onClipEvent handler.

Of course, I gave it one and made everything worse.
Should I ignore the output window? Cause it works fine. Just figured I’d ask.
Thanks!!

Well for one, you’re using telltarget which is depreciated in MX and the new sintax for you script above should look like this:

on(rollOver){
	_root.song1ani.gotoAndPlay(2);
}
on(rollOut){
	_root.song1ani.gotoAndPlay(16);
}

But I don’t think that is the cause of the error, could you copy and paste the exact error message that you recieved?

I didn’t expect a responce so fast - thank you!!

Here is the message:

Symbol=song1tell, Layer=Layer1, Frame=15: Line 1: Statement must appear within on/onClipEvent handler
stop();

So I finished the other tellTargets the same way and now two errors come up (same errors) but all five work - they’re identical. Is it becuase I’m using old code?

Thanks!!

well it’s saying that there is a statment that needs to be in a event handler, but it’s definitely not the stop action. Try switching over to the new sintax like how I showed you above and see if the errors go away.

Your script works but the error still comes up. I just don’t know.

could you post your fla so I can take a look? You probably have a script laying somewhere it’s not suppose to.

Okay, here it is:

I can’t, it’s too big. It’s 5 meg.

goodness that’s huge, could you upload it to a webserver somewhere and send me the link?

Okay, It the fla is here:

http://busineplex.com/fred/test/coppers.fla

Sorry it’s so big (and probably really messy to you) but I’m still just starting.

Thanks!

Ok after about 20 mins of going through your fla which is a complete jungle for me, I had no idea what was going on…ahhahah, I finally found the source of the error messages. Inside these 2 movieclips, you’ve accidently placed a stop action on the object inside that movieclip itself and so it caused the error to appear. The 2 movieclips are “Symbol 142” and “song1tell”. So just open your library find those movieclips, double click on them to open them up and go to each frame and select the object on each of those frames and make sure there isn’t a stop action placed on those objects. I noticed you have stop actions on the frames which are ok, but on the object on those frames, you have a stop on the object itself.

I tested it out and the errors are gone, I would post the file back but I don’t have room on my server right now. So go ahead and do that and let me know how it goes.

I hope I didn’t confuse you.

Perfect!

Rest assured, you didn’t confuse me. However what does confuse me is how I got those stops on the object…Hmm. Sorry it was so much of a mess; I’m still learning.

That worked! Thank you - I appreciate the time spent. The best part is now I can go to sleep!!

Thanks again!

I’m glad you found the stops and got things working. You probably accidently placed them there while placing the stops on the frames, pretty common mistake. =)