the best way to deal with the changed values maskMode?

Hi people

I just found out that the values listed for maskModes have changed between CC14 and CC15 who broke most of my scripts of masking.

IE MaskMode.ADD in CC14 has the value 6413 but CC15 is 6813.

What is the best way to deal with this? is there a simple solution or what I need to check the version of AE which is used and adjust from there?

is there a direct way to access the name ie "MaskMode.ADD" instead of the value?

Thanks... /JL

To get the string maskMode by the current mask, you can loop through all the values possible maskmodes and stop when you click on:

for (var k in MaskMode){
    if (myMask.maskMode === MaskMode[k]) break;
    };
// at this stage k is the maskMode string (eg: "ADD")

Xavier

Tags: After Effects

Similar Questions

  • What is the best way to deal with a 'Implicit coercion' in a table to a sprite?

    Hi all!

    With the continued support of this forum, I'm getting closer to have a programme of work. I can't wait to be able to help others like me once I've finished learning the ropes of AS3.

    I'll briefly explain what I want to achieve and then followed with my question.

    Background

    I created a random number of 12 x 9 grid that fills each cell with an image, based on the numeric value of each cell. I also have a random play button that makes random numbers in the grid. The problem I am running became my click event of button to erase the current images off the grid in order to allocate the new (for example by removing the objects display battery in order to place the new ones in the same places).

    Question

    My question is this: what is the best way to manage an implicit constraint from a table to a sprite? I pasted my complete code below so that you can see how the functions are supposed to work together. My sentence is apparently not being able to use a value from array with a sprite (sprite represents the real layout of the grid on the pile of display while the table starts as a number that is assigned an image that must be transmitted to the sprite).

    ============================================================================

    package
    {
    import flash.display.MovieClip;
    import flash.display.DisplayObject;
    import flash.events.MouseEvent;
    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.text.TextFormat;
    import flash.utils.getDefinitionByName;

    SerializableAttribute public class extends MovieClip Blanko
    {
    Contains 12 * 9 grid of cells.
    var grid: Sprite;
    Maintains the shuffle button.
    var shuffleButton:Sprite;
    Is equal to 12 columns, 9 lines.
    var cols: int = 12;
    lines of the var: int = 9;
    Equal number of grid cells (108).
    cells var: int = COL * rows;
    Sets of cell width and height to 40 pixels.
    var cellW:int = 40;
    var cellH:int = 40;
    Contains 108 images of cell.
    var imageArray:Array = [];
    Contains 108 numerical values for the cells in the grid.
    var cellNumbers:Array = [];

    Constructor calls the functions "generateGrid" and "makeShuffleButton".
    public void Blanko()
    {
    generateGrid();
    makeShuffleButton();
    }

    Creates and displays the grid 12 * 9.
    private function generateGrid (): void
    {
    grid = new Sprite;
    var i: int = 0;


    for (i = 0; i < cells; i ++)
    {
    cellNumbers.push (i % 9 + 1);
    }
    trace ("before shuffle:", cellNumbers);
    shuffleCells (cellNumbers);
    trace ("after shuffle:", cellNumbers);
    var _cell:Sprite;

    for (i = 0; i < cells; i ++)
    {

    / / This line is where the implicit constraint occurs. '_cell' is a leprechaun trying

    on a temporary basis equal to a value from array.
    _cell = drawCells (cellNumbers [i]);
    _cell.x = (I % cols) * cellW;
    _cell.y = (I / COL) * cellH;

    grid.addChild (_cell);
    }
    }

    Creates a "shuffle" button and adds a mouse click event.
    private function makeShuffleButton (): void
    {
    var _label:TextField = new TextField();
    _label. AutoSize = 'center ';
    TextField (_label) .multiline = TextField (_label) .wordWrap = false;
    TextField (_label) .defaultTextFormat is new TextFormat ("Arial", 11, 0xFFFFFF, "bold");.
    _label. Text = "SHUFFLE";
    _label.x = 4;
    _label.y = 2;
    shuffleButton = new Sprite();
    shuffleButton.graphics.beginFill (0 x 484848);
    shuffleButton.graphics.drawRoundRect (0, 0, _label.width + _label.x * 2, _label.height +)
    _label.y * 2, 10);
    shuffleButton.addChild (_label);
    shuffleButton.buttonMode = shuffleButton.useHandCursor = true;
    shuffleButton.mouseChildren = false;
    shuffleButton.x = grid.x + 30 + grid.width - shuffleButton.width;
    shuffleButton.y = grid.y + grid.height + 10;
    this.addChild (shuffleButton);
    shuffleButton.addEventListener (MouseEvent.CLICK, onShuffleButtonClick);
    }

    Erase the images of the cell, mix of their numbers and then assigned these new images.
    private function onShuffleButtonClick (): void
    {
    eraseCells();
    shuffleCells (cellNumbers);
    trace ("after shuffle:", cellNumbers);


    for (var i: int = 0; i < cells; i ++)
    {
    drawCells (cellNumbers [i]);
    }
    }

    Deletes any existing cells in the battery of the display image.
    private void eraseCells(): void
    {
    While (imageArray.numChildren > 0)
    {
    imageArray.removeChildAt (0);
    }
    }

    Changes cell phones numbers (makes random table).
    private void shuffleCells(_array:Array):void
    {
    var _number:int = 0;
    var _a:int = 0;
    var _b:int = 0;
    var _rand:int = 0;

    for (var i: int = _array.length - 1; i > 0; i-)
    {
    _rand = Math.Random () * (i - 1);
    _A = _array [i];
    _B = _array [_rand];
    _ARRAY [i] = _b;
    [_Rand] _ARRAY = _a;
    }
    }

    Retrieves and sets a custom image to a cell based on its numerical value.
    private void drawCells(_numeral:int):Array
    {
    var _classRef: Class = Class (getDefinitionByName ("skin" + _numeral));
    _classRef.x = 30;
    imageArray.push (_classRef);
    imageArray.addChild (_classRef);
    return of demonstration;
    }
    }
    }

    ===========================================================================

    Any help with this is greatly appreciated. Thank you!

    If you want to have an array of Sprites that you later clear that is fine. But this does not mean that your function should return to it.

    You need your function to return the sprite so that you can add it to the display list and everything what you need.

    So just have the function get Sprite, push it in the "toBeClearedInTheFutureArray" and then return a reference to the currently acquired sprite.

  • Best way to deal with pictures from the start? (Bridge CS5 and iPhoto)

    Hi all

    I am just learning the strings of all the suite CS5 and began to add keywords etc in bridge, when I realized that I couldn't access the files in my iPhoto library ('09). I read a few threads on this topic, but have not really found a consensus on how to deal with it.

    I think I'm in a good position to get things right from the start, because I have no tags or sides etc. in my configuration of iPhoto (and only add keywords for the few photos that weren't in my iPhoto library), and wonder what you think is the best way to sort photos given I intend to use them in web design etc. and all the parts of my suite CS5.

    If the photos in iPhoto is the best what is the best way to do it? I have read suggestions do a right-click on the library and click "Show content" - or something like cela, but that does not come up as an option when I right click my iPhoto in Bridge library. Thanks a lot for your help!

    Please let me know if there is any info I could give you that could be useful in order to understand this one.

    Best,

    Mara

    PS: for the temporary folder, I use a name like to-do Images

    Remember once the keywords are used is not just the manipulation/image adjustments which are important metadata but also robust observation with integrity

  • What is the best way to deal with the events of Qml-components of java script or C++?

    Hello

    Please suggest which is the best way to treat the Qml-components signal in the manuscript of java or C++.

    can read contacts in javaScript?

    When you want to make things more complex: Yes.
    QT made it much easier for me as a java developer, bb, but you will need to learn some basics.

  • What is the best way to deal with the pages being removed from the site in British Colombia?

    A customer wants a page removed from their Web site; What is the best way to go about removing/deleting a page in British Colombia and keep all attributed to the laid-off page SEO ranking?

    Should I delete the page and then add URL redirect via the module to redirect BC a relevant page.

    or

    I have to keep the page alive but 301 redirect using the property of the redirection page 301 in addition to Options?

    One is better than the other?

    Redirect via the page is there if you want to keep the page for any reason content wise, etc. in the admin. Web site wise is no different. A 301 redirect is a redirect 301 Grant, there is no difference.

  • Best way to deal with screen capture?

    Hello world

    I have a lot of images captured with Snagit (computer screens). They will be printed in black and white.

    I usually do the following: open the png file in Photoshop, select Convert to grayscale Mode and save it as PSD.

    Generally, I get the results reasonably good in printed books (CMYK and n & W). [If I put the image I do usually only in Photoshop, but if the budget is tight, I do the scaling in Indesign]. I confess that I am not a very good "Photoshop" and I noticed that under Image-> adjustments there is a command to convert to B & W images.

    I played a bit with this two options and I have concluded that the files obtained with this IVª of different shades of gray are a little different.

    Can anyone advise me on the best method to use and the best way to do this kind of conversion in Photoshop. I'm on Windows using CS 5.5

    Thank you in advance.

    Maria

    In fact, in Photoshop, black and white is really a neutralized RGB image - three channels balanced to have the appearance of a B & W photo. If you want the pixels that are either black or white, nothing else, a channel, you must convert it to Bitmap mode.

    In the same way, "printing in black-and-white ad" is not accurate - you print in black and leave everything else without ink. To get gray you would use a halftone screen of a certain value.  I imagine that if you print monochrome (any single color, including black) you want to convert in grayscale, bitmap not mode. You might, however, want to use black and white conversion first, which lets you play with the sliders and set the contrast of the different colors in the screenshot to make the image as readable as possible, then convert it to grayscale. I prefer to use an adjustment layer for these adjustments, such as B & W, that can be done this way because it is more flexible and does not change the underlying image.

    A consensus among users here who work a lot with screen capture is that you can scale to the ID and the results will be as good as scaling in Photoshop.

  • Best way to deal with interlaced video

    I'm shooting a "talking head" video for part of a Flash movie, and unfortunately I have only a good quality consumer dv camera, which seems to record everything as interlaced. I also only have final cut express, which also seems to export all as interlaced. I hear that's not optimal for the video that will be streamed on the Web, in other words, if you want sharp.

    I wonder if anyone knows the best way to make my sharper image. If I import, manipulate and export it in final cut express greater than necessary, and then scale it down significantly in the Flash 8 video encoder, will be the downward revision to the fact the interlacing less noticeable, similar to the downward revision to one image low fixed resolution may make it sharper?

    I heard elsewhere in this forum that the use of any just deinterlace filter makes it worse.

    Thank you.

    PS - I certainly would not say that the use of any deinterlacing filter makes
    worse... it depends on the video for one. For a talking head, I think that it
    could work perfectly. For a very quick movement, it may not work too
    good though. You have to try it and see - these filters exist for a reason.

    --
    Dave-
    Developer leader
    www.blurredistinction.com
    Adobe Community Expert
    http://www.Adobe.com/communities/experts/

  • My Acrobat has stopped working.  I have the CS6 Master Collection.  I had this happen before and I had to reinstall with the entire suite.  Is this stil the best way to deal with this?

    Sorry, meant CS6.

    Hey Gary Kirby,

    Please make sure that you are connected to your system as administrator.

    Let me know the exact error that invites on your screen when launching Acrobat.

    You might also check out this link to doc KB and try solutions as indicated:

    Does not start after 30 days. Installed as part of a suite CS6

    Please check and let me know.

    Kind regards

    Ana Maria

  • I currently have creative cloud of a photographer.  I must add my subscription first.  What is the best way to go with the best available prices?

    I currently have creative cloud of a photographer.  I must add my subscription first.  What is the best way to go with the best available prices?

    Hello

    Please see the pricing and membership creative cloud plans | Adobe Creative Cloud for plans.

    Otherwise, you can talk with the sales of Adobe as well.

    I recommend going for the plan of single-app.

    Kind regards

    Sheena

  • What is the best way to work with Word documents in The InDesign CS4?

    I work in Microsoft Word 2007 and all my documents have.doc format.

    What is the best way to work with Word documents in InDesign CS4?

    David Blatner says to avoid copying and pasting text from Word instead of placing (Ctrl + D).

    How to paste RTF or text Document?

    I want to do a book layout in ID CS4 and its main feature is that there is the left page with the text and the right - with graphics.

    So, if I understand correctly place the text on each page I create for example 70 Word documents and place each element on 70 pages left?

    He loks like wasting time. I have supplements another way to make such provision?  What kind?

    It is best to place any text.

    You can have all your text in a single file and debit allows you to add text, images and pages as necessary block (hold down the SHIFT key when you click the loaded text cursor), but it is somewhat atypical for the thread on one side of the spread in the perspective of automatic flow, so you don't have to set up properly.

    It is a case where a block of text that you type will work to your advantage. On your master page, add a text block to the left page, but not to the right (or at least not donned one to the right - for another project you can actually two threads of independent text). Hold the cursor of the load on a frame on the left side of a page document and auto-flux. ID will add new spreads as needed, but only to put the text on the left side.

    Peter

  • I have a Sony Alpha 5100 camera.  Camera Raw has said it is not supported, but I downloaded the latest version and still no luck.  I have Photoshop CS5.  Any way to deal with this?

    My question is what can I do to get a version of Camera Raw that will work with CS5 and allow me to process the raw files from my Sony Alpha 5100.  I get a coherent response that it cannot deal with the camera.

    Malcolm Misuraca

    Your device requires at least Camera Raw 8.7. Photoshop CS5 cannot deal with this version. You will need to download and use the free DNG Converter to create DNG copies that you can work with Photoshop CS5.

  • What is the best way to move with esx3.5 vmtools key/value pairs?

    Hello

    I found both candidates to store the key/value pairs for a vmware client. My ultimate goal is to run a process on the VC box that updates these data, and then read through the software tools of vm on the host (somehow) were invited.

    The first method is through 'guestinfo' settings which can be adjusted in four ways:

    Add the variable of the vmx fileprompt.
    Set the variable manually on the client (using vmwareservice.exe - cmd "infoset");
    using vmware-cmd (vmware-cmd & lt; vm-cfg-path & gt; setguestinfo & lt; variable & gt; & lt; value & gt;)
    the use of vmcom.dll COM objects (seems to be deprecated in ESX 3.5)
    These variables are easily accessible on the client by running vmwareservice.exe - cmd 'info-get guestinfo.variablename '. However, I cannot find a convenient way (better based on powershell) of their definition of a scheduled task or service to VC area.

    The second method is the customfields of guests in VItoolkit property, which can be defined as follows:

    get - vm MyVMName | Game-CustomField-nameOfValue name-value DataToBeStored
    Unfortunately, I am unable to access these data in the comments, and indeed I do not know if this is possible. If this isn't the case, I guess my only recourse would be to write a tool to connect to Web services on the VC box with a low privilege account. I prefer not to do this because it means the network infrastructure implementation to point the guest to the right VC, development of custom etc permissions...

    So, my questions are:

    • Is it possible to define variables of guestinfo through VI Toolbox, running on the virtual circuit?

    • Is it possible to read customfields on the client, through the vmtools?

    • Or is there another method to make this key/value data exchange?

    You can add/edit entries in the VMX file like this

    $vm = get-vm  | Get-View
    
    $vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
    $vmConfigSpec.extraconfig += New-Object VMware.Vim.optionvalue
    $vmConfigSpec.extraconfig[0].Key= "guestinfo"
    $vmConfigSpec.extraconfig[0].Value = "whatever"
    
    $vm.ReconfigVM($vmConfigSpec)
    
  • Listen to the changing value of the element that is passed under dynamic PL/SQL action

    Hello

    Version 4.2.6 apex

    I have a dynamic action that fires the PL/SQL. It is about 'change' DA for item P1_INPUT.

    It triggers the PL/SQL code

    :P0_ITEM_CONTROL := '{"Item":"#P2_SIF_MT_INFO","State":"success"}';
    

    Now, I want to hear this change (in question (P0_ITEM_CONTROL) in my external JS.

    $('#P0_ITEM_CONTROL').on('change', function() ....
    

    Of course, in that you can only listen for the changes that have been made by typing the entry itself, so I have to add another REAL action that fires the code JAVASCRIPT and trigger the change manually.

    $('#P0_ITEM_CONTROL').trigger('change');
    

    Which is cause of unnecessary bloat. Is there another way to trigger the change?


    First one that comes to mind is to create a DA who listen to change everything I want my JS to trigger. Then trigger manually there from there.

    Then come from your other thread, I take back what I said - I have messed up. I felt pretty sure the plsql execute did not have the change event, but I was wrong - I checked once again after the other thread. Since you're using two versions of jquery your question is exactly the same in this thread as what you experience with the popup lov! Use apex.jQuery to listen for the event changes and you will be fine, since the action of plsql execute trigger changes on 'elements to return'!

  • Best way to do with indesign clipping mask drawn vector shapes?

    What is the best way to create a clipping with vector art mask which is drawn inside indesign?

    I have a group of vector shapes to stick in a rounded corner box. This art is grouped.

    What I tried:

    -create the rounded corner box I want the art inside

    -cut art

    -Edition > paste inside

    It worked, but I didn't know how to move the work once it was pasted in the form. With the direct Selection tool, I could move individual objects, but not the Group of objects. Any ideas?

    What is the best way to do what I'm doing?

    Thank you!

    Yopu do not mention the version ID, which makes a difference here.

    Stick in there is correct. In CS5, you can then use the grabber donut content to move the group within the frame. In all versions, you should be able to choose the frame, then use object > select > content for the group, or use the button for the control panel. Before CS5, you need to use the arrow keys or grasp the central point with the mouse to move the group.

  • What is the best way to comply with footage of 60 fps 24 fps without slowing down?

    So I understand how time remapping and reinterpret the cadence of the 60 fps footage to slow it down, but I'm at a loss as to how I can do 24 fps without just which establishes it as such, giving a jerky export.

    I'm shooting on a Rebel t3i that only allows me to shoot in 720 p at 60 frames per second. Is it possible to drop the frame rate without changing the duration while preserving quality?

    Thanks for any help in advance!

    Shiraz

    Drop your 60 p clip into a sequence of 24 p. Cliquer click with the right button, and then select frame Blend. It's about as good as you will get in Premiere Pro.

    If you need 24 p, why not shoot 1080 p? The T3i plans to 23.976 (24 p) mode 1920 x 1080 p. You can always scale the clip 1080 p to 720 p.

Maybe you are looking for

  • Camera HDR-AS50 disconnects right after that QR Code is scanned

    Hello I have problems connecting my new ActionCam AS50 on my Android (Samsung Alpha) phone. Steps to follow: (1) first of all make sure that WIFI is on in the camera. (2) then I scan the QR code. (3) it asks me to connect. I say ok (4) it is said con

  • HP Pavilion g6-2302ax: query on the recovery of the reduced image

    Previously, I had graphic driver problem but 1 good guy help me here after a few weeks, it back.i decided to make mir I have 2 questions.1 is that he's going to format my others were leaving or just c.2 am I'm going to need support/recovery for mir p

  • Vista - Error Code: 0 X 80072726 (Windows Update Service does not start)

    When I run Windows Update it says that it is impossible to connect to the service because the service is not running. When I go into the Services to start the Windows Update service, it says: Windows could not start the Windows Update service on Loca

  • 80070490 error code when you try to install windows vista sp2

    OK JUST LISTEN UP GUYS I REALLY REALLY NEED HELP! OK to start with I have a 32-bit with sp1 operating system.I need help, try to install windows vista sp2. I tried for ages now to make it work, but I quit so I hope you can help me. It comes up with e

  • Anti-pop BB10 resets form data

    I use bbui.js and ripple 0.9.10 tests I am new to bbui.js so I learn that I will. Here's my problem.  I have an application that uses multiple screens.  From the main screen, I push a screen on top that allows the user put in some data.  If the user