I have the code
console.log(parent); on a frame script in the timeline of a Clip called
animation. It returns itself:
I would expect it to return its parent Clip,
Menu. If the Clip is on the root timeline, I’d expect it to return
EDIT: did some more research…
parent.parent returns a frame:
parent.parent.parent returns a layer in
Menu called Stuff, which is where
parent.parent.parent.parent returns a timeline.
I’m pretty sure the ability to refer to frames through code is an intended feature rather than a bug. Referring to layers could also be helpful, like if you’re checking its name or if layers ever gain the ability to change opacity. I can’t see a use case for referring to timelines as opposed to Clips, though.
parentLayer if that exists) should be in the API in place of
parent, since those features are more clear.