# AS1 -\> AS2 Syntax error (smooth\_transitions tutorial)

**URL:** <https://forum.kirupa.com/t/as1-as2-syntax-error-smooth-transitions-tutorial/182082>\
**Category:** flash\
**Created:** [March 15, 2006, 1:00pm UTC](https://forum.kirupa.com/t/as1-as2-syntax-error-smooth-transitions-tutorial/182082 "2006-03-15T13:00:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayaNoa](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@ayaNoa](https://forum.kirupa.com/u/ayaNoa)\
**Post date:** [March 15, 2006, 1:00pm UTC](https://forum.kirupa.com/t/as1-as2-syntax-error-smooth-transitions-tutorial/182082/1 "2006-03-15T13:00:56Z")

</div>

hi  
I am traying to builde a simple louding sistem for difrent content pages  
i have a main page main.swf and content pages content0…swf  
this is the code from frame 1 content0.swf

it works fine for player6 and actionscript1 but i do nead to publish in player8 and actionscript2  
i gut this sintex errou ( for the read line )

[COLOR=red] **Error** Scene=Scene 1, layer=actions, frame=1:Line 13: Syntax error.  
\_level0.preloaderGraphics.percent = int(Percentage) add “%”;[/COLOR]

any one can halp to corect it…

this is the URL for the tutorial  
[http://www.hed.swin.edu.au/design/tutorials/flash/smooth\_transitions/index.php](http://www.hed.swin.edu.au/design/tutorials/flash/smooth_transitions/index.php)

> 

this.onEnterFrame = function() {  
//this checks to see if the content on this timeline is still loading  
if (this.getBytesLoaded()\<this.getBytesTotal()) {  
//make the preloader visible  
\_level0.preloaderGraphics.\_visible=true;  
//make a variable to store the total file size of this timeline  
Total = this.getBytesTotal()/1000;  
//make a variable to store the amount of this timeline that has loaded  
Received = this.getBytesLoaded()/1000;  
//make a variable to store the percentage loaded  
Percentage = (Received/Total)\*100;  
//target the text box in the preloaderGraphics mc and tell it what to display  
[COLOR=red]\_level0.preloaderGraphics.percent = int(Percentage) add “%”;[/COLOR]  
//change the x scale of the progess bar to indicate how much has loaded  
\_level0.preloaderGraphics.progressBar.\_xscale = Percentage;  
} else {  
//play the intro animation  
this.gotoAndPlay(“intro”);  
//turn off the enterFrame action  
this.onEnterFrame = null;  
//hide the preloader  
\_level0.preloaderGraphics.\_visible=false;  
}  
};  
//stop this timeline while it loads  
stop();
