Forum Replies Created

Page 15 of 46
  • Colin Braley

    September 30, 2006 at 1:42 am in reply to: Conditional Expression

    Mynameisinuse,
    I’m not sure if there is an online resource of every javascript keyword/function. Many realy programming languages like C++ or Java have somehting called an “API” which is an online document that tells you about all the commands in the language and their proper syntax. It’s probably out there somewhere, but I don’t know where. However, if you find it most of it would be useless to you because javascript is a scripting language meant for developing websites. After Effect’s expressions just use a subset of the javascript comands with some of their own things mixed in. If you want to learn more “things to do with .name” check out this resource:
    https://www.quirksmode.org/js/strings.html
    it might be a little but confusing however because it assumes you know some programming terminology. If you have any questions about anything in there post ’em on here and Im sure myself or someone will help you out.
    ~Colin

  • Colin Braley

    September 30, 2006 at 1:42 am in reply to: Conditional Expression

    Mynameisinuse,
    I’m not sure if there is an online resource of every javascript keyword/function. Many realy programming languages like C++ or Java have somehting called an “API” which is an online document that tells you about all the commands in the language and their proper syntax. It’s probably out there somewhere, but I don’t know where. However, if you find it most of it would be useless to you because javascript is a scripting language meant for developing websites. After Effect’s expressions just use a subset of the javascript comands with some of their own things mixed in. If you want to learn more “things to do with .name” check out this resource:
    https://www.quirksmode.org/js/strings.html
    it might be a little but confusing however because it assumes you know some programming terminology. If you have any questions about anything in there post ’em on here and Im sure myself or someone will help you out.
    ~Colin

  • Colin Braley

    September 29, 2006 at 4:28 pm in reply to: Failed Render sound

    From https://www.msp.sfsu.edu/Instructors/rey/aepage/aetips.html

    * Don’t like AE’s sound of a render completion? To change the render complete sound, see the Adobe doc to choose any sound you want. To return the “Happy-Happy-Joy-Joy”, in the prefernce file, change “Play classic render chime” = “0”. On the Mac OS9, replace ‘snd ‘ resource 128 for good render, 129 for the bad render sound.. You might also reduce the volume of the replacement file so that too doesn’t blast through your speakers or headphones.

    ~Colin

  • Colin Braley

    September 29, 2006 at 4:22 pm in reply to: Conditional Expression

    Glad I could help…sounds like an interesting project…when the video is done send me a link sometime if you are able to. My email is cbraley AT vt.edu.
    And to answer your questions:
    – The code didn’t take me too long to write…just under 10 minutes…all I really had to do was translate your psuedo-code into javascript…you did all the thinking for me.
    – Also, you are right in saying that AE has no global variables, and that was a clever solution to use the x position of a null as a global variable. However, there is a more elegant solution called an “Expression control.” Go to effects > expression controls and add a “Slider” to a layer sometime. You can rename this effect something like “GAP” and then pick whip to it whenever you need to reference that value in an expression. For more info about expression controls check out

    https://www.digitaltutors.com/digital_tutors/video.php?v=528

    that tutorial.
    There are also other ways (like using loops) to get around AE’s lack of global variables but usually that kind of thing isn’t necessary.
    I hope I helped you out.
    ~Colin

  • Colin Braley

    September 29, 2006 at 4:22 pm in reply to: Conditional Expression

    Glad I could help…sounds like an interesting project…when the video is done send me a link sometime if you are able to. My email is cbraley AT vt.edu.
    And to answer your questions:
    – The code didn’t take me too long to write…just under 10 minutes…all I really had to do was translate your psuedo-code into javascript…you did all the thinking for me.
    – Also, you are right in saying that AE has no global variables, and that was a clever solution to use the x position of a null as a global variable. However, there is a more elegant solution called an “Expression control.” Go to effects > expression controls and add a “Slider” to a layer sometime. You can rename this effect something like “GAP” and then pick whip to it whenever you need to reference that value in an expression. For more info about expression controls check out

    https://www.digitaltutors.com/digital_tutors/video.php?v=528

    that tutorial.
    There are also other ways (like using loops) to get around AE’s lack of global variables but usually that kind of thing isn’t necessary.
    I hope I helped you out.
    ~Colin

  • Colin Braley

    September 29, 2006 at 4:53 am in reply to: Failed Render sound

    Well if you really like the billygoat sound I have just the thing for you:
    -Open up your effect controls pallete
    -Place your mouse over the part that says something like Comp 1 * Layer 1
    -Turn up speakers all the way
    -Hold down shift and click your mouse
    -Laugh a lot
    -Repeat the previous steps until someone in the room gets angry and tells you to be quiet

    …Now thats a useful After Effects tip for you
    ~Colin

  • Colin Braley

    September 29, 2006 at 4:49 am in reply to: Conditional Expression

    This should do it:

    //begin code

    x = 0;
    y = 0;//I dont know what you want Y to be
    z = 0;//I dont know what you want Z to be
    //–
    if( index == 1 )
    {
    //I dont know what you want to do for the first layer
    [0,0,0]
    }else{

    //—

    prevName = thisComp.layer( index – 1 ).name;
    currName = thisComp.layer( index ).name;
    //–
    if( prevName.indexOf (“door”) != -1|| currName.indexOf( ” door ” ) != -1 )
    x = thisComp.layer(index -1).position[0] / 2 + thisLayer.width / 2 + 200 + thisComp.layer( index -1 ).position[0];
    else if( currName.indexOf ( “wallThing” ) != -1)
    x = thisComp.layer(index -1).width /2 + thisLayer.width / 2 + 100 + thisComp.layer (index – 1 ).position[0];
    else if ( prevName.indexOf( “wallThing” ) != -1 )
    x = thisComp.layer( index -2 ).width /2 + thisLayer.width /2 + 200 + thisComp.layer (index -1 ).position[0];
    else
    x = thisComp.layer( index – 1).width + thisLayer.width /2 + 400 + thisComp.layer( index -1).position[0];

    [x, y, z]
    }

    //end code

    A few questions/comments:

    -I left a blank after if( index ==1 ) because I don’t know what you want to happen if its the first layer.
    -I didn;t have much time to test this
    -The code formatting will look horrible and there will be no indentatin because its hard to read.
    -Also, when the code looks at the other layers’ names note that it is case sensitive
    -Lastly Im curious as to what this code is doing….it sounds like you are trying to build a house 🙂

    ~Colin

  • Colin Braley

    September 29, 2006 at 4:49 am in reply to: Conditional Expression

    This should do it:

    //begin code

    x = 0;
    y = 0;//I dont know what you want Y to be
    z = 0;//I dont know what you want Z to be
    //–
    if( index == 1 )
    {
    //I dont know what you want to do for the first layer
    [0,0,0]
    }else{

    //—

    prevName = thisComp.layer( index – 1 ).name;
    currName = thisComp.layer( index ).name;
    //–
    if( prevName.indexOf (“door”) != -1|| currName.indexOf( ” door ” ) != -1 )
    x = thisComp.layer(index -1).position[0] / 2 + thisLayer.width / 2 + 200 + thisComp.layer( index -1 ).position[0];
    else if( currName.indexOf ( “wallThing” ) != -1)
    x = thisComp.layer(index -1).width /2 + thisLayer.width / 2 + 100 + thisComp.layer (index – 1 ).position[0];
    else if ( prevName.indexOf( “wallThing” ) != -1 )
    x = thisComp.layer( index -2 ).width /2 + thisLayer.width /2 + 200 + thisComp.layer (index -1 ).position[0];
    else
    x = thisComp.layer( index – 1).width + thisLayer.width /2 + 400 + thisComp.layer( index -1).position[0];

    [x, y, z]
    }

    //end code

    A few questions/comments:

    -I left a blank after if( index ==1 ) because I don’t know what you want to happen if its the first layer.
    -I didn;t have much time to test this
    -The code formatting will look horrible and there will be no indentatin because its hard to read.
    -Also, when the code looks at the other layers’ names note that it is case sensitive
    -Lastly Im curious as to what this code is doing….it sounds like you are trying to build a house 🙂

    ~Colin

  • Colin Braley

    September 26, 2006 at 8:38 pm in reply to: combine two projects…???

    Apparently I’m 15 seconds too slow 🙁

  • Colin Braley

    September 26, 2006 at 8:36 pm in reply to: combine two projects…???

    Just goto file > import and select the .aep with the comp that you want. You will then have the whole second .aep in your current project.
    ~Colin

Page 15 of 46

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy