Sie sind auf Seite 1von 24

MULTIMEDIA

PRACTICAL
FILE

ASP
Q1. Write the ASP code showing the use of Adrotator component.
<%
url=Request.QueryString("url")
If url<>"" then Response.Redirect(url)
%>
<html>
<body>
<%
set adrotator=Server.CreateObject("MSWC.AdRotator")
response.write(adrotator.GetAdvertisement("textfile.txt"))
%>
</body>
</html>
Q2. Write the ASP code showing the use of content rotator
component.
<html>
<body>
<%
set cr=server.createobject("MSWC.ContentRotator")
response.write(cr.ChooseContent("text/textads.txt"))
%>
</body>
</html>

Q3-CREATE A WEBPAGE WHICH SHOWS NO. OF VISITORS


VISITING THE WEBPAGE USING PAGE COUNTER COMPONENT OF
ASP.
<%
SetMyPageCounter=Server.CreateObject("MSWC.PageCounter")
MyPageCounter.PageHit()
%>
This page has been visited
<
%=mypagecounter.hits("d:/inetpub/wwwroot/web_project/folder/book
1.xls")%>
times.<br>
Q4- CREATE AN OPINION POLL USING COUNTER COMPONENT OF
ASP.
<html>
<head>
<title>OPINION POLL</title>
</head>
<body>
<%
Vote=request.querystring(choice)
If vote=yes then
Mycount.increment(yescounter)
Elseif vote=no then
Mycount.increment(nocounter)
Elseif vote=cs then
Mycount.increment(cscounter)

End if
%>
<h2>do you like pizza:</h2>
<form name=voting for colors method=get action=counters.asp>
<input type=radio name=choice checked value=yes>yes
<input type=radio name=choice value=no> no
<input type=radio name=choice value=cs> Cant say
<br><input type=submit value=submit vote>
</form>
<h3>Current vote tally</h3>
<table border=1>
<tr>
<td width=100>Yes:
<td width=30><%=mycount.get(yescounter)%></td></tr>
<tr>
<td>No:</td><td><%=mycount.get(nocounter)%></td></tr>
<tr><td>Cant say: </td><td><%=mycount.get(cscounter)%></td>
</tr>
</table>
<br>
<center>This page has been visited
<%=mycount.increment(pgcount)%> times.</center>
</body>
</html>
Q5. Write ASP code for reading line beginning fromA.
<html>
<head>
<title>

Reading a file</title>
</head>
<body>
<%
Set fileobj=server.createobject(scripting.filesystemobject)set
myfile=fileobj.opentextfile(str.txt)
While NOT myfile.AtEndOfStream
S=myfile.readline
If left(S, 1)=A then
respone.write(S & <br>)
end if
wend
Myfile.close
%>
</body>
</html>
Q 6- Create a program to read a text file named data.txt and count
the number of vowels and consonants.
<html>
<head>
<title>vowels and consonants</title>
</head>
<body>
<%
Dim vowel, conson, special, ch
Count=0
Set fileobj=Server.CreateObject(Scriptin.FilesSystemObject)
Set Myfile=Fileobj.OpenTextFile(data.txt)

While NOT Myfile.AtEndOfStrea


C=Ucase(Myfile.read(1))
If ch>=A and ch<=Z then
If ch=A Or ch=E OR ch=I OR ch=O OR ch=U Then
Vowel=vowel+1
Else
conson=conson+1
end if
wend
response.write(No. of vowels : & vowel & <br>)
response.write(no. of consonants: & conson & <br>)
MyFile.close
%>
</body>
</html>
Flash
Q1. Create a movie in Flash using the concept of Masking.
Open Macromedia Flash 5.
1. On the layer one make a box with any color using square from the
tool box.
2. Now on the 1st key frame of the same layer also type text using
text tool from the tool bar.
3. Now insert another layer by right clicking on the layer1 and select
option insert layer.
4. Now on the layer 2 create any shape say of the circle using the
circle tool from the tool box on the first key frame of the layer2.
5. Now right click on the frame 30 and insert a key frame on all the
layers.
6. Now move circle (layer 2) over the text you have type.

7. Now right click anywhere between frame 1 to 30 of layer 2 and


create motion tween.
8. Go to control => Test movie (Ctrl + Enter).

Q2. Create a movie in Flash using the concept of Motion Guide.


1. Create a graphic symbol or drag a pre-existing graphic symbol
from library onto the stage. Name the layer as "graphic"
2. Right click on the "graphic" label and select "Add Motion Guide"
from the pop-up window.
3. A new layer will appear on top of the "graphic" layer with the
label "Guide:graphic" along with the guide icon.
4. Draw the path for your symbol in this new layer using pencil or
line tool.
For example: I drew a circle for my car.
5. Select frame 50 of guide layer and press "F5" to insert frames.
6. Now go to "Frame 1" of "graphic" layer and drag your symbol to
one end of your path. While dragging, you will see a bubble on the
symbol. That bubble should go right below the path. Something
like the one shown below.

7. Now go to "Frame 50" of "graphic" layer and press F6 to insert a


new keyframe.
8. Now drag your symbol to other end of your path. Again, the
bubble should go right below the path.

9. Select any frame between 1 to 50 of your "graphic" layer. Right


click and select "motion tween" from the pop-up menu.
10.That's it, you are through. Press Ctrl+Enter to view your
Work.
Q3. Create a movie in Flash using the concept of Onion Skinning.

1. Create a new document in Macromedia Flash 8.


Go to "Insert - New symbol"(Ctrl-F8) to create a new symbol.
2. In the new pop up window type "Animation" in the name field and
make sure to select "Movie clip" as type.
3. In the first frame of layer 1 just draw a random drawing. This is
what we're going to animate.
4. Insert a new frame in Layer 1 (F6).Turn on onion skin.
5. If you try to change the drawing you can see the traces of the
last frame to help you animate.
6. Insert a keyframe at the last frame.
7. See Test Movie.
Q4. Create a movie in Flash using the concept of Blinking Text.
1. Open Macromedia Flash 5.
2. On the layer 1 type first letter of sentence you want to blink
using text tool from the toolbar. Make it symbol by pressing F8
and select GRAPHIC.
3. Now type different letters on different layers. Creating them
symbols too. For inserting layer right click on layer and select
insert layer.
4. Provide different colors to all the letters. (Say in the pattern of
VIBGYOR.)Using paint bucket tool from the toolbar.

5. Now right click on the frame 15, 25, 35, 45 and insert a key
frame of all the layers.
6. Go to key frame 15 and 35 and make the color of the text
WHITE.
7. Now go to frame 25 and reverse the order of the color pattern
(VIBGYOR).
8. Now insert one more layer and create the bricks on the entire
stage leaving the area of the text in order to make it more
attractive and give a clear vision to your effect.
9. Go to Control => Test movie(Ctrl + Enter).To view your movie.
Q5. Create a movie in Flash using the concept of Frame by Frame
animation.
1. Insert Keyframe (F6)place object(s) on the stage
turn on
onion skinning, which will allow you to see the location of each
object as you progress through creating the animation move to
the next frame and Insert Keyframe make changes to object(s)
(reposition, color, size, etc) repeat steps 4 and 5 till you have
finished your animation
2. Control Menu --> Test Movie
VB-Script
Q1- Create a webpage to display the exam datesheet in the table
format.
<html> <head> <title>
Datesheet </title> </head>
<font face="comic sans ms" size="4">
<body>
<center><br>

<caption>"DATESHEET"</caption>
<br> <br>
<table border="2" bordercolor="green" cell spacing="20" cell
padding="30" align="center" size="4"><tr>
<td>SUBJECT
<td>DATES </tr>
<tr>
<td>english
<td>3-mar-12 </tr>
<tr>
<td>maths
<td>8-mar-12 </tr>
<tr>
<td>multimedia
<td>14-mar-12</tr>
<tr>
<td>physics
<td>18-mar-12 </tr>
<tr>
<td>chemistry
<td>21-mar-12 </tr>
<tr>
<td>biology
<td>27-mar-12</tr>
<tr>
<td>physical education
<td>30-mar-12 </tr>
</table> </center> </font>
</body>
</html>

Q2- Create a web page to print the Fibonacci series of n numbers


where n is entered by the user.
<html>
<script language="vbscript">
dim a,b, c
i=inputbox("enter the number")
a=0
b=1
document.write(a & "<br>" & b & "<br>")
for c=1 to i
d=a+b
document.write(d & "<br>")
a=b
b=d
next
</script>
</html>
Q3. Create a web page to print the factorial of n numbers where n is
entered by the user.
<html>
<head>
<title>
factorial</title>
<script language="vbscript">
num=inputbox("enter the number")
fact=1
for k= num to 1 step -1

fact=fact*k
next
document.write("factorial of " & num & "=" & fact)
</script>
</head>
</html>
here n is entered by the user.
Q4 Create a web page to show the multiplication table of a number A
till B , where A and B are entered by the user.
<html>
<script language="vbscript">
dim a, b, c
c=1
a=inputbox("enter the value of A")
b=inputbox("enter the value of B")
for c=1 to b step 1
d=a*c
document.write(a & "X" & c & "=" & d )
document.write("<br>")
next
</script>
</html>
Q5- Input a year and find put that year is a leap year or not.
<html>
<head>
<title>

Leap year
</title>
<head>
<body>
<script language="vbscript">
dim yr
yr=inputbox("Enter the year")
if yr mod 4=0 then
a=yr
msgbox"It is a leap year"
else
msgbox"It is not a leap year"
end if
</script>
</body>
</html>
Q 6-Write a script to change the background color of webpage
according to the users choice.
<html>
<head>
<title>
background change
</title>
</head>
<script language="vbscript">
sub b1_onclick
if document.form1.b1.value="pink"
then

document.bgcolor="pink"
document.form1.b1.value="white"
else
document.bgcolor="white"
document.form1.b1.value="pink"
end if
end sub
</script>
</head>
<body language="vbscript">
<form name="form1">
<H2>Click the button to change the
background color</H2>
<input type=button value="pink"
name="b1">
</form>
</body>
</html>
Q 7- Create a web page with log- in form that check for the username
and password entered by the user and flash an appropriate message.
<Html>
<head> <title>forms</title>
<script language="vbscript">
sub a_onclick
msgbox "Thanks for providing your details"
document.frm1.submit
end sub
</script>

</head>
<body>
<h1>Enter your details to login:</h1>
<form name="frm1">
<h2>Enter your Name: <input type="text" name="txtname"
size="20"><br><br>
Enter your Password: <input type="text" name="txtage"
size2"><br><br></h2>
<input type="submit" name="a" value="Submit">
</form>
</body>
</html>
MS-Access
Q1. Create two tables in MS-Access with 5 different fields(each field
using different data type) and create relationship between the two
tables.

HTML
Q1.

<html>
<body

bgcolor="green">
<h1><center><u><b><font color="blue">ABOUT AIR
RETURNS</font></b></u></h1>
<h3><font color="white">Air Return is India's first frequent flyer
programme, and one of the most rewarding programmes in the region.
<P>
As a member,you can earn mileage points when you fly Air India on
eligible fare paying tickets, and redeem them for award travel faster
than most programs . On higher fares,such as full fare economy,and on
Business/First Class,you can earn bonus miles , and clock points faster.
<P>
Interline eTicketing is the most recent, up-to-date ticketing method
that allows two carriers to electronically sell tickets on each other on
a single document. Interline eTicketing is the most updated ticketing
method that allows two carriers to electronically sell their tickets on
each others website on a single document. With more than 140
interline partners, you can now explore the world with them.
<P>

You can even earn and redeem mileage points on airline partners, and
earn miles on selected non airline partners.
<P>
Join Air Returns today, start collecting mileage points and you could
soon earn award tickets to a destination of your choice
</font>
</h3>
</html>
Q2.

<html>
<body bgcolor="cyan">
<h1><marquee>EXAM DATESHEET</h1></marquee><P>
<BR><BR><center><table border=5 bordercolor="red" cellpadding="10"
cellspacing="10" >
<tr>
<th>DATE
<th>SUBJECT </tr>
<tr>
<td>7 March

<td>MULTIMEDIA </tr>
<tr>
<td>9 March
<td>ENGLISH </tr>
<tr>
<td>11 March
<td>ECONOMICS </tr>
<tr>
<td>13 March
<td>ACCOUNTS </tr>
<tr>
<td>15 March
<td>BUSINESS STUDIES </tr>
<tr>
<td>17 March
<td>PHYSICAL EDUCATION</tr>
</table>
</body>
</html>
Q3.

<Html>
<frameset cols="20%, 80 %">
<frame src="info.html">
<frameset rows="80 %,*">
<frame src="as.html">
<frame src="astronomy.html">
</frameset>
</html>
Q4.

<html>
<body bgcolor="cyan">
<form>
<h1><u><bfont color="red"><center>RAILWAY
RESERVATION</center></font></b></u></h1>
Name&nbsp&nbsp&nbsp<input type="text"><br><br>
Gender<input type="radio" value="123">Male
<input type="radio" value="123">Female<br><br>
From&nbsp&nbsp&nbsp<input type="text"><br><br>
To&nbsp&nbsp<input type="text"><br><br>
Adults(15 to 60)&nbsp&nbsp&nbsp<select>
<option>1</option>
<option>2</option>
<option>3</option></select>
Senior Citizens(60+)&nbsp&nbsp&nbsp<select><br>
<option>1</option>
<option>2</option>
<option>3</option></select><br><br>

Classes&nbsp&nbsp&nbsp<select>
<option>all classes</option>
<option>1A-AC First Class</option>
<option>2A-AC tier</option>
<option>3A-AC tier</option>
<option>3E-AC tier</option>
<option>CC-AC Chair Car</option>
<option>FC - First Class</option>
<option>SL-Sleeper</option>
<option>2S-Second Sitting</option>
</select><br><br>
Date&nbsp&nbsp&nbsp<select>
<option>1</option><option>2</option>
<option>3</option><option>4</option>
<option>5</option><option>6</option>
<option>7</option><option>8</option>
<option>9</option><option>10</option>
<option>11</option><option>12</option>
<option>13</option><option>14</option>
<option>15</option><option>16</option>
<option>17</option><option>18</option>
<option>19</option><option>20</option>
<option>21</option><option>22</option>
<option>23</option><option>24</option>
<option>25</option><option>26</option>
<option>27</option><option>28</option>
<option>29</option><option>30</option>
</select>&nbsp&nbsp&nbsp
MONTH&nbsp&nbsp&nbsp<select>
<option>JAN</option>

<option>FEB</option>
<option>MAR</option>
<option>APR</option>
<option>MAY</option>
<option>JUNE</option>
<option>JULY</option>
<option>AUG</option>
<option>SEP</option>
<option>OCT</option>
<option>NOV</option>
<option>DEC</option>
</select>
<p>
<input type="button" value="submit">
</form>
</html>

Das könnte Ihnen auch gefallen