If the object exists in multiple keyframes then it can reset when you move to a new one. If that's the case you should have this object in its own layer and have only one keyframe for it in that layer.
I'm afraid that's not really an option as the object needs to move as part of the animation, but I also need to be able to show and hide it as required. It also wouldn't explain why other symbols work fine, as they are also part of keyframed animations and show/hide exactly as expected.
Just put the animation to move the movieclip around within another movieclip. To set the visibility of a movieclip through code, give it an identifier name and type:
movieclipNameHere._visible = false; (or true).
While that seems like it would work, it involves syncing everything in the main timeline with the separated piece, which I'm not sure is much of an option either as if I want to add frames or tweak anything then I need to move any changes into the separate symbol, I'd also need to sync up script actions in the main timeline that affect the symbol (e.g - looping, skipping forward/back etc.).
It's something at least, but it still doesn't explain why this particular symbol isn't staying hidden when other symbols, hidden in the same way and also animated, are working perfectly.
Also for clarity, I'm not using ._visible because I'm not actually hiding the symbol in its entirety, it folds away. It probably doesn't matter though; like I say other symbols are working fine.
Actually though, the only difference I can think of is between the symbols is that the one I'm having trouble with has a mask, but is that likely to affect anything?
Okay, I'm going to try to highlight what I'm seeing by taking a snapshot of the timeline where the problem occurs:
The selected layer has the problem symbol, the layer immediately above is the mask layer. The blue circle indicates the frame at which the symbol is hidden (or shown) by a script further up in the timeline. The symbol displays as expected for the duration of the blue tween. At the green circle, a new tween begins but the symbol remains unchanged, continuing to be shown or hidden as expected for the during of that tween. The red circle however is where the symbol apparently resets to the default (showing) frame, and loses any other state assigned to it (e.g - if I were to set a variable upon it such as foo.bar = "foobar").
Why would the symbol retain state through the green circle, but not the red one? It seems that at the green circle the symbol is still the same instance, but at the red circle it is not, even though nothing seems to be happening any differently.