# MovieClip frames to sprite

**URL:** <https://forum.kirupa.com/t/movieclip-frames-to-sprite/264592>\
**Category:** flash\
**Created:** [June 27, 2008, 3:16pm UTC](https://forum.kirupa.com/t/movieclip-frames-to-sprite/264592 "2008-06-27T15:16:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yikulju](https://avatars.discourse-cdn.com/v4/letter/y/e68b1a/32.png) [@Yikulju](https://forum.kirupa.com/u/Yikulju)\
**Post date:** [June 27, 2008, 3:16pm UTC](https://forum.kirupa.com/t/movieclip-frames-to-sprite/264592/1 "2008-06-27T15:16:23Z")

</div>

Hi All,

I have a MovieClip that consists of 10 frames which are pages of a book.  
I’d like to lay out the frames into the screen to see all of them.

Firstly, I thought that converting every frame to a sprite is a good idea but I couldn’t make it.

Second, I tried to clone the MovieClip, but it also seems nightmare.

Do you have any idea?

Regards,  
Viktor

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [June 27, 2008, 3:34pm UTC](https://forum.kirupa.com/t/movieclip-frames-to-sprite/264592/2 "2008-06-27T15:34:29Z")

</div>

I guess easiest solution would be something like

```auto

for (var i:int = 1;i<11;i++) {
  var m:ClassName = new ClassName();
  addChild(m);
  m.gotoAndStop(i); 
  m.x = 45*i;
}

```

---

<div class="post-metadata">

**Author:** ![Yikulju](https://avatars.discourse-cdn.com/v4/letter/y/e68b1a/32.png) [@Yikulju](https://forum.kirupa.com/u/Yikulju)\
**Post date:** [June 27, 2008, 9:30pm UTC](https://forum.kirupa.com/t/movieclip-frames-to-sprite/264592/3 "2008-06-27T21:30:04Z")

</div>

Thanks the quick reply,

the problem is that this swf comes from a server that accomplishes the pdf 2 swf transformation  
it means that we have only one instance of this movieclip embedded in the swf and got it through the urlloader’s data.

[quote=sekasi;2350228]I guess easiest solution would be something like  
ActionScript Code:  
[LEFT][COLOR=#0000FF]for[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#000000] **var** [/COLOR] i:[COLOR=#0000FF]int[/COLOR] = [COLOR=#000080]1[/COLOR];i\<[COLOR=#000080]11[/COLOR];i++[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]  
[COLOR=#000000] **var** [/COLOR] m:ClassName = [COLOR=#000000] **new** [/COLOR] ClassNameCOLOR=#000000[/COLOR];  
addChildCOLOR=#000000[/COLOR];  
m.[COLOR=#0000FF]gotoAndStop[/COLOR]COLOR=#000000[/COLOR];  
m.[COLOR=#000080]x[/COLOR] = [COLOR=#000080]45[/COLOR]\*i;  
[COLOR=#000000]}[/COLOR]  
[/LEFT]

[/quote]

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [June 27, 2008, 10:01pm UTC](https://forum.kirupa.com/t/movieclip-frames-to-sprite/264592/4 "2008-06-27T22:01:33Z")

</div>

> **[ActionScript 3 Tip of the Day - Page 12](https://www.kirupa.com/forum/showthread.php?p=1939827&highlight=duplicate)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

---

<div class="post-metadata">

**Author:** ![Yikulju](https://avatars.discourse-cdn.com/v4/letter/y/e68b1a/32.png) [@Yikulju](https://forum.kirupa.com/u/Yikulju)\
**Post date:** [July 10, 2008, 6:04pm UTC](https://forum.kirupa.com/t/movieclip-frames-to-sprite/264592/5 "2008-07-10T18:04:09Z")

</div>

thanks, it works
