# The constructor Gif(bodycreate.Particle, String) is undefined

**URL:** <https://discourse.processing.org/t/the-constructor-gif-bodycreate-particle-string-is-undefined/25719>\
**Category:** Libraries\
**Created:** [November 26, 2020, 2:53am UTC](https://discourse.processing.org/t/the-constructor-gif-bodycreate-particle-string-is-undefined/25719 "2020-11-26T02:53:37Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [December 1, 2020, 3:45pm UTC](https://discourse.processing.org/t/the-constructor-gif-bodycreate-particle-string-is-undefined/25719/6 "2020-12-01T15:45:39Z")

</div>

> [@AbleYudada](#):
>
> , I want to create an array of unknown number to store gifs,

Don’t you know how many GIF files you’re gonna use for your sketch? 😶

You can use **listPaths()** and search for “.gif” extension files: 📂

> [@File Listing Order](https://discourse.processing.org/t/file-listing-order/7148/41):
>
> [Docs.Oracle.com/en/java/javase/11/docs/api/java.base/java/util/Arrays.html#sort(java.lang.Object[])](http://Docs.Oracle.com/en/java/javase/11/docs/api/java.base/java/util/Arrays.html#sort(java.lang.Object%5B%5D)) static final String PICS\_EXTS = "extensions=,png,jpg,jpeg,gif,tif,tiff,tga,bmp,wbmp"; static final float FPS = .25; PImage[] images; void setup() { size(1200, 600); frameRate(FPS); imageMode(CENTER); final File dir = dataFile(""); println(dir); String[] imagePaths = {}; int imagesFound = 0; if (dir.isDirectory()) { imagePaths = listPaths(dir.getPath(), "files", "recursi…

---

_[View the full topic](https://discourse.processing.org/t/the-constructor-gif-bodycreate-particle-string-is-undefined/25719)._
