# Syntax error: expecting rightparen before colon

**URL:** <https://forum.kirupa.com/t/syntax-error-expecting-rightparen-before-colon/309629>\
**Category:** flash\
**Created:** [May 20, 2010, 7:32am UTC](https://forum.kirupa.com/t/syntax-error-expecting-rightparen-before-colon/309629 "2010-05-20T07:32:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![krunalkakadia](https://avatars.discourse-cdn.com/v4/letter/k/e56c9b/32.png) [@krunalkakadia](https://forum.kirupa.com/u/krunalkakadia)\
**Post date:** [May 20, 2010, 7:32am UTC](https://forum.kirupa.com/t/syntax-error-expecting-rightparen-before-colon/309629/1 "2010-05-20T07:32:28Z")

</div>

hi guys,

I am new in FLAX technology.i have just started to learn it.

now i have my simple pro. which converts ferenhit into celcius temparature.i have my temparature.mxml file in src folder and temparature.as file in include folder.i got error when i give path in script for actionscript.  
below is my code for :  
[SIZE=1]  
\<?xml version=“1.0”?\> \<!-- usingas/ASSourceFile.mxml --\>  
\<mx:Application xmlns:mx=“[http://www.adobe.com/2006/mxml](http://www.adobe.com/2006/mxml)”\>  
\<!-- Specify the ActionScript file that contains the function. --\>  
\<mx:Script source=“includes/temparature.as”/\>  
\<mx:Panel title=“My Application” paddingTop=“10” paddingBottom=“10” paddingLeft=“10” paddingRight=“10”\>  
\<mx:HBox\>  
\<mx:Label text=“Temperature in Fahrenheit:”/\>  
\<mx:TextInput id=“fahrenheit” width=“120”/\>  
\<mx:Button label=“Convert” click=“celsius.text=calculate(fahrenheit.text);”/\>  
\<mx:Label text=“Temperature in Celsius:”/\>  
\<mx:Label id=“celsius” width=“120” fontSize=“24”/\>  
\</mx:HBox\>  
\</mx:Panel\>  
\</mx:Application\>

BELOW IS MY CODE FOR TEMPARATURE.AS:

[SIZE=1]public function calculate(s:String):String  
{  
var n:Number = Number(s);  
var t:Number = Math.round((n-32)/1.8\*10)/10;  
return String(t);  
}

[/SIZE][/SIZE][SIZE=1]I GOT ERROR AT \<SCRIPT/\> TAG IS:[/SIZE]  
[SIZE=1] IT DOESN’T GET .AS FILE [/SIZE]
