# Need help with changing actionscript please

**URL:** https://forum.kirupa.com/t/need-help-with-changing-actionscript-please/295742
**Category:** flash
**Created:** [September 3, 2009, 5:26pm UTC](https://forum.kirupa.com/t/need-help-with-changing-actionscript-please/295742 "2009-09-03T17:26:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![vcugreg](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@vcugreg](https://forum.kirupa.com/u/vcugreg)
#### Post date: [September 3, 2009, 5:26pm UTC](https://forum.kirupa.com/t/need-help-with-changing-actionscript-please/295742/1 "2009-09-03T17:26:33Z")

</div>

Hi guys,

I ran into a problem today with using an old file that utilizes actionscript 1.0. I tried placing a video component into the file and it doesn’t work. This leads me to believe I need to convert my old actionscript 1.0 to at least 2.0. The file is pretty simple. The old actionscript simply moves a movieclip at certain intervals when the play button is pressed or the slider bar is dragged. When I exported the movie using 2.0, the following errors occurred in the compile errors box.

![](http://www.gregwrightdesigns.com/actionscript.png)

Here is my actionscript that causes these errors.

[AS]  
// playhead button coordinate  
trace(\_root.playheadBtn.\_x);  
// playhead button moves strip  
\_root.stripMc1.\_x = (\_root.playheadBtn.\_x-19.2)\*(-10375.0/767.7)+20.4;  
// play button  
if (play == “go”) {  
\_root.playheadBtn.\_x = \_root.playheadBtn.\_x+.06;  
}  
// pause button  
if (play == “halt”) {  
\_root.playheadBtn.\_x = \_root.playheadBtn.\_x;  
}  
// comment text  
if (\_root.playheadBtn.\_x\>76 && \_root.playheadBtn.\_x\<84) {  
commentTb = “”;  
} else if (\_root.playheadBtn.\_x\>230.5 && \_root.playheadBtn.\_x\<238.5) {  
commentTb = “”;  
} else if (\_root.playheadBtn.\_x\>647.5 && \_root.playheadBtn.\_x\<655.5) {  
commentTb = “”;  
} else if (\_root.playheadBtn.\_x\>306 && \_root.playheadBtn.\_x\<314) {  
commentTb = “”;  
} else if (\_root.playheadBtn.\_x\>357 && \_root.playheadBtn.\_x\<365) {  
commentTb = “”;  
} else if (\_root.playheadBtn.\_x\>509 && \_root.playheadBtn.\_x\<517) {  
commentTb = “”;  
} else if (\_root.playheadBtn.\_x\>560 && \_root.playheadBtn.\_x\<568) {  
commentTb = “”;  
} else if (\_root.playheadBtn.\_x\>610 && \_root.playheadBtn.\_x\<618) {  
commentTb = “”;  
} else if (\_root.playheadBtn.\_x\>660 && \_root.playheadBtn.\_x\<668) {  
commentTb = “”;  
} else {  
commentTb = “”;  
}  
// Stop at end of strip  
if (\_root.playheadBtn.\_x\>763.7) {  
play = “halt”;  
}  
// Loop  
gotoAndPlay(4);  
[/AS]

I sincerely appreciate any help! Please let me know if I need to explain anything further. I have a feeling it is as simple as changing “halt” and “go” to something different…

Thanks in advance guys!

Greg
