Getting a “Null Object Reference” when referencing a child - only for windows target

Hi, I made a class that extends a movieclip from an swf. That gives me access to all the named displayobjects in that movieclip, which is great. compiling that for HTML5 and Flash works well, but I get this “Null Object Reference” alert when I target it for windows.

So when tracing the child it gives me null for the windows target.
but [object MovieClip] for the HTML5.
and [object somechild] for the Flash target.

I could just use getChildByName(“somechild”) but the dynamic access is pretty nice.
Is it possible to achieve this for windows?

I just found this only happens for movieclips with code in their timeline. Even a single // cause the reference to fail. Here’s a small example.
Open fla/lib.fla and open Symbol from the library, click the child (red circle) and see the // in its timeline.
Open the project (I’m using FlashDevelop), target windows, run it, and see it trace null.

Now I’m not so familiar with Haxe and its forums. Is this the right place or should make a post here? https://github.com/HaxeFoundation/hxcpp/issues

I think it should be just empty objects caused by different types.

I’m not sure what you mean, could you post an example?

I can’t open your example, so I can’t tell where your mistake is. So it may be that swf is an empty object or it may be a type error.

ah okay, that’s strange. in any case I don’t think the swf is an empty object. When I try this:
trace(new Symbol().child); (where Symbol is the class from the swf)
and there’s no code in the child’s timeline I get a proper [object MovieClip] back.
But the moment I put just // in its timeline it returns null, only on the windows target.