I have been converting all of my flex routines over to OSMF to access my media files. I'm making good progress but I have run into a problem regarding jpg image files. I can access them, download them and display them without any problems. But, now I need to be able to obtain their widths and heights. I wrote a routine to access the height and width and it worked on my localhost. But when I tested it on my website it failed.....so I must be doing something wrong.
My existing code creates an new MediaPlayerSprite, then I access and download the image using URLResource(image_location) and then I assign the return of URLResource to the resource property of the MediaPlayerSprite and then display the image. Using my development computer (localhost) I can successfully access the width and height by looking at the height and width of the MediaPlayerSprite. But, this does not work when using my website.
Can someone please give me some ideas on how to proceed.
Try to obtain a DisplayObjectTrait of loaded media.
It has mediaWidth and mediaHeight properties.