How to place some DisplayObject over OSMF VideoElement?

I have successfully built an live stream application. It shows video from IP-camera via media server.
Now I need to handle user actions like click and area selection.
The problem is I can't draw area selection borders over VideoElement.displayObject. It is Video, so graphics lays lower than video.
I decided to make some MediaElement that has DisplayObjectTrait like this:
public class DisplayObjectElement extends MediaElement
     private var sprite: Sprite;
     public function DisplayObjectElement(sp:Sprite)
          super();
          sprite = sp;
     override protected function setupTraits():void{
          addTrait(MediaTraitType.DISPLAY_OBJECT, new DisplayObjectTrait(sprite));
          super.setupTraits();
and use DisplayObjectElement and VideoElement as children of ParallelElement:
container = new MediaContainer();addChild(container);
videoElement = new VideoElement(); //some graphics to test
selectionObject = new Sprite();
selectionObject.graphics.beginFill(0xff0000,1 );
selectionObject.graphics.drawCircle( 0, 0, 8 );
selectionObject.graphics.endFill();selectionElement = new DisplayObjectElement(selectionObject); var parElement:ParallelElement = new ParallelElement();
parElement.addChild(videoElement);
parElement.addChild(selectionElement); container.addMediaElement(parElement); mediaPlayer = new MediaPlayer();
mediaPlayer.media = parElement;
videoElement.resource = new URLResource("url to camera stream");
But selectionObject wasn't added to display list. Even when video is shown selectionObject.parent is null.
So I want to lay this selectionObject over VideoElement (with the same size and coordinates) and handle user actions and draw area selection borders on it.
I found simular solution here http://blog.six4rty.ch/2010/06/15/osmf-interactivespriteelement/ but it doesn't work for me.
I'm using OSMF 1.5.
How can I add my own control (Sprite or DisplayObject) over Video using OSMF framework?

I subclassed MediaElement without knowing of it's lifecycle:
MediaElement constructor calls setupTraits. And in DisplayObjectElement I call super() and then set up sprite = sp.
So when setupTraits() is called sprite == null.
Working DisplayObjectElement class looks like this:
public class DisplayObjectElement extends MediaElement
     public function DisplayObjectElement(sp:Sprite)
          super();
          addTrait( MediaTraitType.DISPLAY_OBJECT, new DisplayObjectTrait(sp) );

Similar Messages

  • How to place an image over video

    Hey guys, want i want to do is still have the video playing but have an image there too, such as in the top right hand corner... I sthis possible?
    If so please answer

    Yes, it's very  possible. One resized image (resized with the Transform tool) stacked above an other image. Typically the smaller image is a connected clip to the  image on the primary storyline.
    Russ

  • When I upgraded to ios 5, it asked me a for a new game center name.  How do I use my old game center name, since it makes me start some games over without it?

    When I upgraded to ios 5, it asked me a for a new game center name.  How do I use my old game center name, since it makes me start some games over without it?

    Carefully follow steps 1-9 outlined by wjosten in this post: https://discussions.apple.com/message/13356770#13356770.  This will not, however, avoid wiping any non-purchased media from your phone (ripped CDs, etc.) as this is only synced one way: from your computer to your phone.  You will have to either rebuild your iTunes library with this content and sync again to restore it to your phone, or purchase 3rd party software to copy it from your phone to iTunes prior to syncing (such as Touch Copy).

  • Hello - does anyone now how to place a complain for an over charged invoice over a in-purchase game? Apple is charging 10 times more the purchase we made and I cannot find anyplace in the App store to complain online or via email? Please help if you know

    Hello - does anyone now how to place a complain for an over charged invoice over a in-purchase game? Apple is charging 10 times more the purchase we made and I cannot find anyplace in the App store to complain online or via email? Please help if you know

    Use the Report a Problem link in the iTunes email receipt you received. Also in-app purchases can be made without the password if you bought the app within the last 15min. You should enable the in-app restriction in Settings.

  • How to place content between header and tabs?????

    i have header part which has to be constant through out the portal but below that i have 3 links
    like I AM employee,employer,broker..
    which has to be shown only in home page above tabs..
    how can i achieve this..
    how to place content between header and tabs..:(kindly help..

    Hi Samiran
    Try these approaches and see if that works.
    1. In the Header Section, you header footer shell and add a Header Portlet. This Header Portlet associated JSP file will have all static content in the top section. In the bottom section, add these 3 links say to right hand corner. Show these links only based on some request property like isHome. Now for the main book having Home and other page associate a BackingFile. Within this backing file in the lifecycle methods like preRender or handlePostBack, get instance of BookManager and all the pages and see which page is Active. For that active page check its page definition label which will be always unique. IF the page def label is like home_page_def (this is page def label you give for home page), then set the key value in the request property like isHome=true. By only doubt is after Book backingfile is triggered, the header has to be reloaded, because only then it can pick up the request attributes.
    2. Create a brand new portlet like HomePageLinks portlet. Make its Title Property Not Visible, and other user interface properties like NoBorder, NoTheme etc. The associated JSP will have the 3 links you mentioned right aligned. You can use css styles to make it right etc. Now drop this portlet in the Header Shell area. You already have HeaderPortlet in the top, below that you will have this HomePageLinks portlet. Now associate a backing file for this Portlet to show, only if the Books current active page is Home page by comparing the def label etc as mentioned above.
    In both scenarios, only concern is when we click on different Pages, the entire portal has to be rendered right from the Top Header. Only then the backing file will set the key, and the HomePageLinks portlet can show or hide accordingly.
    Try firing an Event when the Home page is clicked. This listener for this Event can be the HomePageLinks Portlet. I guess Event mechanism should work irrespective of where the portlet is placed. In the event listner, see if you can show/hide this portlet.
    The only challenge is Header section needs to reloaded everytime you click on a Tab.
    Start putting some backing files and System.out.printlns to see if the Header section gets reloaded on click on any Tabs.
    These are just my thoughts over the top of my head. Other forum users can have better alternatives or a different version of above approaches.
    Thanks
    Ravi Jegga

  • HT201084 My family shares one Apple ID on multiple devices.  How do I switch everyone over to their own Apple ID without having to erase their iphones and ipads?

    My family currently shares one Apple ID on multiple devices and has for quite awhile.  How do I switch everyone over to their own Apple ID and the Family Sharing without having to erase their iphones and ipads?

    Thank you again for your time, GB.
    I set up individual Apple ID's for my children so that they could have their own Apple ID on their individual iPad minis (gifts from grandparents last year).  When I go to iCloud under Settings, I see my Apple ID listed at the top, then my children's listed under Family Sharing.  So the device is still using my Apple ID for iCloud, iTunes, etc., correct?
    To "assign" their own Apple ID to their own iPad mini, I would need to "Sign Out" from my Apple ID.  When I attempt to do so, I receive a warning that all of the Documents and Data will be lost/deleted. 
    So, instead of doing this, I figured out that I could do what you suggested.  Signing in using a child's Apple ID will allow her/him to use Game Center, FaceTime, and Messages just fine.  However, using their Apple ID for iTunes & App Store proved to be a problem:  Purchased Music and Movies appeared in iTunes, but my Purchased Apps did not appear.  Some Apps even disappeared, e.g. Proloquo4Text (a $99 app to help my son speak with his iPad).
    So I reverted to using my Apple ID for iTunes & App Store, and I get everything that I want, EXCEPT for the iCloud storage for each Apple ID.
    So that's when I started wondering how Family Sharing was really benefiting me ~ It was a lot of work (deleting apps to allow space to download iOS 8, etc) without any benefit that I can see.  UNLESS I find a means to allow me to sign in each iPad's iCloud account with a different AppleID, then perhaps restore the Documents and Data from a backup?  Would that work?
    Thanks.

  • How to place one column under another column in obiee report?

    Hi all,
    I am new to obiee, so need some help from obiee experts. Can anyone tell me how to place one column data under another column in obiee report?
    i need the report to be as below
    category total_students Course_enrollment Test_attended pass_test
    total N % N % N %
    all students ##### ## ## ## ## ## ##
    Ethnicity
    Asian ###### ## ## ## ## ## ##
    African American ###### ## ## ## ## ## ##
    white ######
    Filipino ######
    Gender
    Male ##### ## ## ## ## ## ##
    Female ##### ## ## ## ## ## ##
    and similarly for other columns
    where ethnicity, gender are columns in the table and Course_enrollment, Test_attended, pass_test are calculated columns.
    Please help me to create a report as above if anyone knows how to do it.
    Edited by: Shailaja on Jul 19, 2010 12:23 AM

    Two ideas I can think of:
    1) Create multiple pivot tables and then display them one under the other
    2) Create multiple measure columns such as "male_amt", "female_amt", "white_amt", "asian_amt", "black_amt", etc. for all the columns you need. Then you could simple stack them in a single pivot table.
    Option #2 might give you the prettiest results - but also requires a lot more maintenance (for instance, if you reclassify ethnic groups, you'd have to go through the reports to add additional metric columns).
    Hope this helps,
    Scott

  • How to place a JPanel at the center of another JPanel?

    Can anyone tell me how to place a JPanel inside another JPanel? The first JPanel consists of three JPanels each consisting of a label&textfield and are placed using BoxLayout. The second JPanel is a big blank screen. So, i would like to put the first JPanel at the center of second JPanel(horizontally & vertically). The problem is that i don't have any other component. So,if i try to use FlowLayout, i am able to put it at the center(horizontally, not vertically) only on the top edge. I tried to use BoxLayout. But, i couldn't(as i don't have any other elements). I tried to create some blank elements. But, they are messing up the elements of my JPanel. Any cluesssssssss??????????

    import java.awt.*;
    import javax.swing.*;
    public class CenteredLayout
        private JPanel getPanel()
            GridBagLayout gridbag = new GridBagLayout();
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.insets = new Insets(2,2,2,2);
            JPanel p = new JPanel(gridbag);
            addComponents(new JLabel("label 1"), new JTextField(8), p, gbc);
            addComponents(new JLabel("label 2"), new JTextField(8), p, gbc);
            addComponents(new JLabel("label 3"), new JTextField(8), p, gbc);
            JPanel panel = new JPanel(gridbag);
            panel.setBackground(Color.pink);
            gbc.anchor = GridBagConstraints.CENTER;
            gbc.insets = new Insets(0,0,0,0);
            panel.add(p, gbc);
            return panel;
        private void addComponents(Component c1, Component c2, Container c,
                                   GridBagConstraints gbc)
            gbc.anchor = GridBagConstraints.EAST;
            gbc.gridwidth = GridBagConstraints.RELATIVE;
            c.add(c1, gbc);
            gbc.anchor = GridBagConstraints.WEST;
            gbc.gridwidth = GridBagConstraints.REMAINDER;
            c.add(c2, gbc);
        public static void main(String[] args)
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new CenteredLayout().getPanel());
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    }

  • How to place the images in Indesign xml file by Javascript?

    How to place the images in Indesign xml file by Javascript?
    We got the Indesign xml file, how to give the image placement link by Indesign javascript? Please help me its urgent.

    Hi,
    You can pass the image url as a href attribute=> file:///Users/me/Documents/my_pic.jpg directly within your xml. It just needs that you pass a local, static and valid url.
    If you want to add image later once the xml is flowed and so target specific nodes and inject images, it's a bit more complex. If the node is not part of the layout, you may try to reach the XMLElement objet and such an attribute, then layout the element.
    var x = some XMLElement
    x.xmlAttributes.add("href","file:///Users/m/Documents/my_pic.jpg" );
    If already placed, then you have to get the associated pageItem, then place your file into it.
    pagItm.place ( File ( "/Users/m/Documents/my_pic.jpg" ) );
    Hope that helps,
    Loic
    http://www.loicaigon.com

  • How to add some image in adobe muse

    hi.. im just new in adobe muse .. im sorry for this very noob question.. i just want to ask how to add some image in adobe muse ?? with a link .. thanks

    To add images press CTRL+D and then select the image and place it where you want.
    To hyperlink it go to the top menu and there should be Hyperlink folowed by a box. Enter your URL to link in there.
    You can also use the slideshow widget should you want to make a slideshow.

  • How to place tif file through a script in an indesign document?

    how to place tif file through a script in an indesign document?

    Emanuele:
    it works if i just run a script....
    but since i have been using a gui to do some functions, this  place command is not able to place the output tif file back into the  document

  • How to place the xml contents into textframe?(cs2_js)

    after flow the xml into indesign document,i able to get the particular xml element and its contents in a variable.
    i want to know how to get certain range of xml element's contents and how to place that in textframe?
    //for get content
    app.activeDocument.xmlElements.item("header1").contents
    if i place the particular element's contents in xml structure extra tags added at edge
    i want to avoid that duplication also
    thanks in advance
    by
    subha

    Hi,
    Use FM WS_FILE_COPY To FIrst Copy the File to some Location
    and Next Use FM TMP_GUI_DELETE_FILE To Delete the File from Old LOcation.
    Regards
    Bala.M

  • Who knows how to output some text once labview detects something I want using pattern matching(V​ision assistant)​?

    who knows how to output some text once labview detects something I want using pattern matching(Vision assistant)?
    The text is something like"Yes, this is a coin"
    Thanks!

    I attached a SubVI which I used to place an overlay next to a Pattern, found by a Pattern Match before:
    As you can see, you simply pass the image reference and the Array of Matches to the VI along with the String you want to have as an overlay next to the Match.
    I also modified your VI a bit, but didn't test it. I created an Array of clusters, each elment containing the template path along with the respective text.
    Please note that this is just a hint!
    Christian
    Attachments:
    suggestion.vi ‏146 KB
    Overlay_Txt.vi ‏24 KB

  • Dialog programming - How to place a select-option field in a dialog screen

    Hi all,
    In Dialog Programming, How to place a select-option field in a dialog screen.
    Kindly give me some example code...
    Thanks,
    Jaffer Ali.S

    hi Ali,
    U can add select-options in ur module pool by using  SELECTION-SCREEN BEGIN OF SCREEN <scrn> AS SUBSCREEN  command.
    check this link for reference.....
    http://help.sap.com/saphelp_47x200/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/frameset.htm
    Example Code :
    DATA : ok_code TYPE sy-ucomm.
    SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X',
                p_rad2 RADIOBUTTON GROUP grp1,
                p_rad3 RADIOBUTTON GROUP grp1.
    SELECT-OPTIONS: s_matnr FOR  mara-matnr,
                    s_matkl FOR  mara-matkl,
                    s_mtart FOR  mara-mtart.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN END OF SCREEN 1010.
    START-OF-SELECTION.
      CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    CALL SCREEN 1010 .
    ENDMODULE.                    "status_0100 OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    SCREEN 100 ****************
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      CALL SUBSCREEN sub_1010 INCLUDING sy-repid '1010'.
    <b>***** where sub_1010 is name of sub-screen area</b>
    PROCESS AFTER INPUT.
      CALL SUBSCREEN sub_1010.
      MODULE user_command_0100.
    <<< REMOVED BY MODERATOR >>>
    Harimanjesh AN
    Edited by: Marcelo Ramos on Dec 17, 2008 7:54 PM

  • How to place a delivery block at line item level from Inbound ORDERS IDoc?

    Hi EDI/ABAP Experts,
    Can anyone please tell me how to place a delivery block at line item level from Inbound ORDERS IDoc?
    I tried using exit "EXIT_SAPLVEDA_001'. But there is no LIFSP field in either of XVBEP and YVBEP structures.
    Can you guys throw some light. How to place a delivery block @ line item level on sales order from Inbound ORDERS IDoc.
    Thanks,
    Matt .

    Look into the Include: LVEDAF5A that is the only place where this exit is hit... double click on the Structures and look which structure has billling block field.. and use that..
    FORM CUSTOMER_FUNCTION_IDOC USING IDOC_DATA.
      CALL CUSTOMER-FUNCTION '001'
        EXPORTING SEGMENT = IDOC_DATA
                  DVTCOMAG = VTCOMAG
                  DXMESCOD = IDOC_CONTRL-MESCOD
                  CONTRL   = IDOC_CONTRL
        TABLES    DXBDCDATA = BDCDATA
                  DXVBAP    = XVBAP
                  DXVBEP    = XVBEP
                  DYVBEP    = YVBEP
                  DXVBADR   = XVBADR
                  DYVBADR   = YVBADR
                  DXVBPA    = XVBPA
                  DXVBUV    = XVBUV
                  DD_FLAG_P = D_FLAG_P
                  DXKOMV    = XKOMV
                  DXVEKP    = XVEKP
                  DYVEKP    = YVEKP
        CHANGING  DXVBAK   = XVBAK
                  DD_FLAG_K = D_FLAG_K
        EXCEPTIONS
                  USER_ERROR = 01.
    If you are in ECC6.0  you can also use Enhancement point : INTERPRET_IDOC_ORDERS_01 SPOTS ES_SAPLVEDA. in include: LVEDAF2U

Maybe you are looking for

  • Does brushbreezy stilll support cs6

    hey everyone i remember back in the day when brushbreezy use to be the cool era to use vector or grunge etc style brushes for dynamic graphicing  designs. is any of that is still useful and does photoshopcs6 or any updates in cs6 still support the co

  • Is there a 4K XAVC codec for Premiere Pro on PC yet?

    I have read that there is a plugin via Rovi for this, but that it is A) pricey, and B) unstable. Has Adobe or anyone else put out a codec/plugin for this yet? I have also heard that CS6.5 will support it. Lots of rumors floating around.

  • Kind of a security issue...

    So, I own a MBP. I suspect my roommates are using it when I'm not around. Maybe this sounds childish, but I hate the situation. I have talked to them, but, well. Roommates will always be roommates. Is there an application I can use to "track" what is

  • Saving Photoshop 7/CS/CS2 files

    Since I updated my G5 and G4 Mirror door to Tiger. When ever I open and save a photoshop file to my Server which is running OSx 10.3.9. I get a message saving Could not save file name because write acces was not granted. If I close it it is corrupted

  • Window resizing and repaint()

    hiya all. I was wondering what specifically was called when resizing a JFrame. Im assuming that repaint() is called as when i resize my JFrame the paintComponant method is run, but is there anything else? The reason i am asking is that i have an appl