# Reading the contents of a specific frame inside a movieclip using ByteArray

**URL:** <https://forum.kirupa.com/t/reading-the-contents-of-a-specific-frame-inside-a-movieclip-using-bytearray/265810>\
**Category:** flash\
**Created:** [July 12, 2008, 8:50pm UTC](https://forum.kirupa.com/t/reading-the-contents-of-a-specific-frame-inside-a-movieclip-using-bytearray/265810 "2008-07-12T20:50:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![flashdeva](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@flashdeva](https://forum.kirupa.com/u/flashdeva)\
**Post date:** [July 12, 2008, 8:50pm UTC](https://forum.kirupa.com/t/reading-the-contents-of-a-specific-frame-inside-a-movieclip-using-bytearray/265810/1 "2008-07-12T20:50:53Z")

</div>

Is it possible to Read the contents of a specific frame (all the display objects in a frame) inside a movieclip using ByteArray?

---

<div class="post-metadata">

**Author:** ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)\
**Post date:** [July 12, 2008, 11:12pm UTC](https://forum.kirupa.com/t/reading-the-contents-of-a-specific-frame-inside-a-movieclip-using-bytearray/265810/2 "2008-07-12T23:12:53Z")

</div>

not really, no. You could technically serialize a display list (in a bytearray) but only if in the current frame, not an arbitrary one.

---

<div class="post-metadata">

**Author:** ![flashdeva](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@flashdeva](https://forum.kirupa.com/u/flashdeva)\
**Post date:** [July 13, 2008, 2:42am UTC](https://forum.kirupa.com/t/reading-the-contents-of-a-specific-frame-inside-a-movieclip-using-bytearray/265810/3 "2008-07-13T02:42:35Z")

</div>

> [@senocular;2357654](#):
>
> not really, no. You could technically serialize a display list (in a bytearray) but only if in the current frame, not an arbitrary one.

Thanks a lot for your reply Senocular. That’s exactly what i want to do. So, i instruct the playhead to goto a frame and stop there. Now being in this current frame can i grab all the contents ( the display objects) and then add them to a sprite using bytearray. I really donot want to do this for an arbitrary frame. How to serialize a display list to a bytearray? Please tell me how to go about doing this.

---

<div class="post-metadata">

**Author:** ![flashdeva](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@flashdeva](https://forum.kirupa.com/u/flashdeva)\
**Post date:** [July 14, 2008, 2:31am UTC](https://forum.kirupa.com/t/reading-the-contents-of-a-specific-frame-inside-a-movieclip-using-bytearray/265810/4 "2008-07-14T02:31:01Z")

</div>

So pls tell me if there is a way to serialize a display list of a currentframe of a movieclip to a bytearray?

---

<div class="post-metadata">

**Author:** ![flashdeva](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@flashdeva](https://forum.kirupa.com/u/flashdeva)\
**Post date:** [July 14, 2008, 12:56pm UTC](https://forum.kirupa.com/t/reading-the-contents-of-a-specific-frame-inside-a-movieclip-using-bytearray/265810/5 "2008-07-14T12:56:09Z")

</div>

Hi Senocular,

Can you pls tell me how to go about this.

---

<div class="post-metadata">

**Author:** ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)\
**Post date:** [July 14, 2008, 2:54pm UTC](https://forum.kirupa.com/t/reading-the-contents-of-a-specific-frame-inside-a-movieclip-using-bytearray/265810/6 "2008-07-14T14:54:00Z")

</div>

ByteArray.writeObject is the API but depending on what you need it for, it might not do any good since I don’t think DisplayObjects are completely serialized. In fact you’d probably have to walk the display tree yourself to get each object in it.

---

<div class="post-metadata">

**Author:** ![flashdeva](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@flashdeva](https://forum.kirupa.com/u/flashdeva)\
**Post date:** [July 15, 2008, 7:17am UTC](https://forum.kirupa.com/t/reading-the-contents-of-a-specific-frame-inside-a-movieclip-using-bytearray/265810/7 "2008-07-15T07:17:07Z")

</div>

Thanks a lot Senocular for your reply. I shall traverse the display list and access the display objects and serialize them in a bytearray.
