# Can this work from one button

**URL:** <https://forum.kirupa.com/t/can-this-work-from-one-button/181986>\
**Category:** Uncategorized\
**Created:** [March 14, 2006, 6:52pm UTC](https://forum.kirupa.com/t/can-this-work-from-one-button/181986 "2006-03-14T18:52:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gh\_](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@gh\_](https://forum.kirupa.com/u/gh_)\
**Post date:** [March 14, 2006, 6:52pm UTC](https://forum.kirupa.com/t/can-this-work-from-one-button/181986/1 "2006-03-14T18:52:25Z")

</div>

I am trying to use a button on stage to load a swf and then on subsequent presses, advance to next frame.  
The movie loads, but on subsequent presses, it either reloads the movie, or replays the 1st frame.  
So I believe the 1st Two lines work, but the rest?  
or shpuld I go about this a different way? Suggestions?  
Attach Code

on (press) {  
this.\_parent.picLoader.loadMovie(“show\_01.swf”,“picLoader”);  
if (this.\_parent.picLoader.show\_01.swf.\_currentframe == this.\_parent.picLoader.show\_01.swf.\_totalframes) {  
this.\_parent.picLoader.show\_01.swf.gotoAndStop(3);  
} else {  
this.\_parent.picLoader.show\_01.swf.nextFrame();

}

}
