# Rewinding when using a document class

**URL:** <https://forum.kirupa.com/t/rewinding-when-using-a-document-class/257927>\
**Category:** flash\
**Created:** [April 18, 2008, 1:37pm UTC](https://forum.kirupa.com/t/rewinding-when-using-a-document-class/257927 "2008-04-18T13:37:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anroy](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@anroy](https://forum.kirupa.com/u/anroy)\
**Post date:** [April 18, 2008, 1:37pm UTC](https://forum.kirupa.com/t/rewinding-when-using-a-document-class/257927/1 "2008-04-18T13:37:48Z")

</div>

Hi, I’m new here, and new to Flash.

I am a very experienced programmer, however (OOP using C++), and have readily taken to Actionscript 3.0.

I am making a series of jigsaw puzzles. After the user has successfully dragged all the pieces to their correct places an “congratulations” animation plays.

My code is completely object-oriented, with a document class (DocClass) and a piece class (PieceClass, sub-classed from MovieClip) that is the base class for the pieces. I have no Actionscript in frame 1 and all the user interaction happens there.

The “congratulations” animation starts in frame 2 (after the puzzle is done I do gotoAndPlay(2) ) and goes on for a long time, maybe 50 to 100 frames depending on what we do. I found it was looping back to the beginning, so I placed an action in the last frame, simply a stop() command. This worked fine.

I notice that right-clicking on the movie there is the “Rewind” option. I know the movie can be exported without this but if I would like to support it.

My question is this, upon Rewind to what state does the system revert to? Does all the logic go back to frame 1? What exactly _is_ frame 1 (or any frame for that matter) in terms of the document class? Does rewinding cause the document class’s constructor to run again?

Any help appreciated. Thanks!
