You are on page 1of 12

PAGENO:

ROLL NO:11481F0042 NAME:R.TEJASREE

DATE:29-10-2013 EXP NO:

AIM: To Writ ! A"tio# S"ri$t $ro%r!& 'or (i)$*!+i#% ! t ,t to "*i"- o# ! ./tto#. DES0RIPTION: We are writing a Action script program When a button is pressing it automatically displaying the content with in the text box. PRO0ESS: Step1:Select the new flash document in macromedia flash MX 2 !.

Step2:Select the 1/tto# !#( t ,t .o, in the components panel and drag it into the flash stage. "t will ta#e as a single form. Step$:%irst enter the instance names for each indi&idual component and also gi&en properties of the components in the properties bar. Step!:'lic# on out of the form and then start to write a !"tio# )"ri$t with in the actions bar. A"tio#S"ri$t $ro%r!&:
f(new )b*ect+,f.clic#(function+, . textbox.text(/gec/0 button.add1&ent2istener+/clic#/3f,-

Step4:Sa&e the action script program as button.fla 3if the program is error free clic# on 0rt*2E#t r.

MCA-GUDLAVALLERU ENGINEERING COLLEGE

PAGENO:

O3TP3T: button.fla

button.swf

MCA-GUDLAVALLERU ENGINEERING COLLEGE

PAGENO:

ROLL NO:11481F0042 NAME:R.TEJASREE

DATE:29-10-2013 EXP NO:

AIM: To Writ ! A"tio# S"ri$t $ro%r!& 'or to 'i#( R!(i!#4 )i#4 "o)4 t!# 5!*/ ) 'or %i5 # D %r ). DES0RIPTION: We are gi&en the degree &alue3 it automatically co&ert it into the radian3 sine3 cosine and tangent &alues. PRO0ESS: Step1:Select the new flash document in macromedia flash MX 2 !.

Step2: Select the single 1/tto# 6"o#5 rt74'o/r *!. *) !#( 'o/r t ,t .o, ) in the components panel and drag it into the flash stage. "t will considered as a single form. Step$: %irst enter the instance names for the corresponding component and also gi&en properties of the components in the properties bar for the user con&enience. Step!:'lic# on out of the form and then start to write a !"tio# )"ri$t with in the actions bar. A"tio#S"ri$t $ro%r!&:
form(new )b*ect+, form.clic#(function+e&t, . radian.text(Math.5"617 8t.textsin.text(Math.sin+Math.5"617 8t.text,cos.text(Math.cos+Math.5"617 8t.text,tan.text(Math.tan+Math.5"617 8t.text,0 b1.add1&ent2istener+/clic#/3form);

Step4:Sa&e the action script program as degreecon&ersion.fla 3if the program is error free clic# on 0rt*2E#t r.

MCA-GUDLAVALLERU ENGINEERING COLLEGE

PAGENO:

O3TP3T: 9egreecon&ersion.fla

9egreecon&ersion.swf

MCA-GUDLAVALLERU ENGINEERING COLLEGE

PAGENO:

ROLL NO:11481F0042 NAME:R.TEJASREE

DATE:29-10-2013 EXP NO:

AIM: To Writ ! A"tio# S"ri$t $ro%r!& 'or to 0o#5 rt t8 T &$ r!t/r Fro& '!8r #8 it 8 !t to 0 *)i/). DES0RIPTION: We are gi&en the &alue of %ahrenheit and then con&ert it into the 'elsius and &ice &ersa and the &alue is displayed on the corresponding text boxes. PRO0ESS: Step1:Select the new flash document in macromedia flash MX 2 !.

Step2: Select the 'o/r *!. *) 4t9o r!(io ./tto#) !#( t9o t ,t .o, ) in the components panel and drag it into the flash stage as user design. "t will considered as a single form. Step$: %irst enter the instance names for the corresponding component and also gi&en properties of the components in the properties bar for the user con&enience li#e name etc. Step!:'lic# on out of the form and then start to write a !"tio# )"ri$t with in the actions bar. A"tio#S"ri$t $ro%r!&:
r2.on5ress(function+, . fh.text(//cel.text(//0r1.on5ress(function+, . if+fh.text:(//, . &ar far2cel:;umber(++;umber+fh.text<$2,84,6=,cel.text(far2celMCA-GUDLAVALLERU ENGINEERING COLLEGE

PAGENO:

0 if+cel.text:(//, . &ar ces2far:;umber(++;umber+cel.text,8=64,>$2,fh.text(ces2far0 0

Step4:Sa&e the action script program as temperature.fla 3if the program is error free clic# on 0rt*2E#t r. O3TP3T: temperature.fla

temperature.swf

MCA-GUDLAVALLERU ENGINEERING COLLEGE

PAGENO:

ROLL NO:11481F0042 NAME:R.TEJASREE

DATE:29-10-2013 EXP NO:

AIM: To Writ ! A"tio# S"ri$t $ro%r!& 'or to Di)$*!+ t8 S+)t & "o#'i%/r!tio#. DES0RIPTION: We are writing a Action script program for displaying the configurations of the system li#e language3os3screen resolution x3 screen resolution y and pixel aspect ratio etc. PRO0ESS: Step1:Select the new flash document in macromedia flash MX 2 Step2:Simply we writing the scripting code with in the actions bar. A"tio#S"ri$t $ro%r!&: trace+get&ersion+,,trace+/operating system:/>System.capabilities.os,trace+/2anguage:/>System.capabilities.language,trace+/Screen ?esoulation )n X:/>System.capabilities.screen?esolutionX,trace+/Screen ?esoulation )n @:/>System.capabilities.screen?esolution@,trace+/Screen 95":/>System.capabilities.screen95",trace+/5ixel Aspect ?atio:/>System.capabilities.pixelAspect?atio,trace+/5layer Aype:/>System.capabilities.playerAype,MCA-GUDLAVALLERU ENGINEERING COLLEGE

!.

PAGENO:

trace+/Screen 'olor:/>System.capabilities.screen'olor,trace+/Ser&er String:/>System.capabilities.ser&erString,Step$:Sa&e the program as confugaration.fla 3if the program is error free clic# on 0rt*2E#t r.

O3TP3T: confugaration.fla

confugaration.swf

MCA-GUDLAVALLERU ENGINEERING COLLEGE

PAGENO:

ROLL NO:11481F0042 NAME:R.TEJASREE

DATE:29-10-2013 EXP NO:

AIM: To Writ ! A"tio# S"ri$t $ro%r!& 'or "r !ti#% (i'' r #t t+$ ) o' *oo$). DES0RIPTION: "n the action script we are using three different types of loops li#e for loop3 for in loop and while loop. PRO0ESS: Step1:Select the new flash document in macromedia flash MX 2 Step2:Simply we writing the scripting code with in the actions bar. A"tio#S"ri$t $ro%r!&:
&ar degree:Array(new Array+,degree.push+/BS'/3/BA/3/B')M/3/BA1'C/,trace+/9isplay 9egree using While loop/,MCA-GUDLAVALLERU ENGINEERING COLLEGE

!.

PAGENO:

&ar x:;umber( while+xDdegree.length, . trace+degreeExF,x>>0 &ar pg:Array(new Array+,pg.push+/M'A/3/MBA/3/MA1'C/3/M')M/3/MA/3/MS'/,trace+/9isplay 5gGs using %or loop/,for+x( -xDpg.length-x>>, . trace+pgExF,0 &ar lang:Array(new Array+,lang.push+/)?A'21/3/B95/3/HAIA/3/'>>/3/'/,trace+/9isplay language using %or "n loop/,&ar x:;umber( for+x in lang, . trace+langExF,0

Step$:Sa&e the program as diffloops.fla 3if the program is error free clic# on 0rt*2E#t r. O3TP3T: diffloops.fla

MCA-GUDLAVALLERU ENGINEERING COLLEGE

PAGENO:

diffloops.swf

MCA-GUDLAVALLERU ENGINEERING COLLEGE

PAGENO:

MCA-GUDLAVALLERU ENGINEERING COLLEGE

You might also like