# Questions about flipping in art

**URL:** https://forum.makecode.com/t/questions-about-flipping-in-art/1890
**Category:** Arcade
**Created:** [April 30, 2020, 2:54pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890 "2020-04-30T14:54:13Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![Blobiy](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Blobiy](https://forum.makecode.com/u/Blobiy)
#### Post date: [April 30, 2020, 2:54pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/1 "2020-04-30T14:54:13Z")

</div>

Hello again, sry i have not been active.  
Ok, so this has been VERY annoying for a while and i need this fixed.  
can we have a “flip” for the sprites, and if not can we at least have it in the art thing, because i have to select each part and flip it as of now and its very annoying. a “flip” button should not effect the code but make it SOO much easier to do animations.

also i kinda need help w/ a attacking anim, so i want it so if you press (a) then it runs the full animations, how? heres the link  
[THE LINK](https://makecode.com/_V92RXDU9cbwy)  
plz don’t question the name, i was making it to help a friend, but i made fun of him by naming it exactly what he said.

Thanks as always

- Blobiy

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [April 30, 2020, 3:02pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/2 "2020-04-30T15:02:54Z")

</div>

Well, if you are using the old animation API, (which I personally am fond of) you can copy the function code for another animation but flip the image. There is a function in the image section under advanced.

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/e2fe07c46822aca3267291532dd967088f1a0732.png)

Which results in this:

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/86fba265bd4748fcfea1dc60f03e4ffeb8f269a9.png)

BTW, I love the sword animation!

But yes, I think they should add a flip button in the sprite/image editor. That would save memory on the Arcade.

---

<div class="post-metadata">

### Author: ![Blobiy](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Blobiy](https://forum.makecode.com/u/Blobiy)
#### Post date: [April 30, 2020, 3:06pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/3 "2020-04-30T15:06:13Z")

</div>

Thx i did not think of that, but do you know how i can make it run the full animation? like ou press (a) and it runs the full sword anim?

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [April 30, 2020, 3:07pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/4 "2020-04-30T15:07:33Z")

</div>

The right sword animation does work though. I don’t understand what you are saying, but if you don’t want the animation to loop, you are going to have to use the new API.

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [April 30, 2020, 3:13pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/5 "2020-04-30T15:13:48Z")

</div>

This might be a bug but whenever I try to copy and paste a block the editor freezes and I have to force reload the page in your game. I am editing it right now.

Maybe it’s because I have more than one tab of makecode arcade open now??

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [April 30, 2020, 3:22pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/6 "2020-04-30T15:22:17Z")

</div>

> **[Pojo cat thing whatever](https://arcade.makecode.com/77750-07938-46475-44019)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

  
Will this work?  
 ![arcade-Pojo-cat-thing-whatever](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/3952156be1c05ff76cda1fd2cf174d18dbcbd945.png)

---

<div class="post-metadata">

### Author: ![Blobiy](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Blobiy](https://forum.makecode.com/u/Blobiy)
#### Post date: [April 30, 2020, 3:25pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/7 "2020-04-30T15:25:58Z")

</div>

Yes but no. your design does work, but can you also make it so if the (a) button is pressed it runs the whole animation even if (a) is let go?  
Thanks  
-Blobiy

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [April 30, 2020, 3:38pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/8 "2020-04-30T15:38:07Z")

</div>

How about this:

> **[Pojo cat thing whatever](https://arcade.makecode.com/32022-76791-81619-78285)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

  
 ![arcade-Pojo-cat-thing-whatever (1)](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/f64f917b3e9a7106c468f7289d665f6263a4648b.png)

One press of A = One swipe of the sword.

---

<div class="post-metadata">

### Author: ![Blobiy](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Blobiy](https://forum.makecode.com/u/Blobiy)
#### Post date: [April 30, 2020, 6:20pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/9 "2020-04-30T18:20:07Z")

</div>

yeah it works sry i should have said that. but its kinda weird, the anim starts at the end somtimes

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [April 30, 2020, 10:40pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/10 "2020-04-30T22:40:32Z")

</div>

I know right?

I think it is because my code - it waits 315 milliseconds (the time of your animation) and resets it back to normal. I think maybe the 315 isn’t the most accurate?

---

<div class="post-metadata">

### Author: ![Blobiy](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Blobiy](https://forum.makecode.com/u/Blobiy)
#### Post date: [May 4, 2020, 8:01pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/11 "2020-05-04T20:01:57Z")

</div>

idk, btw @peli @richard @jwunderl, do any of you have/ know a solution to this?

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [May 4, 2020, 9:25pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/12 "2020-05-04T21:25:57Z")

</div>

This is a limitation of the “attach animation” blocks; they keep the current frame in between runs so they don’t reset each time. I’d recommend using the “play animation” blocks instead, they will always start from the beginning. You could also recreate the animation each time which should also fix the issue.

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [May 6, 2020, 5:42pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/13 "2020-05-06T17:42:42Z")

</div>

So that means you would have to switch to the new animation api.

But I don’t think any of us want to move the animation frames into a animation block.  
Unless you switched to JavaScript mode and copied the arrays themselves, because I think animation blocks are just an array of images right? Correct me if I’m wrong.

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [May 6, 2020, 5:56pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/14 "2020-05-06T17:56:22Z")

</div>

Correct! You can just move the frames into an array and use that. You can also use that trick to flip animations: first use the animation editor, assign it to a variable, clone all the images into a new array and flip them

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [May 6, 2020, 5:57pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/15 "2020-05-06T17:57:03Z")

</div>

To clarify, you don’t need to go to JavaScript, you can put an array directly into the animation blocks

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [May 6, 2020, 6:04pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/16 "2020-05-06T18:04:40Z")

</div>

So:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/5796548e04ea527024c3e5bea3111174b76b09eb.png)

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [May 6, 2020, 6:28pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/17 "2020-05-06T18:28:33Z")

</div>

Yes, exactly!

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [May 6, 2020, 6:29pm UTC](https://forum.makecode.com/t/questions-about-flipping-in-art/1890/18 "2020-05-06T18:29:46Z")

</div>

OMG, this is going to be fun 😄
