7 Replies Latest reply on Jul 15, 2010 1:54 PM by DomeGuy

    Masking the shape of the stage


      I've done some searching through the forums and can't seem to find an answer to this. I seem to remember that older versions of Director would allow you to apply a mask to the stage allowing you to make the stage any shape that you wanted. You could, in essence, cut holes in the stage and see the desktop through it. Is this still possible? Thanks.

        • 1. Re: Masking the shape of the stage
          DomeGuy Level 1

          Here's what I discovered. If you click outside the stage in Director, the property inspector shows 3 tabs: Guides, Movie, and Display Template. Click the Display Template tab. I turned off all the Titlebar Options and set the border to none. I imported a 1 bit black and white mask and selected it under the Appearance options for the masking cast member. Whatever is white on the mask will punch a whole in your stage and you can see the desktop underneath. The problem with this is that if you select something on the desktop it  opens and covers the projector that is running. This apparently only works if you turn off the Full Screen option under your projector publish settings. If you select Full Screen the mask does not work.


          I'm working on a kiosk that was originally done using a program called LabView. It has virtual buttons on the touch screen that use microcontroller to activate various relays, pumps, valves, and sensors in the hardware part of the kiosk. LabView does not go full screen and allows the user acces to the start bar and desktop. I was hoping to use Director as a skin over the top of LabView. Using a mask that would allow user to acces the LabView buttons but keepin Director on top thereby restricting access to the desktop, etc. Does anyone know of a solution to this? Could I use some sort of ActiveX object? Maybe communicate with the microcontrollers through Director or communicate with the LabView program but keep Director as the top element?

          • 2. Re: Masking the shape of the stage
            Mike Blaustein Level 4

            When you set the projector to be fullscreen, it will make the projector cover the full screen, hence, no punchthrough.  That is part of Director's definition of fullscreen.  You can probably change the stage's #windowType to #tool, though. That will cause it to always be on the top.


            Also, there are xtras, like BuddyAPI which let you control the order that the windows are drawn in.  You can use this to make sure that the Director window is on top when it should be.

            1 person found this helpful
            • 3. Re: Masking the shape of the stage
              DomeGuy Level 1

              Thanks Mike, I'll give those things a try and see what happens.

              • 4. Re: Masking the shape of the stage
                DomeGuy Level 1

                I still haven't been able to make the projector stay on top, but I'm still working on that. I have another question. I put a transparent rectangle around the masked out area and attachec a piece of code to tell me the mouse location when I click on the desktop that is visible through the mask. I also attached the code to the mask itself. But, when I click on the desktop the projector does not register the mouse click. Is there a way to remedy this?

                • 5. Re: Masking the shape of the stage
                  DomeGuy Level 1

                  I now figured out how to track the pointer and mouse clicks in a masked off area, but, when I double click something on the desktop it becomes the top element and hides my projector. Anymore ideas how to keep the projector always on top no matter what else is clicked? I'm getting ready to try the buddyAPI method. Thanks.

                  • 6. Re: Masking the shape of the stage
                    Sean_Wilson Adobe Community Professional

                    If setting the window.type to #tool isn't working (and it should) then use Buddy API's baSetWindowState(baStageHandle(), "StayOnTop")

                    1 person found this helpful
                    • 7. Re: Masking the shape of the stage
                      DomeGuy Level 1

                      When I read in the help files about making the template a tool, it said that it would still have a short title bar with a small close box and I didn't want that. I just tried it and it works the way I need it to! Now onto the next parts of the experimentation. Thanks a lot guys!