# Actionscript for button to play video

**URL:** <https://forum.kirupa.com/t/actionscript-for-button-to-play-video/181808>\
**Category:** Uncategorized\
**Created:** [March 13, 2006, 9:34am UTC](https://forum.kirupa.com/t/actionscript-for-button-to-play-video/181808 "2006-03-13T09:34:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mstein78](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@mstein78](https://forum.kirupa.com/u/mstein78)\
**Post date:** [March 13, 2006, 9:34am UTC](https://forum.kirupa.com/t/actionscript-for-button-to-play-video/181808/1 "2006-03-13T09:34:53Z")

</div>

Hi  
I have a swf that im loading into a movie clip. the swf is a video with buttons for play, stop, fastforward and rewind.  
I have the actionscript right for all of these functions.  
But here is my problem.  
My script for the play button restarts the video wherever it was stopped - so on restart it does not play any audio (i assume because the audio is embedded in the first frame of the video mc.

any idea on how to modify this script to get the play button to jump to the beginning of the moive - so it plays with audio…  
or idealy to have the audio resume with the video from the point the video was stopped.

the action script im using is below.  
Thanks !!

actionscript on video movie clip is as follows:

onClipEvent (enterFrame) {  
if (\_root.ffwd == true) {  
frame = this.\_currentframe +5  
this.gotoAndPlay (frame);  
}  
if (\_root.frwd == true) {  
frame = this.\_currentframe -5  
this.gotoAndPlay (frame);  
}  
if (\_root.stop1 == false) {  
frame = this.\_currentframe  
this.gotoAndPlay (frame);  
}  
if (\_root.stop1 == true) {  
frame = this.\_currentframe  
this.gotoAndStop (frame);  
}  
}

action script for play button is:

on (release) {  
\_root.stop1 = false;  
}
