Storage in double-layer in the variable 'function object is undefined.

Im trying to write a script that duplicates and reflects a layer in the central axis. It is also my first script in sequels to try to get the feel for it.

However, I'm not sure what the problem is. Is the problem with storing the layer duplicated in the variable? Or I use the object/processing of scale it the right solution.

#target aftereffects

var center = 3840;
var layers = app.project.activeItem.selectedLayers;

for (x in layers) {
    var old_position = layers[x].transform.position.value;
    var new_position = (center-old_position[0]) + center;
    var new_layer = layers[x].duplicate();
    new_layer.transform.scale(-100, 100);
    new_layer.transform.position(new_position, old_position[1], old_position[2]);
}

Check in After Effects script guide documentation of the objects of the property.

Properties must be defined with the function setValue and need for arrays as arguments.

scale.setValue ([-100, 100]) instead of scale (-100, 100);

etc.

Tags: After Effects

Similar Questions

  • Where is the variable function in Adobe animate?

    Hi all

    Return these days we can easily find the variable in the properties of the flash, but with the new adobe animate, I'm unable to find the variable. I am trying to enter the date and time but with no variables, I am unable to find a source of output for my coding. Thanks in advance people.

    you try to find the Panel shares, where you can enter actionscript?

    If Yes, click window > actions, or click F9.

  • How to pass the Javascript function OBJECT

    Hello

    I have 2 items.

    P1_ITEM1
    onchange="javascript:function1(this); // here we are passing the object (THIS) for P1_ITEM1
    {code}
    
    
    P1_ITEM2
    {code}
    onchange="javascript:function2(this); // here we are passing the object (THIS) for P1_ITEM2
       
    // how can I pass the object of P1_ITEM1.
    onchange="javascript:function3(xxxx); // here I want to pass the object for P1_ITEM1
    {code}
    
    
    Thanks,
    Deepak                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    Deepak

    Change the function definition for a pThis parameter to start - it's confusing otherwise.

    For your last example, modify the parameters for the function to be () (Nothing) and then have the first line of another function as

    var pThis = document.getElementById('P1_ITEM1');
    

    Then use pThis as object...

    See you soon

    Ben

  • I don't know why I get the error "function object is not defined" with this script.

    Hello

    I have a script which adds a unique model in the render queue and applying a Render parameter model and model output for adding module make element of queue.  For some reason, I am getting an error on the first line which reads:

    app.project.renderQueue.items (1), .applyTemplate ('MY SETTINGS');

    I have attached the image of here error dialog:

    Screen shot 2011-07-28 at 12.28.32 PM.png

    Here is a part of the script.

            var currentProjectItem;
            var globalCompItemID;
            var renderCompItemID;
    
            for (var i=1;  i <= app.project.numItems; i++)
            {
                currentProjectItem = app.project.item(i);
                if (currentProjectItem.name == "globals")
                {
                    globalCompItemID = i;
                } else if (currentProjectItem.name == "!_FINAL RENDER") {
                    renderCompItemID = i;
                }
            }
    
            //add the necessary preview render jobs
            app.project.renderQueue.items.add(app.project.item(renderCompItemID));
            app.project.renderQueue.items(1).applyTemplate("MY SETTINGS");               <---THIS IS WHERE AE ERRORS
            app.project.renderQueue.items(1).outputModules[1].applyTemplate("MY SETTINGS");
            app.project.renderQueue.items.add(app.project.item(renderCompItemID));
            app.project.renderQueue.items(2).applyTemplate("MY SETTINGS");
            app.project.renderQueue.items(2).outputModules[1].applyTemplate("MY SETTINGS");
            app.project.renderQueue.items.add(app.project.item(renderCompItemID));
            app.project.renderQueue.items(3).applyTemplate("MY SETTINGS");
            app.project.renderQueue.items(3).outputModules[1].applyTemplate("MY SETTINGS");
    
     
    

    The model I want to add is added to the render queue, it simply refuses to invoke the method applyTemplate() on the most recently added make queue item.

    Any ideas why I get this error?

    Thank you!

    I think that from the line where the error occurred, you must use renderQueue.item () instead of renderQueue.items () (except when you add something to the rendering queue).

    Dan

  • Double layer DVD RW and T61p

    Is there a DVD RW drive double layer for the UltraBay for the T61p?

    It seems that from the 39T No. 2851 of the FRU, a writer of the double layer.

  • Replacement of an HTML element with jQuery, why the variable here specified as .html?

    I'm trying to understand this tutorial. I got it except for one thing. As I understand it the following code below to be:

    jQuery function is set on loan.

    A variable is created called "newItem".

    "newItem" is equal to get a paragraph with an alternative text tag

    jQuery then gets the class selector "#para2".

    It imports html using the .html with the variable function content "newItem".

    OK, so why is "newItem.html" instead of just "newItem". I understand the code returned need to be html, but is not "var newItem = $("< p > Ceci est le nouveau paragraphe en remplaçant la ligne < /p >)"); indicate it is html since the paragraph tags?

    In addition, this .html does not indicate what is in parentheses will be back #para2 html?

    $ ("#para2").html(newItem.html ());

    I understand, it "must" be done this way, because I tried with just $ ("#para2") .html (newItem ()); but I do not understand why.

    * also, I'm sure that there is another way to make this code, but I am trying to learn this particular example.

    < head >
    < script type = "text/javascript" >

    $("document").ready (function () {}

    var newItem is $("< p > Ceci est le nouveau paragraphe en remplaçant la ligne < /p >");.

    $ ("#para2") .html (newItem.html());

    });

    < /script >


    < / head >

    < body >

    < ul id = "list1" >

    heading 1 < /li > < li > list of the
    < id = "para2" li > list point 2 < /li >
    3 < /li > < li > element
    4 < /li > < li > element

    < /ul >

    < / body >
    < / html >

    danbenner wrote:

    Thank you. I'm not what you mean "first element in a set of matched elements.

    In jQuery, $("une expression") matches one or more items in the object model of the document (DOM) page. For example, $('p') finds all the records, as well as paragraphs are considered to be a set of matching elements. In this case, the first paragraph would be the first item of all the matching elements. $('p').html () would get the HTML content of the first paragraph.

    In your case, newItem creates a paragraph from literal HTML in $ (). To get the HTML stored in newItem, you must use newItem.html ().

  • Satellite P30-145: the drive won't recognise DVD double layer

    I have a Satellite P30-145 with a SupermultiDL DVD player. When I got the PC, I could write DVD double layer with no problems. Now the drive will not recognize DVD double layer at all. Even those from the same box that has worked well before. I use are Verbatim Double layer DVD + R 2.4 x discs.

    After a lot of internet research, I have downloaded and run DVDInfoPro. This application has reported that the Player did not support the DVD + RW DL. Very strange!

    Can anyone help? The drive is a carpet * a DVD-RAM UJ - 831S.

    Hi Lan

    This disc is certainly DL one, but I can imagine that the drive is defective and cannot calibrate lens in the right position. This model of laptop is more than two years, and if you have used this drive extensively, I can really imagine that the DL function is defective.

    What you can do is to clean the lens and see that it will help.

  • Qosmio E10: The drive only reads DVD-R double layer / DVD + R

    Hey all,.
    I was wondering if someone could forward that request to the person responsible slimdrive firwmares to Toshiba.
    He finds that the carpet * a UJ-830 s drive not reading DUAL LAYER DVD-R / DVD + R (although it reads DVD-ROM OK DVD9).
    This disc, Mat * a UJ - 830 s equips the Qosmio E10.
    I have searched everywhere for a firmware update without success, so Toshiba are my only remaining chance.

    There is an update of the firwmare in of the Qosmio E10 driver section but that's UJ - 831S (and it does not work on UJ-830 s) :/
    Thanks for reading.

    Alcahest

    Hello

    AFAIK this unit has a DVD Super Multi drive and it must use media suite:
    CD-ROM (Read) CD - R(read/write) CD - RW(read/write) DVD-ROM (read)
    DVD-R(Read/Write) DVD - RW(read/write) DVD + DVD + R(read/write) RW(read/write) DVD - RAM(read/write)

    In addition, these speeds are available:
    Maximum speed CD-ROM(24x:read) CD-R(24x:write) CD-RW(10x:write) DVD-ROM(8x:read)
    DVD-R(8x:Write) DVD - RW(4x:write) DVD + DVD + R(8x:write) RW(4x:write) DVD - RAM(3x:write)

    Maybe this drive can t use the double layer? I think he uses a normal DVD

    Good bye

  • Satellite Pro U200 - does support the DVD double layer?

    Hello

    Does anyone know if engraver of DVD of Satellite Pro U200-PLUA1E-02802QS4 supports the dual layer option?

    Kind regards
    CCBC

    Hello

    It s dependent not portable, it s according to the reader that supports double layer DVD or not! ;)

    To check the properties of your drive, for example with Nero. There you can see what are the types of discs, you can use in this drive.

  • Unable to add data to the Virgin DVD + RW double layer after having ejected backup problem.

    Did a backup using DVD + R double layer, and after having ejected the last media due to clerical error, I can no longer continue the backup due to the error: insert a disc - it seems that my hardware is no longer detect dual layer blank media. Works great on regular blank media 4.7 GB.

    Hi sal69,

    This problem is caused by physical limitations in DL (Double Layer) media. These limitations prevent any real use multisession. When the media is ejected, the disc session may be closed for DVD-ROM compatibility. On these discs, DVD-ROM compatibility is achieved only when the disc is complete. When the disc is finished, it is closed forever. The physical characteristics of the media require two layers will be burned so that the disc can be played in a DVD player. The two layers can be burned only by closing the disc. As soon as the disc is closed, no additional data can be added to him.

    You can follow the steps mentioned in the link below

    You may be unable to save more data on a DVD-R DL disc or a DVD + R DL disc after it is ejected into Windows Vista

    http://support.Microsoft.com/kb/928355

    You can download and install the latest service pack on the computer

    How to obtain the latest Windows Vista service pack
    http://support.Microsoft.com/kb/935791

    Thank you, and in what concerns:

    Ajay K

    Microsoft Answers Support Engineer

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • What IS THE DVD BURNER DH 16ABLH double layer compatible

    I want to know if the DVD on my computer is compatible to playback and burning double layer?

    Hello

    It should be, but to verify, you can visualize all the multimedia capabilities of your optical drive using the free app at the following link.

    http://www.VSO-Software.fr/products/Inspector/Inspector.php

    Kind regards

    DP - K

  • The JS function in a variable name. How to call it?

    Hello

    I have a name of javascript function in a variable in qml. I need to call this function to qml. How to call it.

    I spent my name of the function in c ++ (for example - fnCallLog (param)) in qml using signal and slot. Now, I need to call fnCallLog (param) function js in qml.

    In javascript, I can use the window function, but here, it is not accessible. How to call here.

    Kind regards

    Sanjeev

    Oops, misunderstood you here. Well, you can try the method of evaluateJavascript (QString) on your WebView. You can get the result using the javascriptResult (id, QVariant) signal on the Web view.

    This BlackBerry Builder session can be useful.

  • is it possible to pass the value of the variable validation function return Boolean message?

    Selection_012.pngSelection_013.png

    Assume that L_BATCH_NAME is the name of the variable which will receive the value as

    declare

    l_batch_name: = "NA";

    BEGIN

    L_BATCH_NAME: = FUNCTION (PARAMETERS);

    IF CONDITION > 0

    THEN

    RETURN FALSE;

    ON THE OTHER

    RETURN TRUE;

    END IF;

    END;

    Hi Reema,

    ReemaPuri wrote:

    Assume that L_BATCH_NAME is the name of the variable which will receive the value as

    declare

    l_batch_name: = "NA";

    BEGIN

    L_BATCH_NAME: = FUNCTION (PARAMETERS);

    IF CONDITION > 0

    THEN

    RETURN FALSE;

    ON THE OTHER

    RETURN TRUE;

    END IF;

    END;

    1. create a hidden item I say P1_HIDDEN_ITEM

    2 type the error message for this element in your process of

    declare
    l_batch_name:='NA';
    
    BEGIN
    :P1_HIDDEN_ITEM := FUNCTION(PARAMETERS);
    IF CONDITION > 0
    THEN
    RETURN FALSE;
    ELSE
    RETURN TRUE;
    END IF;
    END;
    

    3 and refer to this element hidden in the error message.

    Record for the batch '||&P1_HIDDEN_ITEM.||' already exists.
    

    Kind regards

    Jitendra

  • Problems to get the Variables of functions

    If possible, could someone explain to me how function to produce variables.  Here's what I'm trying to do.  I have a CSV file that I'm importing.  I would then like to run function for each row in the CSV file and produce able to use in the script.

    For example,.

    I have a function that looks to see which version of windows operating system and will assign a key to license based on this variable.

    Function Determine_Win_License_Key {}

    #$erroractionpreference = "SilentlyContinue".

    $CSV_Guest_OS = $_. Guest_OS

    Switch ($CSV_Guest_OS)

    {

    2003 x 32 {$GuestOSLicense = "License key 1"; break}

    2003 x 64 {$GuestOSLicense = "License key 2"; break}

    2008 x 64 {$GuestOSLicense = "License key 3"; break}

    2008r2x64 {$GuestOSLicense = "License key 4"; break}

    }

    }

    Based on this function, I set the $GuestOSLicense variable to be used later.

    The body of the script looks like this:

    Import-Csv csv.csv | %{

    Write-host "license key of determination."

    Determine_Win_License_Key

    Write-host "the used license key is: ' $GuestOSLicense

    }

    I expect to see what is the license key but all I get output is

    "" The used license key is: ".

    Someone know or understand why the function runs but does not save the variable generated by the function?

    I have several other functions in this script, and each of them do not return the variable.

    It's because you return anything in the service.

    One way to achieve this is

    Function Determine_Win_License_Key {
       param($OS)
       #$erroractionpreference = "SilentlyContinue"
       switch ($OS)
       {
          2003x32 {$GuestOSLicense = "License Key 1"; break}
          2003x64 {$GuestOSLicense = "License Key 2"; break}
          2008x64 {$GuestOSLicense = "License Key 3"; break}
          2008r2x64 {$GuestOSLicense = "License Key 4"; break}
       }
       $GuestOSLicense
    }
    
    Import-Csv csv.csv | %{
       Write-host "Determining License Key"
       Determine_Win_License_Key -OS $_.Guest_OS
       Write-host "The License Key being used is:" $GuestOSLicense
    }
    

    It is also best to pass a parameter to a function, rather than depend on variables in the function, which are initialized defined outside the function.

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • Problem with the support of ROM of DVD double layer

    I just bought the edition of Adobe Creative Suite Premium Web 6 DVDs I have have not yet opened the box and noticed that it is said that one of the requirements of the system is dual Lyer DVD ROM support is necessary. My question is, is it a requirement for one of the tools, or I won't be able to install the software, I don't have a DVD-ROM with support double layer?

    Hi adobe_new_product_user,

    DVD ROM is only necessary if you are installing the software using the disc.

    Generally most computers nowadays have double layer DVD ROM.

    Incase if there is no problem, you can also download the product and then install it

    http://prodesigntools.com/Adobe-CS6-direct-download-links.html

    Thank you

    Kapil

Maybe you are looking for

  • Re: Toshiba virtual Store account Reset - 31069

    I have a Toshiba Journe Touch tablet.The personal account of the Tablet Id is * _31069_ *.I give this tablet to my child and now I need to resetthe store virtual account. - another email and another Please reset the account. ID 31069 *. Thank you for

  • Abandonment of a loop timed - what happens?

    LV2013, LVRT 2013 I'm not clear on what happens when you STOP a timed loop, STOP TIMED STRUCTURE vi. The help says: "If you try to interrupt a timed running the timed immediately loop loop runs the current iteration and returns ABORTED in the output

  • I butwhen high speed high, I use the webcam on any video chat my signature programs is blurred

    I am deaf and use webcam to Sin with other people on Skype or other video programs... have fabulous high speed cable and another my video phone, I look on and no blur effect but when I use the webcam and I use the language signs my hands become blurr

  • Pavilion 1000-1401AU: pilot

    I installed the 64-bit Windows 7. but the problem is that I have no driver in my laptop, so I can't control audio, britness, LAN or anything like that and britness button, volume button still does not. I tried a few drivers from the hp site, but ever

  • 5548 stack and LACP

    Hi all First post here; so I'm sorry if I'm in the wrong thread... I inherited a bunch of 5548. I have two "stacks"; a stack of three (3) devices and another battery of two (2) devices. The stack of three is a cluster VM and the stack of the two is t