I'm creating a plugin that requires me to know what the stage dimensions are so I can accomidate my display elements. So how do I get reference to that information inside of my new media element I'm creating? I'd like to use standards so other can use it so I don't want to pass it when initialized.
Ha, just read the thread a few down from mine...
I guess you can't.
It's strange to me that this wasn't ever concidered in any use cases. I have a love/hate relationship with OSMF right now
I guess I'll have to wait until it's added to the stage via the onAddedToStage event.
If you create media elements in your plugin you can easily get the stage.
Add a listener for MediaElementEvent.TRAIT_ADD on the media element you create and check for MediaTraitType.DISPLAY_OBJECT in the listener. From there, if displayObjectTrait.displayObject.stage is null, add a listener for Event.ADDED_TO_STAGE.
This is what Andrian was suggesting in that other thread.