Add a scroll bar to control opacity with scripts?

First of all, thank you to David Torno (http://www.provideocoalition.com/after-effects-extendscript-training-complete-series).
With the help of their tutorials, I managed to make several scripts with the UI, but when I try to add a scroll bar, I can't. can someone tell me what I am doing wrong? Here is the code:

para preguntar scroll bar.JPG

{

function myScript (thisObj)

{

function myScript_buildUI (thisObj) {}

var myPanel = (thisObj instanceof Panel)? thisObj: new window ('pallet', 'Opacity', undefined, {resizable: true});

res = "group {orientation: 'row', alignment: ['fill ', ' fill'], alignChildren: \ ['fill ', ' fill']}"

groupOne: group {orientation: 'column', alignment: ['center', 'center'], alignChildren: ['fill', 'center'],------}

},\

myPanelOne:Panel {text: 'Opacity', direction: "column", alignment: ['fill ', ' fill'], alignChildren: ['fill', 'center'],------}

myScrollbar1:Scrollbar {text: 'Opacity'}, \

},\

}";

myPanel.grp = myPanel.add (res);

var myScrollbar1 = myPanel.grp.myPanelOne.myScrollbar1;

var valueScroll = myPanel.grp.myPanelOne.myScrollbar1.value;

myScrollbar1.onChanging = function () {}

var curItem = app.project.activeItem;

var selectedLayers = curItem.selectedLayers;

var curLayer = curItem.selectedLayers [0];

var opacity = curLayer.property("ADBE_Transform_Group").property ("ADBE opacity");

Opacity = valueScroll;

}

Return myPanel;

}

var myScriptPal = myScript_buildUI (thisObj)

;

If ((myScriptPal! = null) & & (myScriptPal instanceof window)) {}

myScriptPal.center ();

myScriptPal.show ();

}

}

myScript (this);

}

I tested your code, and the scroll bar is added correctly.

What does not work is the method the scroll bar onChanging.

A few comments:

(1) you must not define a variable valueScroll = myPanel.grp.myPanelOne.myScrollbar1.value; outside this function, because it is the value at the point where set you it. It does not update the scroll bar as is.

(2) you will need to use "setValue" to set the value of a property.

(3) it will probably disappoint you much: definition of a property value of layer using a slider/via script scroll bar creates billions of history entries and makes unusable history.

(When you scroll the cursor property in After Effects, a history entry is created only for the purpose you by releasing the mouse (onChange event).) "But scripts do not have this capability, I believe). Check for yourself:

myScrollbar1.onChanging=function(){
    var curItem = app.project.activeItem;
    if (curItem instanceof CompItem && curItem.selectedLayers.length>0){
        curItem.selectedLayers[0].transform.opacity.setValue(this.value);
        };
    };

Xavier.

Tags: After Effects

Similar Questions

  • Can I add a scroll bar to a frame?

    I designed my first Web site using Dreamweaver, www.dancecampeast.org and some users have said that they cannot access all the items on the left frame, which is used in the navigation bar. I guess it's because their browser windows are too small, that is to say that they are viewing on a small screen or with large text. I want to add a scroll bar on the frame to allow access to items lower on the list, how can I do? Any advice gratefully received, just don't get too complex!

    If you have just started creating Web sites and chose to use images, I'm sorry to tell you that you started opposite. Frames were widespread in the mid-1990s, but are now considered as a very poor to build Web sites. So poor that frames are removed from the next version of HTML.

    Having broken the bad news for you, you still need a way to solve your problem while deciding how to redesign your website...

    In Dreamweaver, open the Panel frames (window > frames). Select the left image in the Panel to view the properties of the image in the property inspector. Change the value of No on Auto scrolling. Save frameset and upload it to your site.

    To learn more about why you made the wrong choice with images, take a look at the following explanation: http://apptools.com/rants/framesevil.php.

  • Is it possible to add the scroll bar to a cluster of front control?

    I have a cluster control on my front.  The cluster contains many controls that I did not have enough room to display at a time. When a table contains more items is displayed, you can activate vertical or horizontal scroll bars.  This doesn't seem to be the case for cluster control.  I don't see a property of scrollbar for cluster control.  Is there a way to display one that I'm missing?  Thank you!

    As much as I know you can not display scrollbars on clusters.

    The only method I can think of that would be to show the cluster fully deployed on a secondary as a plugin and have attached an example how to do that.

    Hope that helps,

    Dave

  • image scroll bars synchronization control

    Hello, I have a LabVIEW program using the Vision I want to use several Image controls in a VI.  I would like to be able to synchronize the movements of the scroll bars.  If a user scrolls left a window, I want the other windows to also scroll to the left the same amount.  Is this possible?  I know it can be done with 2D image controls, but I would do it with a picture (not external) control.  It would also be useful to zoom in a synchronous way.

    Thank you.

    -I think we can turn the nodes property scrollbars. Let's see if someone else has an idea on the bars scrolling for an image programmatically.
    -For zoom, you can use zoom property from the control of the selected image node and write the same thing to other controls of the image.

  • Why it produces error when I add a scroll bar to a stripchart?

    I want to add a horizontal scroll bar to a chart of the band. I have create a checkbox on the Strip Panel. If it is enabled I put

     SetCtrlAttribute (psmpanelHandle, PSM_PANEL_ACHART, ATTR_STRIP_CHART_PAUSED, 1);
    

    and I use

    GetCtrlVal(psmpanelHandle,PSM_PANEL_CHECKBOX, &val);
    

    to judge if the check box is marked. And the complete code:

    //Pause the stripchart traces
    int CVICALLBACK PauseChart (int panel, int control, int event,
                    void *callbackData, int eventData1, int eventData2)
    {
            int val;
            switch (event)
            {
                    case EVENT_COMMIT:
                         SetCtrlAttribute (psmpanelHandle, PSM_PANEL_ACHART, ATTR_HISTORY_BUFFER_SIZE, 86400);
                 GetCtrlVal(psmpanelHandle,PSM_PANEL_CHECKBOX, &val);
                 if (val==TRUE)
                     SetCtrlAttribute (psmpanelHandle, PSM_PANEL_ACHART, ATTR_STRIP_CHART_PAUSED, 1);
                else
                    SetCtrlAttribute (psmpanelHandle, PSM_PANEL_ACHART, ATTR_STRIP_CHART_PAUSED, 0);
                            break;
            }
            return 0;
    }
    

    However, I could not move the scroll bar to view historical data when I stop the curve in real time of the display on the graph of the band.

    You are very likely to get this error! As you probably know, you cannot work on a panel or control, before it is loaded into memory, so you must set the attribute table in Pause1Callback or Pause2Callback using the Panel appropriate to manage.

    According to the historical graph feature, having the scroll bar is unnecessary until you fill graphic display: once it starts moving and accumulating data on the left side you can move to review its history as well as the scroll bar.

  • How to display the scroll bar horizontally and vertically with arrows

    Hello

    I have a few lines and some columns in my application. Number of columns and lines is more. To view the next column or on the next row, we need to nevigate in the respective direction (left, right, up, down). I managed to do it.

    BUT, now, I want to show with the ARROWS scroll bars. and I am not able to show them.

    Need help.

    Thanks in advance.

    Hey guys got a solution for the arrows of the horizontal scroll bar

    HorizontalFieldManager hfmScrollbar;
            hfmScrollbar=new HorizontalFieldManager(){
    
                protected void sublayout(int maxwidth,int MaxHeight){
                    setExtent(FIELD_WIDTH,20);
                }
                public void paint(Graphics g){
                    g.setColor(Color.BLACK);
                    g.drawRect(0,0,FIELD_WIDTH,20);
    
                    int lxPts[] = {5, 15, 15};
                    int lyPts[] = {10,5,15};
                    int rxPts[] = {FIELD_WIDTH-5,FIELD_WIDTH-15,FIELD_WIDTH-15};
                    int ryPts[] = {10,5,15};
                    g.drawFilledPath(lxPts, lyPts, null, null);
                    g.drawFilledPath(rxPts, ryPts, null, null);
    
                    super.paint(g);
                }
            };
    

    display vertical scroll bar code as soon as I came to it

  • Add vertical scroll bars to a content panel

    I need to use long passages of text in a fixed size content area, so I need to add a vertical scroll bar on the side. Muse support says that I have to use HTML code to do this. I'm a designer, not a coder, can someone walk me through it?

    Hi Jeff,

    I replied to your previous post, please refer to this topic:- https://forums.adobe.com/thread/1627033

    Kind regards

    Rohit Nair

  • scroll bar for control in the movie frames

    How to create a scroll bar that allows the user to move between 20 consecutive images in the film. (Each image contains a different sprite)?

    OK I will try this funny code window thing, you do not see the validation code in your message.
    It's a kind of WYSINWYG

  • HO to add a scroll bar on RichTextField

    Hello

    I developed an application where I use this type of popupScreen.

    Here I put the image, width height to the RTF, field

    I want to put vertical scrolling, for the following is the code for this:-

    txtNote_value = new RichTextField()
    {
    protected void paint (Graphics graphics)
    {
    graphics.setColor (Color.BLACK);
    graphics.setFont (graphics.getFont () .derive (Font.PLAIN, 12));
    Super.Paint (Graphics);
    Invalidate();
    }

    Protected Sub layout (int width, int height) {}
    Super.Layout (width, height);
    setExtent (255, 55);
    }

    public int getPreferredWidth() {}
    return width;
    }

    public int getPreferredHeight() {}
    return height;
    }
    };

    txtNote_value.setBackground (imgTextBg);
    txtNote_value.setEditable (true);
    txtNote_value.setMinimalWidth (imgText_bg.getWidth ());
    txtNote_value.setMargin (5.2, 0, 2);

    Can someone give me a solution to scroll the text.

    I have add this field richtext on separate vertical field, manage and set the:-VerticalFieldManager.VERTICAL_SCROLL

    but it allows to scroll the deposited text of hole I don't want that, I want to just scroll through the inner text to RTF Fiedl

    Thanks in advance

    Adjust your fillRoundRect with the scroll position settings:

    g.fillRoundRect (getHorizontalScroll () + 4, getVerticalScroll() + 1, getWidth() - 8, getHeight() - 2, 0, 0);

    Furthermore, I feel that you have lost your settings - the first two are the coordinates of the upper left corner of the rectangle, the last two are arcWidth and arcHeight. If I'm right and you inadvertently changed place, the call would look like:

    g.fillRoundRect (getHorizontalScroll (), getVerticalScroll(), getWidth() getHeight(), 4, 1);

    Good luck!

  • does anyone know how to add a scroll bar on a form for calculations that change the numerical value when you scroll left and right?

    Screen Shot 2015-06-02 at 09.42.43.pngAnyone know how to create scrollbars that way in the forms in Adobe Acrobat format?

    There is no such control in PDF Forms. You will need to develop yourself

    If you wish to have. I suggest just using a text field with keys + /

    instead. It will save you a lot of headaches...

    Tuesday, June 2, 2015 at 10:56, rorys9206745 [email protected]>

  • Scroll bar and the toolbar with "BOLD" and point to the lack of

    original title: missing Scrollbar

    How can I get my scrollbar back and also how to send mail and use "BOLD" or underscore or characteristics that they aren't there?

    Yes that may be the case. Someone else was also facing this kind of problem. I would suggest lowering the display and extract it.

  • How to add scroll bar to the field in the column of the report

    Hello again,

    I need to add a scroll bar to the field in the column of the report in my application "form.

    There is a table with columns of text and sometimes a lot of information must be filled in these areas, and thus the overview of the report becomes unreadable, because all rows have different heights according to the amount of text has been filled.

    What I want is to make all lines with the same height, and if there is more text in a field that can allow a height - a scroll bar appears so for this specific domain.
    Is it possible to do?

    Thank you in advance.

    Hello

    OK - it is important that tell you what type of report that you use like this makes a difference to what is possible!

    For interactive reports, you cannot use a CSS stylesheet in the same way with respect to normal relations. The easiest way is probably to include a complete div in your SQL statement directly. Something like:

    select      ID as "ID",
          '
    ' || "MY_BIG_FIELD" || '
    ' as "DETAILS" from TABLEX

    This will put the data in this column in the individual DIV tags, and then apply the style from the example of the Dene.

    Andy

  • force the scroll bar vertical table

    I have a control which is an array of enums. I show only a single element. LabVIEW will allow me to display a horizontal scroll bar. I need the scroll bar to be vertical to match the other controls and LEDs on the front panel. LabVIEW seems hardcoded to prevent me to display a vertical scroll bar on an array with a single element showing. frustrating.

    Now, they're just playing with me. I knew it!

    -root

    I think that there is a bug in the way the dialog box manages the selection/deselection of scroll bars that a person OR you participate on this conversation and "Send" to have a CAR # assigned.

    I don't think being able to have a vertical scroll bar on a 1 d array that is sized only for 1 item maybe not a bug, but a design by programmers of LV decision.  Perhaps because a vertical scrollbar on the controls of normal sizes such as strings and numeric values would be too small to be usable.  But for larger paintings such as a cluster, why not?  I would say that a scroll bar is more intuitive, when there is no room for it.  Generally, it looks like that elements of tables 1 d as being lines, so a vertical scroll bar would allow you to roll the lines upwards or downwards.

    Be able to use a vertical scroll bar must either be added to the CAR/report bug # for dialog box problem, or maybe, you should present the product suggestion Center as well.

    Work around a possible would be not to use the scroll bar on table, but let down your own scroll bar vertical on the FP and nodes of property allows you to set a range and value of this slider to set array shown using his property node index.  The event structure should probably be used as well to manage a change event of value on the scroll bar.

  • SCROLL BAR NOT WORKING DO NOT HP PAVILION 14 N232TU

    Hey CV,.

    I bought the new model of n232tu hp pavilion 14. I am unable to find the vertical scroll bar for my touchpad driver. I have already installed alps touch pad driver but the scroll bar does not work with this driver. Also, I installed 'synaptics driver' other models of hp, but could not get the result, so I uninstalled. Please help me with a driver or a solution

    Hello sairamteja,

    Welcome to the HP Forums!

    I understand that the scroll bar does not work. Open Control Panel, then mouse. Go to "Settings ClickPad" and then click on the option setting ClickPad.  In the window that appears, the checkbox next to 'Scroll', then click on the word 'Scrolling' and you will see an option on the right.  Click it to see additional settings and check the box against "Vertical scroll".  Click on the close button and then click on apply and Ok in the previous window.

    Please try these and let me know what happens!

    Have a wonderful day!

    Mario

  • How can I make the wider scroll bar as I could in XP?

    Under XP, I could right click on the desktop, click Properties, click the appearance tab, click on 'Advanced' and change the width of the scrollbar for all windows.  I think that I had a similar experience in Vista.  It is not available in customize, nor in the ease of access.

    A wider scroll bar allows to work with a stylus on a touch screen resistive or one easier to manipulate active digitizer.

    Hello

    Go to the control panel<>
    on the window open below that you will see appearance avancΘs...
    click it
    Here is the photo
    Concerning
    Nikhil

Maybe you are looking for

  • Impossible to uninstall TopArcadeHits extension

    I downloaded something from download.com and installed it - he eventually trigger a world of shit in my computer (malware, etc.). I think have gotten rid of it all, except for this Extension cannot be deleted Firefox called TopArcadeHits. I tried to

  • Shortcut keys no longer work after reinstallation of the System - Satellite A100-178

    I reinstalled everything and return to my laptop as it was when I got it. As always, I have installed and uninstalled the software as I always do.But my shortcut keys do not WORK. I tried everything, they don't work. They have worked before, but they

  • Extend the Windows desktop in the DISPLAY AREA?

    Cannot find or do not? Why? try using a different monitor and can not find how to switch the default monitor to a secondary monitor! Help!

  • Cannot open some files that I was sent

    I have specific emails that I can not open with Adobe or Windows.  An online search indicates they are .doc files, but can't find whatI need to open.

  • "msn stopped working" windows 7

    I have a new computer with windows 7 and you have downloaded MSN Premium, have used for years on my other machines. When I try to connect a message "msn stopped working" apperars followed by 'a problem caused blocking the program works correctly. Win