1

I have been searching several days for an example of how to make a OSMF Widget writing some code with MXML (At least the layout code) and some code in AS3.

It is my first time working with this tech.

I have wrote some Widgets for OSMF in AS3, but now I have a design (Write in MXML) which I need to draw in the OSMF ChromeApplication.

I have been reading some OSMF source code and it seems that ChromeApplication extends Sprite, so my problem can be reduced to draw a MXML in a Sprite.

So my questions are:

  1. Is it possible to create a MXML element with AS3 code and add it to a Sprite?
    1. If it is possible, how do I do that?
    2. If not, What is the best aproach to have some MXML Classes inside OSMF?
Sam DeHaan
  • 10,246
  • 2
  • 40
  • 48
JDL
  • 700
  • 5
  • 16
  • [AS3 can be used to create MXML elements](http://www.moock.org/blog/archives/000246.html), but [UIComponent](http://www.brooksandrus.com/blog/2010/02/10/osmf-flex-example/) and [s:VideoPlayer](http://jodieorourke.com/view.php?id=150&blog=news) are more appropriate for OSMF integration. – Paul Sweatte May 09 '12 at 18:17
  • 1
    Well, You are right. I intended to use Chrome example inside OSMF, write in AS3 with widget-config-by-xml support (xml specific for the widget not MXML), it was a problem for the designer because she can´t use MXML. At the end I built a MXML proyect and I´ve use UIComponent and VideoPlayer. The widget system was easy to implement (Sorry for the delay in the comment) – JDL Jun 05 '12 at 08:16

1 Answers1

0

Use UIComponent and s:VideoPlayer for OSMF integration as noted in the above comments.

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265