Adding a mask for a sprite

I am having trouble adding a mask for a sprite, here is the
reason why:
After adding everything in the currect display list (i would
hope it is), the mask area for the sprite is bkack and covers it
rather than showing the content, and everywhere else the mask is
not located, the sprite shows. It seems to be showing the opposite
of what it should. If I do not use the mask, the sprites will not
show or exist at all, and with it they appear, similar with using
just a filled movieclip within the "other" sprite.
Here are the conditions:
I made a sprite with a given size and location (call it the
main sprite). Then I added two sprites to that main sprite, and one
of those two was the mask for the other. After that for the "other"
sprite within the main, i made a for loop and filled it some with
textfields using a database. Then, filled the mask sprite with
color. Also, the main sprite was sized the same as the mask sprite
so they are identical.
var mainSprite:Sprite = new Sprite();
var maskSprite = new Sprite();
var otherSprite = new Sprite();
mainSprite.addChild(maskSprite());
mainSprite.addChild(otherSprite());
otherSprite.mask = maskSprite;
for (conditions here) {
//textfields randomly entered here to the other sprite
within conditions, etc.
maskSprite.graphics.beginFill(0xFF0000);
maskSprite.graphics.drawRect(0, 241, 530, 141);
addChild(mainSprite);
Note: I am using AS3

Nevermind, i am just using movieclip object with a sprite as
it's mask. Works fine.

Similar Messages

  • 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

  • [svn:fx-trunk] 12542: When adding a mask to the display list need to validate it and all its children .

    Revision: 12542
    Revision: 12542
    Author:   [email protected]
    Date:     2009-12-04 10:38:32 -0800 (Fri, 04 Dec 2009)
    Log Message:
    When adding a mask to the display list need to validate it and all its children.  Previously the children were not validated and their display list was updated before properties were committed or measure was done.  RichText was not set up to handle this.
    QE notes:
    Doc notes:
    Bugs: SDK-24511
    Reviewer:  Evtim, Deepa
    Tests run: checkintests, fxg, primitives, Group
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24511
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/MaskUtil.as

    AFAIK, the only way to do this is to write a system modifcation.
    The BADI is executed only once at startup of the session, so that makes it merely static. (A strange point in time, I discussed it with SAP and they just shook their heads)
    I had the same problem with some other F4-Helps and it was a big hazzle. From my experience, no straight answer.

  • How to create a non-destructive luminosity/b&w mask for (de)saturation?

    Someone asked me this question: CG renders (created in Modo, Max, Blender, Maya, Vray, Octane, etc) can be made to look more realistic by desaturating the colours in the highlights. It was also requested that this move would be done in 32bpc as well (something that is often required in a CG compositing workflow).
    This is easy enough to do: create a selection based on luminosity (or a black and white version of the image), and use that as a layer mask in the Hue/Saturation adjustment layer, and turn down the saturation.
    However, this is a destructive action: suppose we want to import an external file as a smart object, and then we need the option to have the file automatically update with any change we make to the original artwork.
    In that case we would have to recreate that luminosity mask again and again as well.
    Ideally, an update of the external file will result in an automatic update of the entire layer stack.
    Now, in Photoline this is easy to do:
    Since layer masks behave like regular layers in PL, and layers can be virtually cloned (not unlike smart objects), it is a mere case of cloning the original external file layer twice, and adding adjustment layers. Finally, that one instanced layer is used as a layer mask for the adjustment layer that controls the saturation. Done.
    Replacing or editing the original source will then automatically update and cascade the changes through the entire layer stack.
    This is a very handy technique to have! Since I teach Photoshop classes, I thought this would also be handy to know how to do in Photoshop, and I tried several methods (clipping masks included), but I cannot seem to achieve the same non-destructive result. Clipping masks do not work with adjustment layers. Groups cannot be used as clipping masks. Layer masks cannot reference a smart object.
    I have a feeling there ought to be a reasonably straightforward method to achieve this, but how?
    Would anyone have a suggestion how to solve this in Photoshop in a non-destructive way?

    csuebele wrote:
    I'm still not seeing it. Your example does not have a pixel based layer clipped to the group which is causing my problem. I hope I can explain this. See below. the layers in the group create the "mask". In this case a b&w adjustment layer was added to control how the "mask" is converted to b&w. You can see what these layers look like in the mid section top section of the image. any color showing though is from the very bottom layer, as the group has a blend if on it allowing the shadows to come through. The top image has a curve layer with no adjustment, while the bottom image has a curve layer to clip more of the shadows. You can see this change in the upper right corner of both images. The curves are allowing more of the image to be clipped in the area is masked out on layer "Layer 0 copy 1", as more of the color of the base layer is showing though. However, that b&w areas are suppose to be just the mask and you should see the b&w, just color as seen in the bottom image. However, the curves are not changing the transparency in the areas that have the layer to return the color.
    I don’t get it – what good is the pixel Layer ("Layer 0 copy 2") clipped to the Group supposed to do? Don’t you want to use the Mask on an Adjustment?
    Edit: Maybe this can help clarify how I suppose the issue would be approached.

  • Error Message: Can not generate mask for the LMB peripherals

    I've added a bunch of  perhipherals to my microblaze project and used the Generate Addresses button.  I get the below error messges when I try to generate a net list. ERROR:EDK:3193 - issued from TCL procedure
       "::hw_lmb_bram_if_cntlr_v2_10_b::update_syslevel_mask" line 88
        C_MASK (IPNAME:lmb_bram_if_cntlr, INSTANCE:ilmb_cntlr) - Can not generate
       mask for the LMB peripherals! An address decode mask is assigned to all LMB
       peripherals connected to the MicroBlaze processor. The address decode mask is
       based on a set of decode bits that distinguish the LMB address space from the
       OPB/PLB address space. The error message indicates that a set of decode bits
       can not be found to generate a mask. Please modify the address map of the
       slaves connected to OPB/PLB to use a common address bit.
    ERROR:EDK:1585 - IPNAME:lmb_bram_if_cntlr INSTANCE:ilmb_cntlr -
       E:\Xilinx\11.1\EDK\hw\XilinxProcessorIPLib\pcores\lmb_bram_if_cntlr_v2_10_b\d
       ata\lmb_bram_if_cntlr_v2_1_0.mpd line 77 - error computing override value for
       C_MASK using tcl
    ERROR:EDK:3193 - issued from TCL procedure
       "::hw_lmb_bram_if_cntlr_v2_10_b::update_syslevel_mask" line 88
        C_MASK (IPNAME:lmb_bram_if_cntlr, INSTANCE:dlmb_cntlr) - Can not generate
       mask for the LMB peripherals! An address decode mask is assigned to all LMB
       peripherals connected to the MicroBlaze processor. The address decode mask is
       based on a set of decode bits that distinguish the LMB address space from the
       OPB/PLB address space. The error message indicates that a set of decode bits
       can not be found to generate a mask. Please modify the address map of the
       slaves connected to OPB/PLB to use a common address bit.
    ERROR:EDK:1585 - IPNAME:lmb_bram_if_cntlr INSTANCE:dlmb_cntlr -
       E:\Xilinx\11.1\EDK\hw\XilinxProcessorIPLib\pcores\lmb_bram_if_cntlr_v2_10_b\d
       ata\lmb_bram_if_cntlr_v2_1_0.mpd line 77 - error computing override value for
       C_MASK using tcl I understand its complaining about the mask values, but I'm not exactly sure why.  Here is the address map it shows:Address Map for Processor microblaze_0
      (0000000000-0x00003fff) dlmb_cntlr    dlmb
      (0000000000-0x00003fff) ilmb_cntlr    ilmb
      (0x81800000-0x8180ffff) xps_intc_0    mb_plb
      (0x81c00000-0x81c0ffff) xps_ll_temac_0    mb_plb
      (0x83400000-0x8340ffff) Generic_SPI    mb_plb
      (0x83c00000-0x83c0ffff) xps_timer_0    mb_plb
      (0x84000000-0x8400ffff) RS232    mb_plb
      (0x84400000-0x8440ffff) mdm_0    mb_plb
      (0x8c000000-0x8fffffff) mpmc_0    mb_plb
      (0xfffff000-0xffffffff) xps_gpio_0    mb_plb Any thoughts?  I was unable to find another instance of this error message.

    Version 11.3 I actually figured it out, its rather odd that the generate addresses button doesn't do this automatically. It appears that the mask was set to trigger use of the cache on a single bit.  0x00800000.  I had enough devices added where automatic address generation was using the most significant bit meaning that bit was falling within other address spaces. I changed it to 0xFFFFC000.  (Basically telling it to match addresses if all address signals above 16KB are zero).  I don't know if that is the proper way to do it, but it accepted it.  Now I'm fighting with some stuff regarding an FSL bus I added that apparently isn't quite properly setup, so I haven't found out yet if the processor likes that address mask.   But the tools appear to like it.

  • [svn] 3694: Fix masking for Group

    Revision: 3694
    Author: [email protected]
    Date: 2008-10-16 14:23:02 -0700 (Thu, 16 Oct 2008)
    Log Message:
    Fix masking for Group
    SDK-17365 Masking broken for Group
    Moved the call to super.commitProperties to occur after we initialize our items. When we do the init, we remove all of the display objects and then reattach them. Because this was called after we added the mask, the mask was getting removed.
    Bug: SDK-17365
    QA: yes
    Doc: No
    Review: Evtim
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17365
    http://bugs.adobe.com/jira/browse/SDK-17365
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as

  • [svn] 3697: Fix masking for Group.

    Revision: 3697
    Author: [email protected]
    Date: 2008-10-16 14:39:42 -0700 (Thu, 16 Oct 2008)
    Log Message:
    Fix masking for Group. Forgot to checkin the base class.
    SDK-17365 Masking broken for Group
    Moved the call to super.commitProperties to occur after we initialize our items. When we do the init, we remove all of the display objects and then reattach them. Because this was called after we added the mask, the mask was getting removed.
    Bug: SDK-17365
    QA: yes
    Doc: No
    Review: Evtim
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17365
    http://bugs.adobe.com/jira/browse/SDK-17365
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as

  • Error while adding a connector for SSL..help!!!

    i'm getting this error when i added a connector for SSL and restarted tomcat
    my connector tag is
    <Connector keystorePass="kalima" scheme="https" port="8443" sslProtocol="TLS" redirectPort="-1" enableLookups="true" keystoreFile="Mykeystore" protocol="TLS" keystore="C:\Documents and Settings\santhoshyma\Mykeystore" clientauth="false" algorithm="SunX509" keypass="changeit" secure="true" keytype="JKS">
          <Factory className="org.apache.coyote.tomcat5.CoyoteServerSocketFactory" keystorePass="kalima" keystoreFile="C:\SSLTest\Mykeystore"/>
        </Connector>
    LifecycleException:  Protocol handler instantiation failed: java.lang.NullPointe
    rException
            at org.apache.coyote.tomcat5.CoyoteConnector.initialize(CoyoteConnector.
    java:1368)
            at org.apache.catalina.core.StandardService.initialize(StandardService.j
    ava:609)
            at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
    a:2384)
            at org.apache.catalina.startup.Catalina.load(Catalina.java:507)
            at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:250)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:424)

    The question is answered in CRM 7.0 forum:
    Getting error while adding a custom field (with input help) through AET

  • [svn:fx-trunk] 5353: * Added compiler error for Halo Navigators containing non-Containers

    Revision: 5353
    Author: [email protected]
    Date: 2009-03-17 12:59:06 -0700 (Tue, 17 Mar 2009)
    Log Message:
    * Added compiler error for Halo Navigators containing non-Containers
    as their first level child.
    tests Passed: checkintests
    Needs QA: YES
    Needs DOC: NO
    Bug fixes: SDK-19317
    API Change: NO
    Reviewer: Pete F.
    Code-level description of changes:
    compiler/mxml/lang/StandardDefs.java
    Added getContainerPackage(), isHaloNavigator(), CLASS_VIEWSTACK,
    CLASS_ACCORDION, and PACKAGE_MX_CONTAINERS.
    compiler/mxml/builder/ComponentBuilder.java
    Modified
    ComponentBuilder.ComponentAttributeHandler.nestedDeclaration() to
    report an error if a non-container is declared as a child of a
    Halo navigator.
    compiler_en.properties
    Added HaloNavigatorsRequireHaloContainerChildren message.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-19317
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.jav a
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties

  • Problem in adding Custom Provider for Work Management Service

    Hello,
    I'm facing an issue in adding custom provider for work management service. As you are aware, Work management service is a Provider model and we
    can integrate with other systems by adding custom providers. So with that confidence, i have started writing a connector as mentioned below.
    Step - 1: Added new provider xml in the below path
    "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\CONFIG\WorkManagementService\Providers"
    Provider Name: provider.bizagitasklist
    Provider XML Content: 
    <Provider ProviderKey="DAA52AF3-A147-4086-8C0C-82D2F83A089D" OverrideProviderKey="" Assembly="adidas.TaskProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5d6f3e6be60a351b" > </Provider>
    Step -2: Added a class which inherits "IWmaTaskProvider" and implemented the override methods.
    public class BizAgiTaskListProvider : IWmaTaskProvider
    public string LocalizedProviderName
    get { return "BizAgiTaskListProvider"; }
    public string ProviderName
    get { return "BizAgiTaskListProvider"; }
    public Microsoft.Office.Server.WorkManagement.CalloutInfo GetCalloutInfo(IWmaTaskContext context, string taskExternalKey, string locationExternalKey)
    return null;
    public DashboardExtensionInfo GetDashboardExtensionInfo(IWmaBasicProviderContext context)
    return new DashboardExtensionInfo { ClassName = "SP.UI.SharePointExtension" };
    public BulkEditResult HandleBulkEdits(IWmaTaskContext context, BulkEdit updates)
    return null;
    public TaskEditResult HandleTaskEdit(IWmaTaskContext context, BaseAggregatorToProviderTaskUpdate taskUpdate)
    return null;
    public void RefreshSingleTask(IWmaTaskRefreshContext context, string externalKey)
    public void RefreshTasks(IWmaTaskRefreshContext context)
    //context.WriteProviderCustomData(
    Step – 3: Written a class to fetch the tasks from BizAgi System which has method to provide the task data.
    But I’m not able to feed those tasks in the class written in Step – 2 as I’m able to find any method which will take Tasks as Input and I’m not
    sure about the format of tasks.
    I’m able to debug the provider, and the breakpoint hitting in only one method and two properties.
    (LocalizedProviderName, ProviderName, GetDashboardExtensionInfo).
    Can you please help me to proceed further in implementing the above solution?
    Best Regards
    Mahesh

    Hi Mahesh,
    Although the implementation of work management service application is based on the provider model, I reckon the current SP 2013 RTM does not support custom providers. Only SharePoint task lists, Project server and MS Exchange are supported for now.
    Regards,
    Yatin

  • [svn:osmf:] 10124: Add a few variations of HelloWorld, showing the different ways of adding the DisplayObject to the Sprite.

    Revision: 10124
    Author:   [email protected]
    Date:     2009-09-10 10:40:10 -0700 (Thu, 10 Sep 2009)
    Log Message:
    Add a few variations of HelloWorld, showing the different ways of adding the DisplayObject to the Sprite.
    Modified Paths:
        osmf/trunk/apps/samples/framework/HelloWorld/.actionScriptProperties
    Added Paths:
        osmf/trunk/apps/samples/framework/HelloWorld/HelloWorld4.as
        osmf/trunk/apps/samples/framework/HelloWorld/HelloWorld5.as
        osmf/trunk/apps/samples/framework/HelloWorld/HelloWorld6.as

    The connections which you have done are right, Here are some settings which you can set on your computer and check if this solves your problem or not.
    Win XP: Click on the Start button >>> go to RUN>> type in "ncpa.cpl"- hit OK >>Here(Network Connections) right click on the ""Local Area Connection"" icon and select properties-Here click on the "Configure"   jaspal button- Click on the "Advanced" tab- In the "Property" box highlight Link speed and duplex/Connection type/Network or Media type- And in the "Value" box select 10 Mbps half duplex/ 10 base T/10 base half mode and click on OK.
    If still you face the same problem, then i feel it might be the problem with the Switch itself. 

  • Could I please have feedback on adding Aperture, mainly for organization and storage.

    I have Iphoto and Adobe Photoshop already.  In my iPhoto I have 30K photos.  Could I please have feedback on adding Aperture, mainly for organization and storage.

    You wouldn't be adding it, you'd be replacing iPhoto with it.
    It does all the jobs that iPhoto does, and then some. You'll also find yourself using Photoshop less.
    Regards
    TD

  • 50027: Invalid format mask for given datatype.

    hi ,
    i have a non database Number Item maximum length is 8
    when i try to put
    NNNNNNNN0.99 as a format mask
    i got the following error
    50027: Invalid format mask for given datatype.
    i want this field to view it's value Such as
    0.55when there is no integer no before the decimal point
    Can anyone help please?
    Form Ver Is Form6i
    Edited by: ayadsufyan on Apr 25, 2013 3:58 AM

    ayadsufyan wrote:
    hi ,
    i have a non database Number Item maximum length is 8
    when i try to put
    NNNNNNNN0.99 as a format mask
    i got the following error
    50027: Invalid format mask for given datatype.
    i want this field to view it's value Such as
    0.55when there is no integer no before the decimal point
    Can anyone help please?
    Form Ver Is Form6i
    Edited by: ayadsufyan on Apr 25, 2013 3:58 AMtry
    099999.99Hope this helps

  • [svn:osmf:] 15972: ChromeLibrary: adding rudimentary support for loading plug-ins defined in XML.

    Revision: 15972
    Revision: 15972
    Author:   [email protected]
    Date:     2010-05-08 07:31:24 -0700 (Sat, 08 May 2010)
    Log Message:
    ChromeLibrary: adding rudimentary support for loading plug-ins defined in XML.
    Modified Paths:
        osmf/trunk/libs/ChromeLibrary/.flexLibProperties
        osmf/trunk/libs/ChromeLibrary/org/osmf/chrome/application/ChromeApplication.as
    Added Paths:
        osmf/trunk/libs/ChromeLibrary/org/osmf/chrome/configuration/PluginsParser.as

    rnair wrote:
    I am trying to install Oracle 11g R2 on my windows 7, 64bit computer. After 42% of installation, it started showing some files are missing. Few of them are:
    C:\app\User\product\11.2.0\dbhome_1\owb\external\oc4j_applications\applications\WFMLRSVCApp.ear
    C:\app\User\product\11.2.0\dbhome_1\oc4j\j2ee\oc4j_applications\applications\WFMLRSVCApp.ear
    C:\app\User\product\11.2.0\dbhome_1\owb\external\oc4j_applications\applications\WFMGRApp.ear
    C:\app\User\product\11.2.0\dbhome_1\oc4j\j2ee\oc4j_applications\applications\WFMGRApp.ear
    C:\app\User\product\11.2.0\dbhome_1\owb\bin\win32\owb.tmp
    C:\app\User\product\11.2.0\dbhome_1\owb\bin\win32\setowbenv.tmp
    C:\app\User\product\11.2.0\dbhome_1\oc4j\j2ee\OC4J_DBConsole\config\system-application.xml
    And the final pop up winow says:
    Database configuration Assistant:Info
    *"Template General_Purpose.dbc does not exists. Please specify an exixting template for database creation"*
    *"[INS-20802] Oracle Database Configuration Assistant failed"*
    Details:
    Cause:- The plug-in failed in its perform method
    Action:- Refer to the logs or contact Oracle Support Services.
    Following are the last few lines of the log file. Can anyone please help me to fix this problem?<snip>
    the error has nothing to do with DBCA. DBCA was simply the last in a long string of victims.
    Go back and read the instructions where you downloaded the install media. They state that the TWO zip files you download must be unzipped into the same directory.

  • How Can I Change Format Mask For All Fields that type's Number Depend on Parameter in Report Builder 10g ?

    I want Change format mask for all fields that type's number
    Such as
    if  :parameter_value = 1 then
       all fields format mask = ' 999,999,990.000' ;
    else
       all fields format mask = ' 999,999,990.00' ;
    end if;
    Regards

    So, i have bad news for you : you'll have to rebuild again.
    Meanwhile i have excellent news for you : there's an online tool made by Johannes Henseler called Sidecar xml which builds the necessary xml file for you, sort of what you find in the Digital Publishing Folio Editor website, but saves it in your Folio folder.
    Next time you import all your folder (with that file), it will place all the necessary information, and even reorder the articles.
    Build once, play many times.

Maybe you are looking for