# Rewind External SWF file

**URL:** <https://forum.kirupa.com/t/rewind-external-swf-file/257777>\
**Category:** flash\
**Created:** [April 17, 2008, 12:31am UTC](https://forum.kirupa.com/t/rewind-external-swf-file/257777 "2008-04-17T00:31:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dave19](https://avatars.discourse-cdn.com/v4/letter/d/d26b3c/32.png) [@dave19](https://forum.kirupa.com/u/dave19)\
**Post date:** [April 17, 2008, 12:31am UTC](https://forum.kirupa.com/t/rewind-external-swf-file/257777/1 "2008-04-17T00:31:05Z")

</div>

I’ve create a flash file that when u click a button it imports an external swf file into content movie clip.

Does anybody know how to create a button within the main swf file that can rewind the external file?

I’ve tried using the code below, but it just rewinds through the whole swf file.

on (release) {MovieClip.prototype.playF = function(m, n, fps) {  
function playF2(mc) {  
if (mc.m\<mc.n) {  
mc.nextFrame();  
} else {  
mc.prevFrame();  
}  
if (mc.\_currentframe == mc.n) {  
clearInterval(mc.int);  
}  
updateAfterEvent();  
}  
this.m = m;  
this.n = n;  
this.fps = fps;  
this.gotoAndStop(this.m);  
clearInterval(this.int);  
this.int = setInterval(playF2, 1000/this.fps, this);  
};  
MovieClip.prototype.stopF = function() {  
clearInterval(this.int);  
};

//----------------------- don’t change anything above this line -------------------------

// to rewind from the current frame to frame 1 at 25 fps:

\_root.playF(\_root.content,20,5);  
}

Thanks
