Source text generated by current value - Expression?

I write an expression to control the sourceText of a text layer based on the length of another layer of text. Part of the feature is to only update the current text of the layer, if there is a pretty big change in length.  Is there a way to access the current value of the text layer that was generated by the expression? value and sourceText.text pointing to the text on the text layer, not the generated layer. 

Here's my expression

 function calc(prevValue) {
  var textLength = thisComp.layer(1).text.sourceText.length;
  var perc = thisComp.layer(2).text.animator("Animator 1").selector("Range Selector 1").start;

  var newValue = 140 - Math.floor(textLength * perc / 100);
  return (parseInt(prevValue) - newValue) < 10 ? prevValue : newValue;
}

//Need to pass the previously generated text value here...how do you access it?
calc(text.sourceText);



Could not find any way to access in the expression references.

Thoughts?

Calvin

I think it's one of those cases where you will need to loop through all the previous images to restore the value of the expression + through the previous image.

Dan.

Tags: After Effects

Similar Questions

  • value of the cursor relative to the source text

    I'm trying to parent a host of kerning on a slider on SliderControl, which is related to the source text on TrackingControlof the text .

    The real problem here is parenting to the value of the cursor in the Source text. I tried this expression on the cursor, without success:

    txt = comp("thisComp").layer ("TrackingControl") .text .sourceText;

    If (! isNaN (parseFloat (txt)))

    parseFloat (txt)

    on the other

    value

    The expression gives me any errors, but it seems also connect to anything!

    Reason:

    I build titles for first models, which allow only the source text to be edited. So, to control kerning inside the comp from the AE model, I need parents host kerning to a text layer, which can be edited directly from the effects of first Panel.

    Solved my problem, LOL.

    Just had to remove the first line and re selection icon to get the correct syntax 'thisComp '.

    txt = thisComp.layer("tracking").text.sourceText;

    If (! isNaN (parseFloat (txt)))

    parseFloat (txt)

    on the other

    value

  • How can I access the recipient "subordinate" in the expressions for the participant to ApprovalTask generator type "by the expression" value?

    Hello

    How can I access the recipient "subordinate" in the expressions for the participant to ApprovalTask generator type "by the expression" value?

    I can access some details of the beneficiaries of the workload, but how to access direct subordinates?

    TIA

    Leo

    Well, as I said, if you need to get a list of all rollover (for whatever logic you have), making calls to IOM to find the list of users whose Manager is the person in your composite.

    Sorry if I am wrong again.

  • There is a special token that I can put in a column of the CSV file recovery channel which implies approval of the current value?

    Versistand version is 2013 sp1.

    I use stimulus CSV expressions in my sequence in real time and want a channel to keep its value current (last) until a certain time. Is there a way to do this?

    Stimulation CSV file example:

    timestamp, chan1, chan2

    0,0,

    10, 1,

    20,1,5

    30,2,10

    In this example, chan2 would retain its current value until the timestamp 20.

    Is it possible to implement this feature?

    Kind regards

    Rick Howard

    Thank you! It is a valuable feedback. I can't think of a way to do natively with the functionality of reading CSV for sequences in real time. Some thoughts on how this can be done:

    1. create your own utility to sequences of script based on a CSV file in real-time. Extend the functionality of having a special marker in a cell which designates not only to change the value for the channel as timestep. Do not start from scratch. This tool open source and this one the two script of sequences in real time and stimulation of reading profiles based on data sets (although in different ways).

    2. with the help of software without insertion to the fault of the string value that you want to keep the initial value for the first X seconds of reading the CSV file. For example, you could play another sequence with your CSV file at fault the channel at its current value so that reading CSV does not replace the value.

  • Layer of Source text a link to the external text. (no code in doc!)

    I saw a link to text with snippets of code inside documents.

    This means that the external text document must contain pieces of scripts.

    I would like to make a link to txt (or csv) documents that contain no code.

    Total noob users must be able to link a text of an After Effects project.

    I have a Web site data receiver Exporting CSV values.

    It would be ideal that After Effects can hoover the text and put some pieces in some source texts.

    We are talking about here auto sports cards.

    Is this possible without adding code to a text dump?

    Or is it simply impossible?

    I solved it by using Expressions.

    In the JavaScript reference Guide, there are a lot of usage of the word VAR as the first word in a line of code.

    Seems to be what does not include AE.

    When I program without it, many commands work fine.

    Damage data Web site continues to change its structure.

    Him copy / paste / expression method worked fine for a day and then I went to the square.

  • Appearance of the cursor for the source text

    Hello

    I would use a cursor to display text (when the value of the slider is 0, the source text will display any results, when it's 10, the source text display the first 10 letters etc...). Like the typewriter animation effect (but I need with an expression of the Source text)

    I have created a slider named "TextSlicer".

    Wrote a text layer

    And this expression in the Source text:

    Try

    {

    text.sourceText.split("") [Math.round (effect ("TextSlicer") ("Slider"))]

    }

    catch (Err)

    {text.sourceText}

    With this expression, I post a letter in time.

    My goal would be to show the letters N, based on the value of the slider:

    text.sourceText.split("") [0] + text.sourceText.split("") [1] + text.sourceText.split("") [2], text.sourceText.split("") [n]...

    Thank you!

    fullText = 'blah blah ';

    numLetters = Math.floor (("TextSlicer")("Slider").value) effect.

    fullText.substr(0,numLetters);

    You can also leave the text constant and add host text > opacity.

    Xavier.

  • Subtract value of the signal of the current value 2 seconds ago

    Hello

    I'm relatively new to LabView, but I went through the Forums and google a lot and have not found a solution. I have this problem:

    I have an analog signal from my USB6009 DAQ of NOR. I want to take the signal I got 2 seconds ago and subtract its value to the current value. And I want to do it countinously.

    My data are acquired 1 sample on request by NIDAQ Deputy in while loop.

    Signal result should be something like:

    Y = y - y(t-2), where there is a result and there is a signal of NIDAQ.

    Can you help me or anything else you need to know to help me? Thank you.

    You must use a ring instead of the shift register buffer.

    Your signal source must be configured to read constantly (take readings more (best would be multiple of line period) and average)

  • Get the current value of a control of the ring

    I have a control of the ring that has the following values. See attacment. I need to get the current value of this one and use it as input for another function, but First I would like to get the current value and save ina text file. I tried this

    if (event == EVENT_LEFT_CLICK_UP) || (event == EVENT_LEFT_CLICK_DOWN)
    {
        int p;
        GetCtrlVal (panelHandle, PANEL_RINGSLIDE_1, &p);
        FILE *OutFile = fopen("C:\\Users\\Student\\Desktop\\ringtest.txt","w");
        fprintf(OutFile,p);
        fclose(OutFile);
    
    }
    

    I need to get the current value of the ring (& p) to write to the file ringtest.txt.

    Also, I need to use this value (& p) as another entry in the same program.

    IE value of & p must be used in

    b = c * 5; where c is the value of the current & p.

    Can any 1 help?

    You're right: EVENT_LEFT_CLICK_DOWN is not a valid event for the CVI. Valid events are listed in the userint.h file, and are the only events that can be caught in the trap in a point of order. On the other hand, you're assuption on EVENT_VAL_CHANGED is correct: you can trap forget the EVENT_CLICK_UP event.

    According to the second question, looking at the definition for fprintf you must pass a string format as the second parameter to the function, then the value to write to the file. In your case, the correct syntax is:

    fprintf (OutFile, "%d", p);

  • LOV value to present the field order LOV/text multi by return value!

    I have nested LOV and return the value reduced to another text/LOV field in good order.

    My problem,
    The text field or return value LOV must be dispay with one by an order of values by (dynamic) .the I using the query in each source LOV.
      select DMS_DD_ENG_DESC dis, DMS_DD_ID ret from DMS_DEPT_DETAILS 
    where DMS_DD_DT_REF_ID=:P3_DETAILS
    
    Workspace          :RAM_R&D
    User Name/Password :aramani/apex
    App                http://apex.oracle.com/pls/apex/f?p=36167:3
    I do dynamic action for this case?

    can someone help me please.
    Thank you
    RAM

    Hi Ram,

    I changed your application and I think it works as desired.
    I don't know if it exactly what you need, but take a look and let me know.

    Kind regards
    Kees Vlek
    -----
    Company: http://www.orcado.nl
    Blog: http://www.orcado.nl/blog/blogger/listings/69-kvlek
    Twitter: http://www.twitter.com/skier66

    If the answer to question please change replied and mark the appropriate post as correct / helpful.

  • Squance current value of a session?

    Hello

    Can anyone confirm if the following statement is true?


    ------------------------------------
    If it has more then a session using the same sequence at the same time then I get only the current value of my session.
    -----------------------------------

    I use oracle 9i and values are inserted in the two tables. First array will have the nextval squance and second table will have curval squance even. I wonder if there is another user using the same sequence at the same time then I'd get the curval of my session (that I just added in the first table) or will it be different session?

    Thank you

    + But why the sequence is session based, if it is a global and only used object generate sequental numbers and used by different users? I mean, when I run MY_SEQ. CURRVAL, it makes sense to get the "present value" of the sequence that has been changed from 'everywhere' by 'any person' in the database? +

    It is a global object - as a table is a global object. But in a table - you do not see my work and vice versa not validated. Overall not average "see everything", it simply means that the object has a scope such as many people can see it.

    global temporary tables are certainly global - their name says even the world. but you don't see me and I don't see yours - by design.

    the sequences are the same way - currval is DESIGNED to return your current value sessions. If you want to know the ' system global level current value "simply call nextval. But even that would be not accurate in general - because RAC each INSTANCE has it's own set of values - so the current overall value on node 1 is maybe 42 and on node 2, it can be 1000.

    In short, currval is designed only to return the last value of nextval in YOUR SESSION. It was designed this way so that you could easily make an insertion of parent/child:

    insert into parent values (... seq.nextval);
    insert into child values (... seq.currval);
    insert into child values (... seq.currval);

    She has designed this years years before the return clause was invented (a method suggested above in another wrong answer to this question) - and was the ONLY way to understand what seq.nextval when inserted into a table returned (before triggers exist yet)

  • Changing the values in drop-down list in the event not return current value

    Hello

    I have a combo that I'm filling using javascript according to the post by Brad here http://blogs.4Point.com/Brad.White/2010/03/populate-a-drop-down-with-a-Web-service-in-a-PD e.html .

    I hooked the change event from the drop-down menu to display the new selection in a separate as text box below

    ApplicationForm.Page1.ddlUsers::change - (FormCalc, client)

    txtSelected.rawValue = ddlUsers.rawValue

    This code works, but shows the previous values (or the last) that has been selected in the drop-down list, but not the current value, which has been selected by the user. I also tried to use selectedIndex rather rawValue on ddlUsers but it has the same behavior. "Commit on" from the drop-down list is set to "SELECT".

    Am I missing something here? How can I get the current value is selected in the drop-down list.

    Thank you

    Marie Pascale

    Hi Carole,

    I didn't look at the blog, but the most appropriate property for use with the change event is xfa.event.newText instead of .rawValue.

    Thus, as the Javascript:

    txtSelected.rawValue = xfa.event.newText;
    

    Hope that helps,

    Niall

  • Turn off the text box with the value of the checkbox

    Hello people,

    I am trying to activate or disable the text box with the value of the CHECKBOX, I have got the same thing with the BOX of ELECTION, with the javascript as follows: -.

    HEADER HTML
    ----------------------
    < script type = "text/javascript" >
    function disableOnValue (o)
    {
    If (o.value == 'Y')
    {
    document.getElementById('P2_TEXT_BOX1').disabled = false;
    document.getElementById('P2_TEXT_BOX2').disabled = false;
    document.getElementById('P2_TEXT_BOX3').disabled = false;
    }
    on the other
    {
    document.getElementById('P2_TEXT_BOX1').disabled = true;
    document.getElementById('P2_TEXT_BOX2').disabled = true;
    document.getElementById('P2_TEXT_BOX3').disabled = true;
    }
    }
    < /script >
    ---------------------

    under region Source whose Point display is < b > before < /b > foot and sequence is the last sequence of the entire region
    ----------------
    < script type = "text/javascript" >
    If (document.getElementById('P2_RADIO_BUTTON_0').checked is true)
    {disableOnValue (document.getElementById('P2_RADIO_BUTTON_0')) ;}
    on the other
    {disableOnValue (document.getElementById('P2_RADIO_BUTTON_1')) ;}
    < /script >
    ----------------

    and finally, to the title of point RADIO_BUTTON, HTML Form element attributes: -.
    -----------
    OnChange = "JavaScript:disableOnValue (this); »
    ----------

    the thing above works very well with the help of the RADIOBUTTON, but I want to try same thing with the CHECK_BOX I also tried a few changes but did not have any success so if someone help out me even that will be great and appreciated!


    Thank you

    Kind regards
    Kumar

    I also have the following in the Footer region region:

    <script type="text/javascript">
    x($x('P12_CHECKBOX'));
    </script>
    

    This is just to make sure that the items are disabled when the page is loaded, because the checkbox is deactivated

    Andy

  • is it possible to slow down the speed of scrolling text in the distance away from text generator?

    I'm trying to slow down the speed of text scrolling in the distance away from text generator.  Is it possible to make the text scrolls more slow?

    Stretch it to extend it.

  • How to search a text with a particular value node in a document xml with labview

    Hi, here is my xml doc.



     
        FA
        1800
        2015
        1952.5
     

     
        ADF
        2.6 G
        1880
        2635
        2635
     

    I want to use 'get the first matching node' vi to locate the node of "FA". The I use vi "To get the content of the text node" for the value "1800". I also want to get two node value 2015 and "1952.5". But my VI does not work. I spent my schema vi here. could someone take some time to look at? Thank you!

    You forgot to add / / in front of Type. Close references when are no longer needed.

    Ben64

  • How to make the current value by default to all controls both

    Choose 'Data Operation'-> 'Do current Default value' to several controls requires a lot of clicking. Is it possible to do so with a single click?

    Yes.  If you select no control, he says 'Do the current default values' and it does all the controls at the same time.  If you have a control is selected, then it does so only the selected controls.

    Reset the current values default works in the same way.  Do not select anything, he does all the controls at the same time.

    Bob Schor

Maybe you are looking for