You are on page 1of 14

1) f=new Object(); f.click=function() { textbox.text="gec"; } button.

addEventListener("click",f);

2) form=new Object() form.click=function(evt) { radian.text=Math.PI/180*t.text; sin.text=Math.sin(Math.PI/180*t.text); cos.text=Math.cos(Math.PI/180*t.text); tan.text=Math.tan(Math.PI/180*t.text); } b1.addEventListener("click",form);

3) r2.onPress=function() { fh.text=""; cel.text=""; }; r1.onPress=function() { if(fh.text!="") {

var far2cel:Number=((Number(fh.text-32)*5)/9); cel.text=far2cel; } if(cel.text!="") { var ces2far:Number=((Number(cel.text)*9/5)+32); fh.text=ces2far; } }

4) trace(getversion()); trace("operating system:"+System.capabilities.os); trace("Language:"+System.capabilities.language); trace("Screen Resoulation On X:"+System.capabilities.screenResolutionX); trace("Screen Resoulation On Y:"+System.capabilities.screenResolutionY); trace("Screen DPI:"+System.capabilities.screenDPI); trace("Pixel Aspect Ratio:"+System.capabilities.pixelAspectRatio); trace("Player Type:"+System.capabilities.playerType);

trace("Screen Color:"+System.capabilities.screenColor); trace("Server String:"+System.capabilities.serverString);

5) var degree:Array=new Array(); degree.push("BSC","BA","BCOM","BTECH"); trace("Display Degree using While loop"); var x:Number=0; while(x<degree.length) { trace(degree[x]); x++; } var pg:Array=new Array();

pg.push("MCA","MBA","MTECH","MCOM","MA","MSC"); trace("Display Pg's using For loop"); for(x=0;x<pg.length;x++) { trace(pg[x]); } var lang:Array=new Array(); lang.push("ORACLE","BDP","JAVA","C++","C"); trace("Display language using For In loop"); var x:Number=0; for(x in lang) { trace(lang[x]); }