How the County onClicks button?

Can someone please tell me how to count the onClicks of a button, so that the same button

1 click = change model bg color to black.

2nd click = changes color gray bg comp.

The 3rd click =changes color white bg comp.


How can I associate with onClicks?

________________

myPanel.bgClr = myPanel.add ('button', [70,80,90,110], 'bg');  change of clr BG

myPanel.bgClr.onClick = function() {}

for black

app.project.activeItem.bgcolor = [0,0,0];

for gray

app.project.activeItem.bgcolor = [0.5,0.5,0.5];


for white

app.project.activeItem.bgcolor = [1,1,1];


}

You can create a variable count is beyond the scope of the function (if retained) and check that.

Note: You must check the activeItem is valid at the beginning of the feature click otherwise you will get an error if not.

var clickCount = 0;

myPanel.bgClr = myPanel.add ('button', [70,80,90,110], 'bg');  change of clr BG

myPanel.bgClr.onClick = function() {}

activeItem var = app.project.activeItem;

If (activeItem! = null & activeItem instanceof CompItem) {}

If (clickCount == 0) {}

for black

activeItem.bgcolor = [0,0,0];

} Else if (clickCount == 1) {}

for gray

activeItem.bgcolor = [0.5,0.5,0.5];

} else {}

for white

activeItem.bgcolor = [1,1,1];

}

clickCount ++;

If (clickCount == 3) clickCount = 0;

} else {}

Alert ("you must select a model");

}

};

Tags: After Effects

Similar Questions

  • How the States of buttons would create for MCs I create abstract MCs

    I'm creating a generic site would have MCs abstract which loading jpg or TXT fields for the user interface allow quick updates of the site. The MCs, which would make the user interface would be empty and load using XML or PHP things later. How to create buttons for the MCs user interface States.  I started to create a function for each State of the MC button, but I thought that it might be a more effective way.

    creating a table would allow it in this case?

    and URLRequest using the means of links to pages with a good flash animation film which is the site it's me?

    / * - THE BEGINNING OF MY ACTION SCRIPT-* /.

    var waywardLogo_mc:MovieClip = new MovieClip;

    var theCollection_mc:MovieClip = new MovieClip;

    var newsPage_mc:MovieClip = new MovieClip;

    var whatthe#$@!doyouwant! _mc:MovieClip = new MovieClip;

    /*---------------------------- onOver ------------------------------*/

    waywardLogo_mc.addEventListener (MouseEvent.ROLL_OVER, onOver);

    theCollection_mc.addEventListener (MouseEvent.ROLL_OVER, onOver);

    newspage_mc.addEventListener (MouseEvent.ROLL_OVER, onOver);

    Whatthe#$@!doyouwant! _mc.addEventListener (MouseEvent.ROLL_OVER, onOver);

    /*---------------------------- onOut ------------------------------*/

    waywardLogo_mc.addEventListener (MouseEvent.ROLL_OUT, onOut);

    theCollection_mc.addEventListener (MouseEvent.ROLL_OUT, onOut);

    newspage_mc.addEventListener (MouseEvent.ROLL_OUT, onOut);

    Whatthe#$@!doyouwant! _mc.addEventListener (MouseEvent.ROLL_OUT, onOut);

    /*---------------------------- onClick ------------------------------*/

    waywardLogo_mc.addEventListener (MouseEvent.CLICK, onClick);

    theCollection_mc.addEventListener (MouseEvent.CLICK, onClick);

    newspage_mc.addEventListener (MouseEvent.Click, OnClick);

    Whatthe#$@!doyouwant! _mc.addEventListener (MouseEvent.Click, OnClick);

    function onOver(event:MouseEvent):void

    {

    Event.Target.alpha =. 5;

    }

    function onOut(event:MouseEvent):void

    {

    Event.Target.alpha = 1;

    }

    function onClick(event:MouseEvent):void

    {

    event.target.URLRequest("");

    }

    / * - onover, procedure, onClick buttonModes-* /.

    waywardLogo_mc.buttonMode = true;

    theCollection_mc.buttonMode = true;

    newspage_mc.buttonMode = true;

    Whatthe#$@!doyouwant! _mc.buttonMode = true;

    Click on insert/new symbol tick movieclip, name, export of ticks for actionscript and the textfield class, enter a name (say ButtonClass) and click ok.

    Strip attached to the first frame of your new movieclip type stop() in Control Panel actions.  put any graphic you want on stage for your scene button.  create another keyframe, label it 'over' and put some graphic for button on desired state on stage.

    in a layer on top of these graphics, you probably want to add a dynamic textfield so that each button of your different text can be.  Name textfield and instance (say tf) and extend his screenplay to the last frame of your movieclip button.

    Then, when you want to create a button on your timeline that you can use:

    var b:ButtonClass = new ButtonClass();  These two lines must be entered for each button

    buttonhandlerF (b, someX, someY);

    -the code between dotted lines must only be paid once little matter how many buttons that you add.

    function buttonhandlerF (x: Number, y: Number, b:ButtonClass) {}

    b.addEventListener (MouseEvent.MOUSE_OVER, overF);

    b.addEventListener (MouseEVent.MOUSE_OUT, outF);

    b.x = x

    b.y = y

    addChild (b);

    }

    function overF(e:MouseEvent) {}

    e.currentTarget.gotoAndStop ("over");

    }

    function outF(e:MouseEvent) {}

    e.currentTarget.gotoAndStop (1);

    }

    -the code between dotted lines must only be entered only a time-

    you will also need to create a click listener and listener function

    /////////////////////////////////////////////

    the code between the dotted lines ready to be added to a class of ButtonClass.as if file want to expand your capabilities.

  • How the County table script Fund?

    Hi all

    11.2.0.3

    I want to generate the list of counties of table in this format:

    table-nameCounty
    COUNTRY100
    DEPT10
    EMP1000
    JOBS50
    JOB_HISTORY100
    LOCATIONS200
    REGIONS300

    Can you help me the sql statement please.

    Thank you

    pK

    Hello

    Petra-K wrote:

    Hi all

    11.2.0.3

    I want to generate the list of counties of table in this format:

    table-name County
    COUNTRY 100
    DEPT 10
    EMP 1000
    JOBS 50
    JOB_HISTORY 100
    LOCATIONS 200
    REGIONS 300

    Can you help me with the script please.

    Thank you

    pK

    These numbers are the number of rows in each table (in other words, the 'SELECT COUNT (*) FROM countries' output would be 100)?

    If so, and if you're happy with an account may be estimated from the last time statistics were gathered, you can do something like this:

    SELECT table_name
    num_rows
    From all_tables
    Owner WHERE = 'SCOTT '.

    ;

    If you want the exact number at run time, you need dynamic SQL statements.  Here's a way to do it:

    SELECT table_name

    , EXTRACTVALUE (XMLTYPE (dbms_xmlgen.getxml (' SELECT COUNT (*) AS num ")))

    || 'FROM ' | owner | '.' || table-name

    )

    )

    , ' / LINES/LINES/NUM.

    ) AS num_rows

    From all_tables

    Owner WHERE = 'SCOTT '.

    ;

    Whatever it is, you get results like:

    TABLE_NAME, NUM_ROWS

    ------------------------------ ----------

    DEPT                                    4

    EMP                                    14

    BONUS                                   0

    SALGRADE 5

  • How the code 2 buttons with mouse events

    I'm trying to code two buttons, both with the mouse to the bottom of the events, but to perform different functions. When I coded the script, I got the following error message:

    1021: duplicate function definition.

    Use different function names.

  • How to remove the Firefox orange button at the top left of the screen

    How remove Firefox orange button at the top left of the screen, it is a serious obstacle to my impulsive reflex hit "File" at the top left of the screen. Is throwing me off the coast of the big time, but also another source of frustration {absent these new version basic navigation features would be the first temporary fixed through 'extension' but until the next version makes it no longer work} [is not a plugin or the Correction-nazis will flood this thread!]

    So, how do you remove this huge blazing orange block with the label at the top left of the screen?

    I tried to ask this question in another thread, but apparently working away from home for more than one month is the once unthinkable and a sign of decline. This thread is now "archived" and here-car, locked. So I have to make a new thread to ask this again.

    A large number of text for a simple problem, but as I've learned since the update de.28 or other, nothing to do with Mozilla is simple. Especially the navigation and functionality. I have yet to wrap my brain around the fact that they slaughtered this program so much in so little time. If java and SWF plugins continued to work on the former, I would have NEVER updated!

    The community is much too complacent on these MAJOR issues.

    I think that I fixed it by changing the theme to default to something ugly, then return to default... Box orange GONE!

    Thank you for your time and patience.

  • I found the show/hide button toolbars, but you should know how to REMOVE toolbars that appear on this list?

    I found the show/hide button toolbars, but you should know how to REMOVE toolbars that appear on this list?

    Is attached a screenshot of my screen with the context menu to show/hide tabs. I want to delete some of them and let others. Please help me to know how. Thank you!

    Hmm, maybe this "one-time" imported into the new preference? Try this:

    (1) in a new tab, type or paste Subject: config in the address bar and press ENTER. Click on the button promising to be careful.

    (2) in the search above the list box, type or paste the cust and make a pause so that the list is filtered

    (3) double-click the preference of browser.uiCustomization.state and the content must be highlighted in a small dialog box.

    (4) copy the whole line and paste it into Notepad and save it as a backup.

    (5) in Firefox, click on the button '3-bar' menu > developer > Notepad. Remove the comment that appears and paste data preferably, that must appear on a long line. Click on the "Pretty Print" button to make it more readable.

    So I hope that you can spot the extra toolbars and change them out, taking care to preserve the commas between the elements.

    I don't have the extra toolbars in mine, but I copied and pasted back this spaced format and Firefox was able to handle it well. I went into customize and moved a button, and when I left, Firefox has rewritten the preference set as a single line. Assuming that yours works fine, then you can get rid of the backup from step (4).

  • How do we uninstall the Pinterest Pin button it?

    I hate the new pin button that puts "pin" on every dead thing I do. I'm changing my blog, and PIN IT appears on each photo! whenever I scroll over it. I want to get rid of this and get back by pinning just what I want, when I want, which isn't often. Does anyone know how to get rid of the pine this button?

    I think she may be generated by an extension. Check page modules. Either:

    • Command + shift + a
    • "3-bar" menu button (or tools) > Add-ons

    In the left column, click Extensions. Something Pinterest, you can disable or delete here?

  • How to restore the refresh/stop button?

    I have my perfectly configured browser buttons I would like it. I don't need someone to another deletion or moving them where they feel they are in a better place.

    How to restore the refresh/stop button? Yes, I update it in the address bar. I want it on the left, next to the button at home where he has been for 10 years.

    Chrome allows me to set the button where I want. The latest version of Firefox did too.

    Thank you. It works almost, installation of two plugins to restore my settings to normal. Unfortunately, my understanding of button is:

    Back/Forward. Home page | Refresh/Stop

    and has been for a long time. I can't move the previous/next buttons. If my muscle memory is defined, and every time I hit the back button, I have to stop and think that it is now.

    It's the same thing that I don't like IE.

    Consider me a convert to Chrome, guys. Now I have to remember to click on the eye of the Rainbow and not the orange Fox - but at least I only will once per day.

  • How to get rid of the new menu button on the right side of the toolbar

    Honestly, I don't know why the developers cannot offer new features that we can use or not, by choice. Instead, things are forced upon us.

    Could someone tell me please how to get rid of the new menu button on the right side of the toolbar?

    It doesn't seem to be an option to remove via the Customize Toolbars window.

    Thank you very much.

    CTR extension makes Firefox customizable menu button 3 bar, so you can drag this button in the palette to customize to remove it from the Navigation toolbar.

    Reload and stop probably combine only if you set the two buttons in the correct order (reload - Stop and non-Stop - Reload)

  • How the LOGOUT button to reload?

    WHY did you would anchor the reload/stop button. Now we cannot move. I've heard too many users has moved then forgot where she was. I can see how that creates headaches of support for you.

    Anchor it at, less outside the URL field and beside the forward/back arrows. It creates a horrible usability issue. simply not friendly to completely cross the URL field. There must be a better solution than it dumbing down to the level of skill of the lowest user and just docking it.

    And there must be a solution of customization for users who know what they are doing. Please, I beg you. Someone.

    As far as I know, the Restorer of classic theme Add on is the only way to move the button reload outside the address bar.

    1. Classic restaurateur theme installation and restart Firefox when prompted.
    2. Open the modules (Ctrl + Shift + A Manager; Mac: Command + shift + A), then the Extensions category.
    3. Beside the classical restaurant theme, click on the Options button.
    4. On the main tab, make sure that 'Mobile back-forward button' and 'hide urlbars stop & reload buttons' is checked. You can also check "combine stop & reload buttons.
    5. Right-click on a zone empty of the tab bar and select Customize.
    6. Do slide forward/backward buttons, Stop and reload on the navigation toolbar.
    7. Click the Customize the output at the bottom right button when finished.

    That being said, I must point out that you can reload pages in other ways.

    • Make a right click No matter what tab and choose reload.
    • Right click on a box empty page and choose reload.
    • Press F5.
    • Press Ctrl + R.
  • How to move the 'new tab' button on one side of the screen to the other

    A settings file had somehow end up corrupt and have reconstitute default Firefox and start over with my custom toolbars. Only problem, is that the 'New tab' button wants to ONLY go to the LEFT of the tab bar. Will not be on the side RIGHT of it as it was before default. Want this back. Someone knows how to put this topic: config or what? I continue to seek my new tab on the right button and get irritated that it is on the left instead. Customize the will, not that it is placed on the right. Dragging it puts it on another toolbar, it falls on the left of the screen when you mouse on the right, or does nothing and quite the icon disappear toward the window customize.

    Well... scrap that...

    Make a toolbar missing and decided to add a few "separators" at the tab bar and all of a sudden he allows her to stay on the right side. Just carried away the separators and it actually moved where I wanted him to be. If I thought who could more quickly, have saved post here. At least it works now so do not bother it. * shrug *.

  • How to restore the new tab button in the navigation menu when it is not available in the Customize?

    The new tab button disappeared from my navigation menu. None of the changes or upgrades have been made. While all subjects of support suggest going to customize the toolbar, the new tab button is gone either. There in the morning, disappeared in the evening without apparent reason. The + is at the end of the series of tabs, but not in the navigation toolbar and tab add + is NOT anywhere on a page it there is that a single label. I HIDE TAB BAR WITH ONE TAB 1.1 but have had for weeks, and the new tab button was always there. How to restore the button tab on the Navigation bar if it is not available in the choice to customize the toolbar?

    Don't you see the new tab button on the tab bar if you open the window customize?

    If you do not see an item on a toolbar in the toolbar palette and then click the button "Restore default" to restore the default toolbar configuration

    You can check the problems caused by a corrupt localstore.rdf file and try to delete this file.

  • How can I remove the 'Subscribe now' button and the topic when you see an RSS feed?

    How can I remove the 'Subscribe now' button and the topic when you see an RSS feed?

    It is a yellow box that appears at the top of the page. It has options to subscribe to the RSS feed displayed.

    How can I remove this whole box to display?

    Thank you
    ~ Michel

    Make sure that the userContent.css file is a CSS (cascading style sheet) file and is not a hidden .txt file extension.

    You can use this button to go to the Firefox profile folder:

    • Help > troubleshooting information > profile directory: see file
  • How to add the 'new tab' button next to the last tab?... I use version 9.0.1. and they are missing and I can't find how to add.

    I got the new tab next to open tabs button, but with a recent update of Firefox, the tab button disappeared. Went through all the help points, but how do I add the new Help tab is not listed. The only way to open a new tab is manually using the buttons on windows/t or opening the file and choosing the new tab.

    Hello

    It could be that he is hidden behind another icon. Please try this: right click on the empty space after the last tab and Customize.... With the mini window open, you can move the other toolbars and icons to check if the new tab button is hidden. You can also check inside the mini window customize the icon named new tab or click Restore Default Set that will be hopefully restore back. Please note that if nothing is uninstalled or disabled when you click on restore by default, you will have to redo all changes to manual/personal toolbar.

    Customize toolbars

  • When I click on the 'New tab' button, or try to open a new tab in the Menu "File Pull Down", a new tab will not open. How can I fix it?

    I can't open new tabs. The new tab button, new tab in the file menu option and the new tab option when I right click on the tab all do not work. It started when I updated Firefox yesterday. It becomes annoying when you try to work with several tabs open. How can I fix?

    Try to uninstall the Ask toolbar and it should work again. There is a compatibility issue with the Ask toolbar and the current version of Firefox.

Maybe you are looking for