I got a wierd problem.
I need to get media width and height to center my extended MovieClip on the stage.
But now ive been sitting to list and search where and how i get Event.COMPLETE to function with OSMF.
Yep i found traits and so on, but they really didnt trigger anykind of COMPLETE action.
Getting the height and with from media isnt that hard, but i cant get that data until it is loaded....
any help, or better, code snippet will make my day!
Thanx in advance!
Here's a barebones example showing how to center the media:
Note that it uses the MediaContainer class, which takes care of responding to changes in the media's dimensions.
Thnx for the tip!
Ive been testing LayoutMetadata before too and didnt get it the way i wanted and the same in this case.
So (un)fortunately i set all x y height and width as static numbers and now i got my mediaplayer in center of root / stage. I use this class as extendable MovieClip and not as root/stage which maybe is my problem !?
Anyhow, hardcoded numbers did the flip, but isnt really what i wanted.
Thanx anyway without your help i would be sitting here surely more hours/days