# Referring to Sprites iteratively

**URL:** <https://community.thunkable.com/t/referring-to-sprites-iteratively/564083>\
**Category:** Questions about Thunkable X\
**Created:** [April 25, 2020, 5:37pm UTC](https://community.thunkable.com/t/referring-to-sprites-iteratively/564083 "2020-04-25T17:37:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DouglasRussell](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@DouglasRussell](https://community.thunkable.com/u/DouglasRussell)\
**Post date:** [April 25, 2020, 5:37pm UTC](https://community.thunkable.com/t/referring-to-sprites-iteratively/564083/1 "2020-04-25T17:37:56Z")

</div>

Hi guys. I’m trying to store multiple sprites’ positions in a firebase database. I’m trying to minimize the number of blocks I’m using. My sprites are names “Sprite1” through “Sprite48” so I’m looping through 48 times and changing the name in the sprite x and sprite y block on the fly. Below is my current block:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/2/e23f7c4265b58c4cc891e360e2e0015e71d41f87.png)

Unfortunately, the sprites don’t accept being referred to in an iterative manner. Any suggestions?  
Thanks,

Doug

---

<div class="post-metadata">

**Author:** ![paulmw](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@paulmw](https://community.thunkable.com/u/paulmw)\
**Post date:** [April 25, 2020, 8:36pm UTC](https://community.thunkable.com/t/referring-to-sprites-iteratively/564083/2 "2020-04-25T20:36:46Z")

</div>

Hmm…that’s a bug on our end (might be a bit before it gets fixed though). For now you can use the “all sprites in” block.

[https://x.thunkable.com/copy/bc90301eb676d70d905dae4ecb43cb30](https://x.thunkable.com/copy/bc90301eb676d70d905dae4ecb43cb30)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/d/adb4109fe42bba071d6deb7bd2b9bca60224c5ad.png)

---

<div class="post-metadata">

**Author:** ![DouglasRussell](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@DouglasRussell](https://community.thunkable.com/u/DouglasRussell)\
**Post date:** [April 25, 2020, 8:37pm UTC](https://community.thunkable.com/t/referring-to-sprites-iteratively/564083/3 "2020-04-25T20:37:47Z")

</div>

Thanks Paul. I’ll give that a shot!

Doug

---

<div class="post-metadata">

**Author:** ![DouglasRussell](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@DouglasRussell](https://community.thunkable.com/u/DouglasRussell)\
**Post date:** [April 27, 2020, 2:28pm UTC](https://community.thunkable.com/t/referring-to-sprites-iteratively/564083/4 "2020-04-27T14:28:55Z")

</div>

@paulmw that did the trick! Here’s my block. Saves the sprites iteratively no problem!  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/2/024f66c9d0056ad725d671db36acec94a80b83a1.png)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:31am UTC](https://community.thunkable.com/t/referring-to-sprites-iteratively/564083/5 "2024-11-08T11:31:49Z")

</div>


