How do i create a mask for an application?

Hello.
I pulled out an flex app out of Flash catalyst, and it has several "fx:designLayer"s containing images that slide off the stage.
I'd like to hide the images going outside the stage borders with a mask.
I tried:   
<s:mask>
    <s:Group id="mask">
        <s:Rect width = "100" height="100">
            <s:fill>
                <s:SolidColor color="#FF0000"/>
            </s:fill>
        </s:Rect>
    </s:Group>
</s:mask>
but all I see is blank.
I tried to set mask = "{mask}" inside the <s:Application > tag and removing the <mask> tags, which works, but it gives me a warning that bindings to mask cannot be detected.
How do I get the mask for the app with no warnings?
And just for the sake of understanding Flex, how could I fix either one of those approaches?

Defining a Group as the mask doesn't seem to work because the Group is never
put on the display list so it doesn't draw its content.  Other examples I
saw were using FXG will compiles down into Sprites that draw automatically.
I don't normally do masking like this, I just draw a filled Sprite and
assign it as the mask.
One way I found that worked was this:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="800"
minHeight="600"
               backgroundColor="#66DDFF"
                >
    <fx:Declarations>
    </fx:Declarations>
    <s:Group id="mask" includeInLayout="false" visible="false" >
        <s:Rect x="300" y="10" width="600" height="200">
            <s:fill>
                <s:SolidColor color="#FF0000"/>
            </s:fill>
        </s:Rect>
    </s:Group>
    <s:Rect height="341" id="myRandomThing" width="800" x="79.5" y="86.5" >
        <s:fill>
            <s:LinearGradient rotation="270" scaleX="341" x="115.5" y="341">
                <s:GradientEntry color="#222222" ratio="0"/>
                <s:GradientEntry color="#FFFFFF" ratio="1"/>
            </s:LinearGradient>
        </s:fill>
        <s:stroke>
            <s:SolidColorStroke  color="#333333"  weight="10"/>
        </s:stroke>
    </s:Rect>
</s:Application

Similar Messages

  • How can i create a mask of grays?

    Hi
    i did learn how create a saturation mask (a mask that contains the colors)
    how can i create a mask with the grays ?
    can i do it? how can  i create it ?
    the only way i can thing it's use a color selective adjustament layer and set to +100 black every sliders outside grays
    but i don't think it's a mask with all the Grays
    thanks

    If you start out with, say, this image in Lab:
    Then duplicate the layer and set Blend If, in both the a and b channels, to 123 - 133. That layer will then look like this:
    You see you have all the neutrals from black to white, but not the saturated colors. You can load transparency here as a selection the normal way - ctrl+alt+2, or ctrl-click the L channel. Save the selection and you have your mask.
    How much fuzziness you want in the neutrals is determined by where you set the Blend If sliders. You can also split the sliders with the alt key for a softer transition. Here it includes 5 values either side of strict neutral.

  • How do I set a mask for a MPEG member?

    Hello,
    Somebody know How do I set a mask for a MPEG member??
    Thanks for your help

    Insert -> Media Element -> QuickTime
    Name the empty QT member that this creates and open (if it isn't already) the Property Inspector to the 'Member' tab. Click the button labelled "..." at the bottom-right of the Filename text entry field and select your MPEG file.
    Read the docs for member.mask

  • How can I create a URL for a PWA for MS Project Server 2010 project file that includes the view?

    Hi, this question has been answered for 2013. The answer here suggests that it can be done in  2010.
    See:
    http://social.technet.microsoft.com/Forums/projectserver/en-US/3affdc4f-36bf-4381-8b75-27c73465efd4/action?threadDisplayName=how-can-i-create-a-url-for-a-pwa-for-ms-project-server-2013-project-file-that-includes-the-view
    Who knows how?
    Regards
    Sander

    Hi Sander,
    As far as I tested it, it is not possible either with PS2010. The URL only contains the PDP name and the projUID.
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • How can i create a Trash for external USB Drives ?

    Hello,
    how can i create a Trash for external USB Drives or my TimeCapsule ?
    Thanks.

    You do not need to create trash cans for individual drives.  The trash can on the desktop holds deleted files from all mounted drives.
    TimeCapsule manages its own space.  If it fills up it will delete older backps to make space for newer ones.

  • How can I create a form for users wherein the text field will expand to accommodate additional text?

    How can I create a form for users wherein the text field will expand to accommodate additional text?

    You need to use LiveCycle (PC Only) to create a dynamic form like that.
    The best you can do with Acrobat to view all of the text in a field is to set the field to multiline, and set the size to "Auto" (If you don't set the size to 'Auto', you can enter as much text as you wish, but the user will need to use the scrollbar to view all of the text.)

  • HT4191 iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.

    iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.  I've seen reference to the  "My iPhone" local storage put no mention on how you create this folder or access this folder within the Notes app.  I realize storing information in a local storage like this provides no syncing between other iDevices but that is exactly what I'm looking for.  I'm running iOS7.0.4 on a iPhone 5S, and a iPad Air.  Any help would be greatly appreciated.

    If you go to Settings > Notes > Default Account you will see "On My iPhone" as the default account and the only choice if you have not enabled syncing Notes in Settings >iCloud or Settings > Mail, Contacts, Calendars. If you have enabled syncing you can still select "On My iPhone" as the default account. When you are in the Notes app you won't see any accounts listed if you have not enabled syncing because they are all in the On My iPhone account and that is the only place possible. It is not a folder that you create.

  • I've never used garage band. How do I create a ringtone for my new Iphone4s?

    I've never used garage band. How do I create a ringtone for my new Iphone4s?

    Onefineday wrote:
    How do I create a ringtone for my new Iphone4s?
    this explains how:
    http://www.bulletsandbones.com/GB/GBFAQ.html#makeringtone
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • HOw do I create a ringtone for iphone5 using the new itunes

    How can I create a ringtone for my iphone 5 using the newest version of itunes. Thanks

    This article takes you through the process
    http://www.simonblog.com/2012/12/01/itunes-11-how-to-create-free-ringtone-and-te xt-tone/

  • HT1660 How do I create a library for a second iPod?

    How do I create a library for second iPod?

    See How to use multiple iPods, iPads, or iPhones with one computer for the official suggestions. In practice a single library with each device syncing to one or more playlists is much the easiest way.
    tt2

  • How do i create mailing labels for an avery template using pages

    how do i create mailing labels for an avery template using pages.

    mcc,
    The first topic in the "More LIke This" box to the right of your question is a rather comprehensive address label printing discussion. Does it answer your question?
    Jerry

  • How do i create a password for apple tv? it doesn't accept my itunes password

    how do i create a password for apple tv? it doesn't accept my itunes password

    no to access itunes store you need the appleID and correct password
    but to access the internet you need the password for your wifi network

  • How can mass create batch classification for many material batches? ?

    Hi Experts,
    In our system , there are so many material batches which have not been classified,see by
    BMBC Tcode.
    That means these batches has no values in the batch class. I know we can create
    classification for these batches with MSC2N Tcode.
    But there are so many batches  which have not been classified,more then 2000.
    It is not possible to create classification for every batch with with MSC2N once a time.
    So how can I create batch classification for so many batches once a time?
    How can I mass create batch classification for so many batches??
    Thanks for any reply!

    Hi,
    Please be aware that SAP does not support the use of batch
    input in the classification system. SAP recommends you use BAPI's for
    example in your case BAPI BAPI_OBJCL_CREATE and BAPI_OBJCL_CHANGE
    would be able to help. For more information, please have a look at the
    note: 943559 - Point 2 and 13. Point 13 references the note 1083986.
    I hope this helps!.
    Best Regards,
    Arminda Jack

  • How would I create buttons states for MCs I am creating abstract MCs

    I am creating a generic website that would have abstract MCs that would load jpg or TXT fields for the user interface to allow for fast updates to the site. The MCs that would make up the user interface would be empty and load things into it using XML or PHP later on. How would I create button states for the user interface MCs.  I started creating a function for every MC button state but I thought there might be a more efficient way.
    would creating a array help in this case?
    and is using URLRequest the way to link to pages with in a movie well the flash movie that is the site it's self?
    /*---------------------------- THE START OF MY ACTION SCRIPT ------------------------------*/
    var waywardLogo_mc:MovieClip = new MovieClip;
    var theCollection_mc:MovieClip = new MovieClip;
    var newsPage_mc:MovieClip = new MovieClip;
    var whatthe#$@!doyouwant!?_mc:MovieClip = new MovieClip;
    /*---------------------------- onOver ------------------------------*/
    waywardLogo_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
    theCollection_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
    newspage_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
    whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
    /*---------------------------- onOut ------------------------------*/
    waywardLogo_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
    theCollection_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
    newspage_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
    whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
    /*---------------------------- onClick ------------------------------*/
    waywardLogo_mc.addEventListener(MouseEvent.CLICK,onClick);
    theCollection_mc.addEventListener(MouseEvent.CLICK,onClick);
    newspage_mc.addEventListener(MouseEvent.CLICK,onClick);
    whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.CLICK,onClick);
    function onOver(event:MouseEvent):void
    event.target.alpha = .5;
    function onOut(event:MouseEvent):void
    event.target.alpha = 1;
    function onClick(event:MouseEvent):void
    event.target.URLRequest("");
    /*---------------------------- onover, onOut, onClick buttonModes ------------------------------*/
    waywardLogo_mc.buttonMode = true;
    theCollection_mc.buttonMode = true;
    newspage_mc.buttonMode = true;
    whatthe#$@!doyouwant!?_mc.buttonMode = true;

    click insert/new symbol, tick movieclip, assign a name, tick export for actionscript and in the class textfield enter a name (say ButtonClass) and click ok.
    attached to the first frame of your new movieclip, type stop() in the actions panel.  put whatever graphic you want on-stage for your button's up stage.  create another keyframe, label it "over" and put whatever graphic you want for button's over state on-stage.
    in a layer above those graphics, you'll probably want to add a dynamic textfield so each of your buttons can have different text.  assign the textfield and instance name (say tf) and extend its timeline to the last frame of your movieclip button.
    then when you want to create a button, on your timeline you can use:
    var b:ButtonClass=new ButtonClass();  // these two lines need to be entered for each button
    buttonhandlerF(b,someX,someY);
    //-------code between dotted lines only needs to be entered once no matter how many buttons you add --------------------
    function buttonhandlerF(b:ButtonClass,x:Number,y:Number){
    b.addEventListener(MouseEvent.MOUSE_OVER,overF);
    b.addEventListener(MouseEVent.MOUSE_OUT,outF);
    b.x=x
    b.y=y
    addChild(b);
    function overF(e:MouseEvent){
    e.currentTarget.gotoAndStop("over");
    function outF(e:MouseEvent){
    e.currentTarget.gotoAndStop(1);
    //-------code between dotted lines only needs to be entered once --------------------
    // you'll also want to create a click listener and listener function
    the code between the dotted lines is amenable to being added to a ButtonClass.as class file if want to expand your capabilities.

  • I would like to know how do you create a shortcut for a webpage for your desktop?

    I would like to how if possible, how do you put a "shortcut" on your desktop when using Firefox?
    Thank you for your time.

    ''how do you create a shortcut for a webpage for your desktop?:''
    Drag the favicon at the left side of the location bar to the desktop
    Reference: (you can also do from bookmarks)
    * https://support.mozilla.com/kb/Creating+a+desktop+shortcut+to+a+web+page

Maybe you are looking for

  • How to add header and fooder in text file

    Hi, i have created simple application for generate report from database into text file. But i need to add header and fooder in text file. I dont know is there any API for adding these. Can anyone help me to create header and fooder in text file. the

  • Photos doesn't save to camera roll.

    I have the new ipad 3 just updated to iOS 6 and when i try to save a photo from facebook, emails, or safari it doesn't want to save to my camera roll. How can i fix this problem ?

  • Apple TV no longer stream from iTunes Match

    Since the last update Apple TV does not longer stream my music from iTunes Match. Also is the option for itunes match not longer selectable but on my ipad is it still working.

  • WHAT TO DO NOW? I CAN'T PUT SONGS ON MY IPOD!!!!

    i think my ipod is 3rd how do i tell? its either 2nd or 3rd any way . . . . so i plugged my ipod in and clicked on itunes, then i try and sync my ipod BUT i see that my ipod image never showed up at all why is this doing this i cannot add any thing t

  • VPN-PassThrough with wlc 5508 7.0.235.0

    HI, i have 2 ssid with the same comfiguration (diff only in name) in one ipsec ssid vpn (l2tp over ipsec with natt ) works fine, in another after phase 2 is completed no traffic is forwarded and vpn session is dropped. There are no access lists on eq