# Button blink or return to zero frame after click

**URL:** <https://iplug2.discourse.group/t/button-blink-or-return-to-zero-frame-after-click/494>\
**Category:** Made with iPlug2\
**Created:** [26 October 2021 12:49 UTC](https://iplug2.discourse.group/t/button-blink-or-return-to-zero-frame-after-click/494 "2021-10-26T12:49:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SKyZz](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@SKyZz](https://iplug2.discourse.group/u/SKyZz)\
**Post date:** [26 October 2021 12:49 UTC](https://iplug2.discourse.group/t/button-blink-or-return-to-zero-frame-after-click/494/1 "2021-10-26T12:49:22Z")

</div>

```auto
              // kSwitch_N = 6;
             bitmap = pGraphics->LoadBitmap(BTN_FN, kSwitch_N);
             IBButtonControl* left = new IBButtonControl(kX, kY, bitmap, [&](IControl* pCaller) {
                 ...
               });

```

List of frames:

A - on  
B - off and etc  
B  
B  
B  
A - on

I’m trying to make the button blink when pressed. Who has any ideas?

/\*\* Load a bitmap image from disk or from windows resource :

- @param fileNameOrResID CString file name or resource ID
- @param nStates The number of states/frames in a multi-frame stacked bitmap
- @param framesAreHorizontal Set \c true if the frames in a bitmap are stacked horizontally
- @param targetScale Set \c to a number \> 0 to explicity load e.g. an @2x.png
- @return An IBitmap representing the image \*/
