This content has been marked as final.
Show 2 replies
-
1. Re: How do you get stageWidth and stageHeight in OSMF plugin?
meekgeek Dec 15, 2010 3:42 PM (in response to meekgeek)Ha, just read the thread a few down from mine...
http://forums.adobe.com/thread/764923?tstart=0
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.
Thanks
-
2. Re: How do you get stageWidth and stageHeight in OSMF plugin?
charles_newman-GG8xMm Dec 15, 2010 5:37 PM (in response to meekgeek)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.
Thanks,
- charles

