# Loading a series of JPEG's

**URL:** <https://forum.kirupa.com/t/loading-a-series-of-jpegs/257791>\
**Category:** flash\
**Created:** [April 17, 2008, 4:14am UTC](https://forum.kirupa.com/t/loading-a-series-of-jpegs/257791 "2008-04-17T04:14:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeoDreamer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@NeoDreamer](https://forum.kirupa.com/u/NeoDreamer)\
**Post date:** [April 17, 2008, 4:14am UTC](https://forum.kirupa.com/t/loading-a-series-of-jpegs/257791/1 "2008-04-17T04:14:24Z")

</div>

I have a series of JPEG’s labeled frame1.jpeg, frame2.jpeg, and so on… I want to play them sequentially as a movie. Earlier, I had success loading a single frame, but now I have trouble loading all the frames one by one.

```php

_root.createEmptyMovieClip("screen", 1);
_root.i = 1;

screen.onEnterFrame = function() {
	loadMovie("frame" + _root.i + ".jpeg", "screen");
	trace(_root.i);
}

```

It only loads the first frame and stops. :h: And I also have a feeling that this won’t work even after I get \_root.i to update on every frame. I tried just brute force and it didn’t work. Nothing was displayed:

```php

// on frame 1
_root.createEmptyMovieClip("screen", 1);

// on frame 2
loadMovie("frame1.jpeg", "screen");

// on frame 3
loadMovie("frame2.jpeg", "screen");

// etc..

```
