2 Replies Latest reply on Jun 15, 2010 10:22 PM by pborodin

    Sample Flash 4 Project

    Marlon Harrison

      Is there a sample project that shows a 'Hello World' level video player in Flash Builder 4? I'm trying to use OSMF 1.0 and I can get audio but no video. Here's hoping the documentation gets updated to address this soon.



        • 1. Re: Sample Flash 4 Project
          bringrags Level 4

          I don't think we have a Flex 4-specific HelloWorld example, but we have a handful of HelloWorld examples that are pure AS3, see http://opensource.adobe.com/svn/opensource/osmf/trunk/apps/samples/framework/HelloWorld.


          Any of our forum regulars (or irregulars) want to post a Flex 4 version of the above?

          • 2. Re: Sample Flash 4 Project



            I have tried out a few ways of integrating the release version and so far it worked fine:

            Presuming that you have replaced the OSMF.swc file

            The 1st workflow:

            a) create your player as ActionScript class - I believe the existing examples would work just fine; for the UI controls I used couple of embedded graphics and Flex drawing APIs

            b) put the instance of your player in UIComponent container - since the player class extends  Sprite or MediaPlayerSprite I had to use 'addChild(); that's the reason of using UIComponent as a wrapper, and then add the UIComponent to the DisplayList by 'addElement()'. That is it.

            2nd workflow:

            Create your player entirely in Flash and simply import the swf compiled in Flash into your Flex 4 project.

            3rd workflow - using FlashBuilder built-in 'roundtrip' feature:

            In FlashBuilder Design mode open the Flash component, FlashBuilder will open automatically Flash CS5, do all the work over there, and it will be integrated back into FlashBuilder for you automatically.


            Admittedly, I'm using only the most elementary properties of the players, but for my needs it works just fine.