FillColor changes in a layer of text with the text Source keyframe?

Hi all. In ExtendScript, I would like to change the color of text more than once in a model, without transitions. I know it's possible with a moderator, but I want to do in the Source keyframe text so that the model maintains as minimal as possible.

I know how to change the fillcolor of a textlayer use:

var TextColorLayer is comp.layer("MyTextLayer").property ("Text") .property ("Source Text");.

var TextDocument = TextColorLayer.value;

TextDocument.fillColor = [1,1,1];

TextColorLayer.setValue (TextDocument);

Obviously, this next one does not work, but I don't know where to put the fillColor here...

var TextColorLayer is comp.layer("MyTextLayer").property ("Text") .property ("Source Text");.

var TextColorAddKeys = [currentTime];

var TextColorAddValues = [[1,1,1]];

TextColorLayer.setValuesAtTimes (TextColorAddKeys, TextColorAddValues);

Hope someone can help out me, otherwise I use the solution of host who also has its advantages.

I'm not familiar with the host, but this is how you set a keyframe for a property:

main();
function main() {

  var myComp = app.project.activeItem;
  if (!myComp || !(myComp instanceof CompItem)) {
  alert("Select a Composition first")
  return;
  }

  var mylayer = myComp.selectedLayers[0];
  if (!mylayer || !(mylayer instanceof TextLayer)) {
  return
  }

  var keyTime = myComp.time;
  var colorValue = [1, 1, 1];

  var textProp = mylayer.property("Text").property("Source Text");
  var textDocument = sourceText.value;
  textDocument.fillColor = colorValue;
  textProp.setValueAtTime(keyTime, textDocument)
}

The following script will add 5 keyframes with different colors.

main();
function main() {

  var myComp = app.project.activeItem;
  if (!myComp || !(myComp instanceof CompItem)) {
  alert("Select a Composition first")
  return;
  }

  var mylayer = myComp.selectedLayers[0];
  if (!mylayer || !(mylayer instanceof TextLayer)) {
  return
  }

  var keyTimes = [1, 2, 3, 4, 5];
  var colorValues = [[1, 1, 1], [0.5, 0.5, 0.5], [0.56, 0.12, 0.99], [0.12, 0.1, 0.45], [0.69, 0.21, 0.3]];

  var textProp = mylayer.property("Text").property("Source Text");

  for (var i = 0, il = keyTimes.length; i < il; i ++) {
  var curTime = keyTimes[i];
  var curValue = colorValues[i];

  var textDocument = sourceText.value;
  textDocument.fillColor = curValue;
  textProp.setValueAtTime(curTime, textDocument);
  }
}

Tags: After Effects

Similar Questions

  • I need to set my Adobe Acrobat by default when I open PDF files. I've updated my adobe reader software and it changed my settings to always open with the reader. I still want to open it with Adobe Acrobat DC

    I need my Adobe Acrobat DC value by default when I open PDF files. I've updated my adobe reader software and it changed my settings to always open with the reader. I still want to open it with Adobe Acrobat DC

    Hello

    For windows, right click on the PDF? Open with > choose default program > set Acrobat DC as the default PDF Viewer and click OK.

    You could do the same thing in the control panel.

    Concerning

    Sukrit diallo

  • I use an analog input on a PCI-6224 and are having problems with the clock source

    I use an analog input on a PCI-6224 and are having problems with the clock source. I'm trying samples of 16 different analog inputs very quickly. I have the sample mode: Timed Single Point material. The rate, that I am running is the maximum (250 kHz (15625Hz per channel)). I left the default clock source and trying to taste several times. The analogue input works for a short time (2-3 seconds) and then everything stops. I'm doing something wrong or is there something I'm missing? Any advice would be great.

    That's how you samples using the sample clock clock. If you see a delay then something is wrong with how you track/data visualization.

    Single point NI the hardware is for PID control with a real-time operating system.

  • z index / layer of problems with the new YouTube widget!

    Hello!

    I am facing a problem with the new 'youtube' of social media widget. I currently have two layers in my projects. This is a project for which the menu scrolls initially and then sticks to the top of scrolling parallax. By continuing to scroll, the embedded YouTube video widget does not scroll under the menu as it should but scrolls through the menu. It's strange, as the YouTube widget was placed on level 1 and the menu is at level 2. Shouldn't the menu then always be on top? Only the new widget is not properly defined index-z?

    You can check my web project (and look at the code) here: http://www.firstlight.at

    Any help is greatly appreciated!

    I managed to solve the problem, and I believe this to certainly be a bug in Muse...

    In order to avoid widgets Youtube iframed swim on top of all the other div tags, I had to change the code, add wmode = "transparent" and wmode = "Opaque" to the class of the iframe. This works if you replace all the other parameters behind the CBC "&" by "& amp"tag.

    Here's the original code generated by Muse. This could not prevent my "2nd layer" slip below "Layer 1".

    Makes the following changes to the code, forced the Youtube widget below all other div again (I pinned all changes to "BOLD", so you can see the changes easily):

    Ensure that you do not miss the following change: you need to change all of the vipers '&' to '& amp' this procedure will not work!

    After the new version, I'm sure the Adobe team is working hard to bust of bug last version. But I hope that we will be dismantled soon, otherwise users using the youtube widget will have to recode output Muse whenever we make a change and it is exactly what is the Muse striving to prevent (; After all, in Dreamweaver, you can hardcode the change and he would stick!

    I hope that it will be useful to someone!

  • Number of layer effects + table with the names of the effects

    Hello

    1. I want to ask you, if you don't know the function to count the number of layer effects.

    2. I need function which returns the array with the names or identifiers of the fot effects each layer.

    I what T/F back function if layer has effect. But I don't know how

    write this.

    Thanks Domaneni

    This function will return an array of names of effects for the active layer. You can get the number of effects of the length property of the table. Effects names are names of equity manager so if you want that they correspond to the GUI, you will have to translate. that is the line in the action Manager is frameFX

    function getEffects() {
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
        var desc =   executeActionGet(ref);
        if ( desc.hasKey( stringIDToTypeID( 'layerEffects' ) ) ) {
            var effects = [];
            var effectDesc = desc.getObjectValue(  stringIDToTypeID( 'layerEffects' ) );
            // first key is scale so skip and start with 1
            for ( var effect = 1; effect < effectDesc.count; effect++ ) {
                effects.push( typeIDToStringID( effectDesc.getKey( effect ) ) );
            }
            return effects;
        }
    }
    
  • How can I turn off the "do allow you the program following an unknown Publisher to make changes to this computer?" popup with the application compatibility Wizard? "

    The title says it all really.
    I try to use WinMerge, a program I've used for years.
    Now, every time that I throw I get say popup "want allow you the program following an unknown Publisher to make changes to this computer".

    I tried to use the application compatibility Wizard to solve this problem, and I managed to get to the pop-up window IF I run the program from the inside of the Act.
    But if I try to start the Dowes program I get the popup :(

    I guess I must be missing something in the law so that it works all the time.

    Any help/suggestions appreciated.

    Thank you

    The title says it all really.
    I try to use WinMerge, a program I've used for years.
    Now, every time that I throw I get say popup 'want allow you the program following an unknown Publisher to make changes to this computer?'.»

    I tried to use the application compatibility Wizard to solve this problem, and I managed to get to the pop-up window IF I run the program from the inside of the Act.
    But if I try to start the Dowes program I get the popup :(

    I guess I must be missing something in the law so that it works all the time.

    Any help/suggestions appreciated.

    Thank you

    Hello

    This message appears when the application doesn't have an authority root certificate. These types of notifications can be disabled from user account control settings.
    [1] method: Using Control Panel to change UAC settings
    CAUTION: Turn off UAC is NOT recommended
    • On the start menu, select Control Panel
    • Go to system and security > Action Center
    • In the left pane, select change user account control settings
    • Drag the button scroll never notify
    • Click OK to save your settings
    OPINIONS: UAC can avoid potentially dangerous applications to make changes on your computer. Disable UAC would disable the feature for all programs and not for a specific special application.
    Thank you
    I hope this helps :)
  • How can Camileo S20B with the external source?

    Hello

    According to a post on this forum I should be able to the S20B using a USB power source by removing the battery.

    I tried and it doesn't work. I removed the battery and plugged the USB cable into a variety of sources including laptops USB power. The blue light is on but the S20B does not supply power to the top.

    Any suggestions? I really need to be able to power the device for more than one charge of the battery.

    Thank you

    I put t know if it will work. Have you checked the user's guides document?

    I tested it with my Camileo H30 and may not work with the connected USB cable but without battery.

    This cable is designed for transfer of data only.

  • Bug with the tag source formatting STYLE (DW CC 2015)

    The command 'Apply Source Formatting' formats incorrectly the content of the < style > tag. Instead of putting in the form and content of implementation set back as I specified in the tag library, the content and the closing tag will remain embedded to the left, for example:

    < style >

    {body

    background-color: #00005D;

    do-family: Verdana, Arial, without serif.

    }

    < / style >

    The code must be indented manually, which is having little pain, not to mention what to do so defeats the purpose of the command 'apply Source Formatting '.

    I searched the Forum of discussion here, but did not find any help for this problem.

    Is this a known bug that I'll just have to live with, or is it possible I can fix this in the configuration files?

    I think the reason for this is the default mode that CSS is formatted. When you run apply Source Formatting on an external style sheet, all selectors are flush with the left side, even within the questions from the media. The mode CSS formatting is determined by the Format of Code category in preferences (click the CSS button for advanced formatting). However, there is no option to indent the selectors.

    If you want to file a bug/feature request, use the official form: feature request/Bug Report Form

  • ODI, working with the XML source file

    Hi ODI Experts.

    I work in an ODI project for which source is an XML file and the target is Oracle table.
    I am able to reverse engineer the source XML model by placing the XML file on the local DRIVE.
    I created the interface and made the map with the target.
    During execution of the interface, the insert is peroperly happening.

    In a real scenario, my XML file should be placed in a local SERVER (and not in the local drives).
    If that I could go back, I've done the JDBC to point to the directory on the server (instead of local disk path).

    When I run the interface she inserts the same set of records that have been placed in the previous step, the latest data from file.
    I tried to delete the file in both server and local drive, and the interface is represented.
    Then it was also inserted the same set of data (instead of giving error file not present in the path).

    Not sure where it takes the file and insert the data.

    Any valuable contribution on this would help a lot.

    I think what is happening here is that ODI retrieves the data stored in the XML schema when running the interface again.

    Try truncating the XML schema before running the interface that loads data into the table, order below, this can be understood as a procedural step before calling the interface.

    B.4.11 TRUNCATION SCHEME
    Clears all data current schema, or .

    TRUNCATE the SCHEMA []

    http://docs.Oracle.com/CD/E17904_01/integrate.1111/e12644/appendix_xml_driver.htm#CHDEEGHJ

    I hope this helps.

    Kind regards
    Rickson Lewis

  • Why has she changed my home page of bookmarks with the last update, I used to have 12 bookmarks and now its only list 9. WHY?

    Seriously. Its boring the crap out of me, in fact its kind to really drive me crazy, I didn't update my firefox, he just did automatically and now my book mark page (like when I'm going to open a new tab) holds that 9 bookmarks (or at least that's all projection), when she used to hold 12. What was the point of their spacing and making them rounded boxes rather than squares? take-out space? like what. I want just the old version back. Ugh. I don't remember which bookmarks are missing which is also great, because I know they were important.

    You can zoom the subject: newtab page to resize tiles have more page.

    • View > Zoom > Zoom out; CTRL and +.

    This will affect all elements of the page, text so get more smaller institutions.
    Toggle the browser.newtab.preload pref on the about: config page in case of problems with zoom the subject: newtab page.

  • Calibration with the voltage source - float connections

    Hello

    I want to calibrate a PXI-6133 DAQ with a floating voltage source. It says in the manual of the calibration connect the positive output of the Stallion to the AI + pine. Since my source of tension is floating I connect the negative output to GND. HAVE I - HAVE GND short or leave - not connected?

    Thank you

    Jens

    Sorry, I just answered this question for my part it is logical to short-circuit the entries HAVE - and GND.

  • Problem with the Data Source

    Hello

    JDeveloper 11.1.1.6

    I am facing some problems associated with data controls. Here's my number; I'm trying to pass a parameter to a taskflow appearing as a region on the my home page. Once I click on an image in my taskflow, I want to pass the id of the image to my main page using contextual events (it worth?). However, I need to create a my bean datacontrol to expose a method in the link which is triggered once I click it. But I can't create my datacontrol because I get this error:

    Error: Multiple versions of com/DataControls.dcx appear in your managed project classpath. Check dependencies associated with project: .../model/classes/ and .../Portal/classes/

    Any other approach would be nice to hear.

    Concerning

    Several versions of com/DataControls.dcx appear in your managed project classpath. Check dependencies associated with project: .../model/classes/ and .../Portal/classes/

    You are actually looking for the project for the DataControls.dcx in the paths specified? Ideally, there should not be a DataControls.dcx in your template project.

  • Personalized with the trusted source authentication

    Hello

    There is a following requirement: since a user application (non-apex) klicks on a link to a page of the apex and must be authenticated without having to type his username and password (without page 101) because it is already identified in this application non-apex.

    My approach: create a procedure that checks if the user is authenticated in a non-apex application. Then create a custom authentication scheme where authentication is my procedure. Then of course change current authentication scheme to my authentication scheme. BUUUT what happens if the user is not properly authenticated in a non-apex application? So I think that the user should see page 101 and type the name of user and password.

    Is it possible to do something like this: If the procedure returns true, then use Custom authentication scheme, if set to false use Apex authentication schema (standard schema)? Or is it not the right approach?

    Thank you very much for your answers.

    Kind regards

    Anton

    PS: I know that some of the discussions in the forum about this, but I don't understand how they can help in my case.

    Hi Anton,.

    Instead of calling APEX_CUSTOM_AUTH. CONNECTION, you can call APEX_CUSTOM_AUTH. SET_SESSION_ID and APEX_CUSTOM_AUTH. SET_USER and use a sentinel of page function. You will have to search this forum for cover page features more information.

    In your authentication custom parameters are user name and password, but you can check what you want and return true or false. If you do not check the password at all you could just always return true and let all users. If you need to decide what information you will use to authenticate users. There are many ways to do what you want. The password technique to generate just allows you to do a little sign outside the authentication function that allows you to have the 2 way authentication. Some users have a password generated for them and others must provide their password. The function of authentication it don't worry about the right controls for two passwords.

    Rod West

  • Option + drag replace the clip with the changes in the sequence to THE point.

    I tried something recently that I was sure was going to work, but the results were completely unexpected.

    I have a source element in my calendar, which is still audio built-in camera. I wanted to replace this synchronized audio clip and rather than manipulate the content outside the first source.

    What I did was to drop this item in a new sequence. Adding synchronization audio off camera and filled then the content so that the sequnece exactly aligned with the original source clip. I also changed the time code of the departure for the sequence to match the original source.

    Looking at the metadata in the project Source Panel, they are completely identical in the measure of time, time code, etc...

    I chose this new sequence in the project Source, Opt-dragged on the clip Panel I wanted to replace, and then the sequence did replace the clip for the appropriate duration, the 'in' and 'out' points do not get adjusted as well. So, I had a totally different role of the clip, not the cut piece.

    It is possible that I had expectations for this evil, but what leads me to believe it would work is that you can do the same thing in AE, with clips and comps and it works perfectly every time.

    Thoughts?

    It is possible that I had expectations for this evil?

    N °

    Thoughts?

    If Alt / Opt + click - move doesn't work, try Alt / Opt + shift + click - move. Should work fine.

    If you used this in AE all the time, you would certainly annoyed that he does not work the same way in the first

    Looks like the PrPro team has been obsessed with the Nice defectors from FCP for the past two years, rather than transform organic whole Adobe Suite...

  • problem with the vertical field Manager

    Hello

    My application has a screen. On this, I add a Senior Manager vertical field. I add new labelfields dynamically to this vertical field Manager.  When I give the text in the constuctor of the etiquette field, each of them is the fine display. But when I tried to draw the text to the painting, it does not appear.

    Here is my code...

    vfm = new VerticalFieldManager(VERTICAL_SCROLL | FOCUSABLE);
            for (int i = 0; i < 4; i++) {
                index = i;
                LabelField labelField = new LabelField() {
                    protected void paint(Graphics graphics) {
                        // TODO Auto-generated method stub
    //                  super.paint(graphics);
                        graphics.setColor(Color.BLACK);
                        graphics.drawText(displayString[index], 0, 0);
                    }
                };
                vfm.add(labelField);
            }
            add(vfm);
    

    Please help me find a solution.

    First of all, stop saying that it is VerticalFieldManager who has done something bad for you. It has nothing to do with it.

    You use the index in your LabelField painting method. Use paint value is the current value of the index at the time of the painting. Painting happens way after you have created all your LabelFields, when the index stopped to change and has the last value of the loop variable (in your case, it's 3).

    This, as well as LabelFields width zero (that you seem to have supported) so are the problems of your original code. Store the value of i in your LabelField somehow if you insist on using the table values. If only check out you them once and do not change them, consider creating your LabelFields with the text from this displayString table.

    Even better: as you do not use the LabelField paint, why not create a custom field received a text and paint your smileys and all? Of course, you have to implement available as well, but it's useful even when your smileys will take a different width than the corresponding symbols.

    To summarize: your current approach is bad. Take a step back, work on the design, and then implement.

Maybe you are looking for