How do you refer to an object when putting it in a "gotoAndStop" script?

In my project, I have an object called “funny”. When I type “funny.gotoAndStop(2);” it says “funny is not defined”. i suspect it might have to do with me using 1.19 for the project. Please help!

Thanks, MakerMan

(Edit: I think I figured it out, will this not work if the object I’m referring to is on a different frame?)

Hey!
Can you send the file to see what’s wrong?

  Objectname.gotoAndStop(Frame number)

This description is not sufficient to help you. Could you send the file so we could take a look?

Sorry, the file is too large to share. I tried making an example, but it worked there. It might be because the object I’m referring to is on a different frame, but idk.

your edit is correct, i think. “funny” must be in the current frame when you refer to it.

Ok, thanks!