Multiple stages on multiple screens of different size

I'm working on a project that requires me to have two stages on two screens of different size. How do I do this in Flex, or is it even possible?
More specifically, I am building a kiosk appliction, that will have the menu on a small touch-screen that sits in front of a larger, wall-mounted screen. When the user selects content to be played (videos, web sites, whatever) from the touch-screen, then the effect of that selection needs to be sent to the other stage. I need to be able to run a screen-saver on the main screen, also. Basically, the controls are the main application, and the other screen is simply a container for viewing things.
I am currently packaging my Flex project in AIR, not through the web, so I actually have a windowed application. Basically, I just need to create a new window with a custom chrome that simply holds a movie.
Is such a thing possible in Flex? I couldn't figure out how to spawn another stage, much less one that was referencable from the first stage.

Hey all. I have reached the answer. I left everything up that I posted before, in case anybody is having similar issues. To create the custom component, click your project, create a package, and then right-click that package and create a new MXML component. Then, create the MXML just like you would before. Your root tag will be whatever you are working to modify (so, s:Window for my case, but you can do an s:Label or whatever you want). So, first, I'll give you the code for my simple Window component:
[CODE]
<?xml version="1.0" encoding="utf-8"?>
<!-- This is a window component which creates a transparent window with no system chrome (no bars, close, min, max buttons, resize stuff) that contains... This screen is spawned from the main MXML WindowedApplication using AS 3. -->
<s:Window xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    systemChrome="none" visible="true" transparent="true" showStatusBar="false" width="400" height="300"
    <s:layout>
        <s:BasicLayout />
    </s:layout>
    <s:Label id="controlScreenTitle" text="new Window from VideoScreen component" fontSize="72" fontWeight="normal" color="#222222">
    <s:filters>
        <s:DropShadowFilter color="#CCCCCC" />
    </s:filters>
    </s:Label>
</s:Window>
[/CODE]
All I did was a very simple white box there. You can disable the system chrome and such from the main Window tag, as I have shown. The window this creates has no [ _ ] [ [] ] [ x ] buttons, bar along the bottom, or any background. In my actual project, this component will hold a container to play my video objects.
Then, I create my main document:
[CODE]
<?xml version="1.0" encoding="utf-8"?>
<!-- This is the main MXML file for the application. MXML is based on pure XML, and is actually a short-cut to generating AS code. You use MXML to set up the layout of the stage. -->
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                        xmlns:s="library://ns.adobe.com/flex/spark"
                        xmlns:mx="library://ns.adobe.com/flex/mx"
                        showStatusBar="false" alwaysInFront="false"
                        creationComplete="init()">
    <!-- Imports -->
    <fx:Style source="KioskScreensStyles.css" />
    <fx:Script source="controlScreenMain.as" />
    <fx:Script>
        <![CDATA[
            /* Insert other ActionScript stuff here. Try to put as much of it as you can in the .AS file, though */
        ]]>
    </fx:Script>
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., variables, services, value objects) here -->
        <!-- Any variables placed in here will be global, and live for the entirety of the entire program's run. However, for simplicity's sake, I have placed all of those for this application in the imported .as file. But, for reference, they are described using MXML. ie: -->
        <!--<fx:Type id="ASReferencableName">Value of the variable</fx:Type>-->
    </fx:Declarations>
    <s:BorderContainer id="controlInterface" right="0" left="0" top="0" bottom="0" borderStyle="inset" borderColor="#CCCCCC">
        <s:layout>
            <!-- There are several layouts available to you:
                    * s:BasicLayout will allow you to completely control all placement. Objects are absolutely placed, and don't move from their position on the stage, even if the screen scrolls.
                    * s:TileLayout can be used to create grids of button objects.
                    * s:HorizontalLayout and s:VerticalLayout will lay out elements horizontally or vertically on the stage. You can specify padding around each object (example below). Placement will begin from top-left corner of the visible stage. If you go with either of these, then no x, y properties on elements will be used, as the system will automatically place all elements in the order that they are created.
            -->
            <s:BasicLayout />
            <!--<s:TileLayout columnAlign="justifyUsingWidth" rowAlign="justifyUsingHeight" />-->
            <!--<s:HorizontalLayout verticalAlign="middle" paddingLeft="10" paddingRight="10" />-->
        </s:layout>
        <!-- We default the text of this ID as an error, showing that the .as did not link up. -->
        <s:Label id="controlScreenTitle" text="Error loading program..." fontSize="48" fontWeight="normal" color="#222222">
            <s:filters>
                <s:DropShadowFilter color="#CCCCCC" />
            </s:filters>
        </s:Label>
        <!-- Creating the menu buttons for playing the movies -->
        <s:ToggleButton id="btn1" label="Play video 1" click="btn1_clickHandler(event)" />
        <s:ToggleButton id="btn2" label="Play video 2" click="btn2_clickHandler(event)" />
        <s:ToggleButton id="btn3" label="Play video 3" click="btn3_clickHandler(event)" />
        <s:ToggleButton id="btn4" label="Play video 4" click="btn4_clickHandler(event)" />
        <s:ToggleButton id="btn5" label="Play video 5" click="btn5_clickHandler(event)" />
        <s:ToggleButton id="btn6" label="Play video 6" click="btn6_clickHandler(event)" />
    </s:BorderContainer>
</s:WindowedApplication>
[/CODE]
Now, the important part will be the .as file. Here's parts of that:
[CODE]
/* Imports */
/* import custom components. This is what allows us to open a new window in AIR. NOTE: THIS IS HOW YOU GET THAT CUSTOM MXML FILE IN HERE TO USE */
import customComponents.VideoScreen;
// import older mx stuff only when needed. Try to avoid using these.
import mx.controls.Image;
// import the newer Spark components. Use these for everything possible.
import spark.components.VideoDisplay;
import spark.components.Window;
import spark.primitives.Rect;
// Global variable declairation
protected var screens:Array = Screen.screens;
protected var controlScreenSizes:Rectangle = screens[0].bounds;
protected var videoScreenSizes:Rectangle = screens[1].bounds;
// All variables below Defined in init(), to be sure that they have been fully loaded
// While the :Window declairation technically works for the controlScreen, Flash views this as an error, and will not process everything properly if I type it like that.
//protected var controlScreen:Window = this.Window;
protected var controlScreen;// = this;
/* NOTE: THIS IS THE USE OF MY NEW, IMPORTED CUSTOM WINDOW. This is all you need to do to make it. */
protected var videoScreen:VideoScreen = new VideoScreen();
protected var btns:Array;
/* Initialize all my variables, and call the needed functions to set everything up */
protected function init():void
    controlScreen = this;
    // This is a Window method that opens the Window. I did not have to code this.
    videoScreen.open(false);
    btns = [btn1, btn2, btn3, btn4, btn5, btn6];
    placeScreens();
    createControlScreen();
    loadScreenSaver();
/* Moves all my screens so that they sit in the top-left of each of the two screens, and then expands to be full screen on those two screens, whatever size that may be. */
private function placeScreens():void
    // We move it to -1,-1 because there is 1 px padding and dead white space that I can't figure out how to remove.
    controlScreen.move(-1,-1);
    controlScreen.width = (controlScreenSizes.width+1);
    controlScreen.height = (controlScreenSizes.height+1);
    controlInterface.width = (controlScreenSizes.width+1);
    controlInterface.height = (controlScreenSizes.height+1);
    videoScreen.systemChrome = "Standard";
    videoScreen.move(controlScreenSizes.width,0);
    videoScreen.width = (videoScreenSizes.width);
    videoScreen.height = (videoScreenSizes.height);
/* Puts all the buttons where they belong, and attached the background image that we need and so forth */
private function createControlScreen():void
   /* Most of this code is not needed for the demonstration, so I only include what I feel would be helpful, with psudocode for the rest */
    var backgroundImg:Image = new Image();
    backgroundImg.source = "assets/backgroundImg.jpg";
    var backgroundVid:VideoDisplay = new VideoDisplay();
    backgroundVid.source = "assets/backgroundVid.mp4";
    backgroundVid.width = (controlScreenSizes.width+1);
    backgroundVid.height = (controlScreenSizes.height+1);
    backgroundVid.autoPlay = true;
    backgroundVid.muted = true;
    backgroundVid.loop = true;
    /* Format the buttons. You can change height, width, x and y position on the form, label (the text on it), and some other things (including the ability to spawn video or picture or sound when clicked and such for animations. */
    /* buncha code that moved the buttons around and made them all fit in the screen dynamically based on the screen size. */
    /* Finally, play with controlScreenTitle, which is a label control that you can styple and use for text on the screen in addition to the buttons. In here is just a bunch of code to do that*/
    /* Attach the elements to the controlInterface. The first put on has the lowest z, therefore is under the rest. Stack them in the order you want then displayed. The first one should be either backgroundImg (image), or backgroundVid (video), depending on what you provided and want. Note that the video causes the buttons to lag a lot */
    controlInterface.contentGroup.addElement(backgroundImg);
    //controlInterface.contentGroup.addElement(backgroundVid);
    controlInterface.contentGroup.addElement(controlScreenTitle);
    controlInterface.contentGroup.addElement(btn1);
    controlInterface.contentGroup.addElement(btn2);
    controlInterface.contentGroup.addElement(btn3);
    controlInterface.contentGroup.addElement(btn4);
    controlInterface.contentGroup.addElement(btn5);
    controlInterface.contentGroup.addElement(btn6);
    /* Buncha code for the functionality */
} // End function createControlScreen()
/* Puts the screensaver up on the video display so that we don't burn out the display */
private function loadScreenSaver():void
    //pull in screensave into that window
/* Makes sure that the user doesn't see two buttons active at the same time--that would look like two movies were playing at the same time. */
private function deselectOtherButtons(clicked:int):void
    for(var i:int=0; i<6; i++)
        if(i != (clicked-1))
            btns[i].selected = false;
/* All of the below do the same thing: unselect all the other buttons when one of the buttons is clicked. I could just create one click event handler, but I wanted to leave the possiblity of customizing the result of each button's click, so I left it this way. */
protected function btn1_clickHandler(event:MouseEvent):void
    deselectOtherButtons(1);
protected function btn2_clickHandler(event:MouseEvent):void
    deselectOtherButtons(2);
protected function btn3_clickHandler(event:MouseEvent):void
    deselectOtherButtons(3);
    deselectOtherButtons(4);
protected function btn5_clickHandler(event:MouseEvent):void
    deselectOtherButtons(5);
protected function btn6_clickHandler(event:MouseEvent):void
    deselectOtherButtons(6);
[/CODE]
If anybody looking at this has any questions about it, feel free to ask me. I am not usually able to comb the forums, so you'll have to PM me or something. I actually put this up right after I found my solution, so there is work still to be done on it (obviously). But if you ever need to do anything like this, here's some code for you.

Similar Messages

  • Can a single HID report descriptor support multiple touch screens with different sizes?

    Hi Experts:
    I have a question for specifying touch monitor sizes in the HID report descriptor:
    Can ONE HID report descriptor support multiple touch monitors with different sizes ?
    Thanks in advance
    leo

    My screen shot is from AA9, and I have seen that the UI for AAX is vastly different, but...
    Choose Paper Source from Page Size should be the "one-touch" solution your looking for.
    In my test, my Konica-Minolta Bizhub failed to detect the proper paper trays, but Acrobat correctly spooled the pages.

  • How can I draw multiple different size circle on the same screen?

    Hi,
    Can you help on this topic? How will I create many shape (do � need array or something)?
    Please help,thank you...

    import java.awt.*;
    public class DrawingWithParameters {
    public static void main(String[] args) {
         DrawingPanel dp = new DrawingPanel();
    Container cp = dp.getContentPane();
         cp.add(dp);
    dp.setBackground(Color.LIGHT_GRAY);
    Graphics g = dp.getGraphics();
    drawCar(g, 10, 30);
    drawCar(g, 150, 10);
    public static void drawCar(Graphics g, int x, int y) {
    g.setColor(Color.BLACK);
    g.fillRect(x, y, 100, 50);
    g.setColor(Color.RED);
    g.fillOval(x + 10, y + 40, 20, 20);
    g.fillOval(x + 70, y + 40, 20, 20);
    g.setColor(Color.CYAN);
    g.fillRect(x + 70, y + 10, 30, 20);
    Why "DrawingPanel" gives warning?
    Warning: DrawingPanel cannot be resolved to a type
    I tried many basic codes with DrawingPanel but it doesn't work.I just only want to draw many different size circles.

  • I want to use multiple windows because I can make them different sizes so what keystroke can i use to cycle between them?

    I use Mac 10.4.11 and Firefox 3.6.23
    I have found the keystrokes to cycle tabs but i want a keystroke to cycle windows in firefox because you cant make multiple tabs different sizes or locations to overlap them on screen

    I use Mac 10.4.11 and Firefox 3.6.23
    I have found the keystrokes to cycle tabs but i want a keystroke to cycle windows in firefox because you cant make multiple tabs different sizes or locations to overlap them on screen

  • How do you can change the page size of a pdf in MAC?  I have multiple pdf documents of different sizes that I want to combine.

    Help.  How do I change the page size of a pdf in MAC?  I have multiple pdf documents in varying sizes I would like to combine and print.

    There's no real need to do that. A PDF can have pages of different sizes.
    On Fri, Jun 6, 2014 at 4:11 AM, christine rambo <[email protected]>

  • Multiple masters with DIFFERENT sizes?

    Hi,
    I think this is a NO, but I have to ask.
    Is it possible to have different master pages in a single document, each with a different size?
    If not, how do I tackly my problem?
    I am making a sales matrix and it will be comprised of 3.5 inch by 7 inch pages with some 3.5 by 3.5 inch pages interspersed throughout.
    I don't want to have two InDesign files, so it would be great if I could have masters with different sizes, OR if there was a way to use the larger of the two sizes, 3.5x7 and then set my square 3.5x3.5 pages doubled up on the larger page.
    I know I can use the 'book' feature, but sometimes that is more trouble than it's worth, especially with different size pages. What do you suggest?

    Peter,
    why do you say easier to work the other way?
    I think this spread thing may just work.
    I normally have facing pages in all of my saddlestitched letter size docs and output via Export to PDF with trim marks on. That gives me a pdf and eachpage has trim marks.
    Doing it this way with a 3.5x3.5 document and outputting spreads, I get exactly what I want. A pdf with one 7 inch page and 4 3.5 inch pages all with trim marks at the right places.
    Before I proceed though, I want to hear why this might be a bad idea....

  • Multiple idocs in Single Job behaves differently (RBDAPP01)

    Hi,
    How to debug the background Job for Program RBDAPP01 which already posted the Idocs in 53 status from 64.
    I wanted to analyze why multiple idocs in same job behave differently than the single idoc in a job. In case of multiple idocs in a single job i put packet size 1, but no help.
    Thanks,
    Asit Purbey.

    I found the solution, so closing this Post.

  • How to accept multiple attachments on selection screen?

    Hi All,
    I need to know how to accept multiple attachments on selection screen and send them as email to external system (outlook).
    Basically, my req is to send a common email with attachments to certain users. These users are displayed in ALV. User will select ALL or specific user from ALV and send an email with message entered on selection screen.
    I used text editor control to input message body. I need to know how to accept attachments and send them.
    Appreciate any inputs.
    Thanks,
    SKJ

    SAP uses a nifty little button called 'Object Services' on ME23N (top left) which you can use to attach documents to business objects.
    http://help.sap.com/saphelp_nw70/helpdata/EN/be/3fe63659241157e10000009b38f889/frameset.htm
    It's a complicated way of doing it but might give you extra functionality in the long run.

  • How to register multiple stages in fault handler?

    Hi,
    I am trying to create multiple fault handlers for multiple CQL processors.
    I understand how to create one handler but when I am trying to add another osgi service to rgister anothet fault handler I get strange behaviot in theeclipse. The EPN disappears.Any advice?
    Another question - how do I register multiple stages to the same handler?

    Hi,
    I am trying to create multiple fault handlers for multiple CQL processors.
    I understand how to create one handler but when I am trying to add another osgi service to rgister anothet fault handler I get strange behaviot in theeclipse. The EPN disappears.Any advice?
    Another question - how do I register multiple stages to the same handler?

  • Validation of materials entered in multiple selection in selection-screen

    Hi,
    How can I do the validation for all the materials entered in multiple selection in selection-screen?

    What kind of validation do you need to do?
    One of the easiest options is to select the materials to an internal table and then loop through it. Something like this:
    SELECT-OPTIONS: SO_MATNR FOR MARA-MATNR.
    AT SELECTION SCREEN.
      SELECT MATNR FROM MARA
      INTO TABLE I_MATNR
      WHERE MATNR IN SO_MATNR.
      LOOP AT I_MATNR.
    "   <do validations here>
      ENDLOOP.
    Here table I_MATNR has only one field MATNR.
    But please be careful with this, because you might end up going through thousands of material numbers. You might want to limit the user's choices by making the field required and removing some other options. Also you can check number of records in I_MATNR and allow only, say, not more than 50 materials, thusly forcing the users to limit their selection criteria.
    Naturally, other selection options may be added here.

  • Multiple stages app dev

    Has anybody tried multiple stages app dev?
    The main stage manages the life-cycle of several secondary stages. Meanwhile, each secondary stage has an independent UI.

    Currently, I'm working on a desktop investigation-like app where the user starts from the main stage, and then creates new stages to process individual investigation. Meanwhile, she's free to jump between stages. If interested, I'll keep you posted on how JFX handles this approach.

  • Can i get multiple records if selection screen is 900 using PROVIDE

    Hi All,
    Iam using following statement for fetching MULTIPLE records from infotype 0008. In Attributes if i declare LDB as pnp and selection screen as 900, then iam not getting any records.
    Instead of th selection screen 900 is empty. then records will getting properly.
    How can i get multiple records if selection screen is 900?
      PROVIDE * FROM p0008
                    between pn-begda and pn-endda.

    Hi Ranjith
    You can use
    PYBEGDA and PYENDDA instead of PN-BEGDA AND PN-ENDDA.
    Regards
    Muneer.VK

  • How to support multiple languages on logon screen?

    Hai,
        Just i want to know, how to set the multiple languages on logon screen in EP?
    Thanks & Regards,
    Venkatesh.K.

    This is the XI forum.
    Try posting the question on the EP forum,
    https://www.sdn.sap.com/irj/sdn/developerareas/ep
    Regards
    Bhavesh

  • How to support multiple languages on logon screen (Using EP)?

    Hi Everyone,
       Just i want to know, how to support multiple languages in Logon Screen Using EP?
    Thanks & regards,
    Venkatesh.K.

    Hi,
    Transac SMLT :
    http://help.sap.com/saphelp_nw2004s/helpdata/en/62/163d38c2113265e10000009b38f889/frameset.htm
    Import de language:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/62/163d38c2113265e10000009b38f889/frameset.htm
    Hope it help's

  • How to support multiple languages on logon screen in EP?

    Hi All,
       Just i want to know,  how to support multiple languages in logon screen in EP?

    Hi,
    Logon screen can be customized. This .<a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/5232">url</a> might help you do this.
    Please check out this <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/5232">blog</a> on language display of logon screen.
    Another <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3680">blog</a>.
    <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1436">Another</a> one here.
    Regards,
    Sujana

Maybe you are looking for

  • DB2 on zOS support in SQL Developer?

    I managed to connect to DB2 on zOS by adding third party JDBC drivers from IBM (db2jcc4.jar and db2jcc_license_cisuz.jar) in SQL Developer preferences. During connecting I get an error: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=SYSCAT.SCH

  • BookMarkRoot.children

    Hi, to obtain a  list of the top-level bookmarks and the pages they point, I use the VB6  code    Dim avDoc As Acrobat.CAcroAVDoc    Set avDoc = CreateObject("AcroExch.AVDoc")    Dim pdfFile As String    pdfFile = App.Path & "\file.pdf"    If avDoc.O

  • WIN £50 Amazon Vouchers in our Community Prize Dra...

    Hi Everyone It's time for another prize draw- As it's social media week this week we've been chatting about how much social media has changed our lives – the way we communicate with friends and family via networks like Facebook and Twitter, and how w

  • Move with Repeater:hBox and filterFunction = Strange behaviour

    Hello, I fill a hBox with item from a Repeater. Now I have a Button that moves the hBox one widht to the right (to the next items). To prevent, that the move is going to far I do this: [code] if (theBox.x > (myDatalist.length*(-208)-(-832))){ myMove.

  • RFX response Workitem in UWL of approver even if it is closed

    Hello experts, In a scenario, if the RFx response is closed, that is 'transaction completed'. But still the work item appears in UWL of the approver and 'Approve' button is enabled. Can anyone tell me how to close the RFx response, so that the work i