Sie sind auf Seite 1von 33

Practical File of Multimedia Technology

Submitted To
Mr. SatishDadarwal Asst. Professor CSE Deptt.

Submitted By
Pankaj Gill 11/CSE/168 CSE-B

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

INDEX
Aim
1. 2. 3. 4. 5. 6 Write a Program to include a paragraph in Web Page using HTML Write a Program of include image in Web Page using HTML Write a Program of including table in Web Page using HTML Write a Program of including video in Web Page using HTML A case study of macromedia flash version 5.0 Write a program to show animation using micro media flash player Write a Program to show animation using frame by frame technique using macromedia flash. Write a Program to show tween shape of an object using macromedia flash. Write a Program to show Multilayer in macromedia flash player. A Case Study Of Visual Basics Program to Add Sound in Visual Basics 5.0

Date

Page
2 4 6 9 11 16

Remarks

7.

18

8.

20

9.

23

10. 11.

25 28

PANKAJ GILL

11/CSE/168

Page

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Write a Program to include a paragraph in Web Page using HTML


<html> <head> <title>Inserting Text in WebPage using HTML</title> </head> <body bgcolor=green><center> <font size="14" color="blue" face="arial itallic"><b>MultiMedia Technology</b></font></h1></center> <font size="6" color="yellow" face="arial itallic"><br>MultiMedia: Multimedia is the media that uses multiple forms of information content andinformation processing to inform or entertain the user.</font> <br><i><br><font color="blue" size="6">Applications of MultiMedia:</font></i></br></br> <br><font size="5" color="black" face="arial bold">1.Multimedia presentations</font> <br><font size="5" color="black" face="arial bold">2.Multimedia games and simulations</font> <br><font size="5" color="black" face="arial bold">3.Creative industries</font> <br><font size="5" color="black" face="arial bold">4.Creative industries</font> <br><font size="5" color="black" face="arial bold">5.Mathematical and Scientific Research</font> <br><font size="5" color="black" face="arial bold">6.Education</font> </body> </html>

Practical No.1

PANKAJ GILL

11/CSE/168

Page

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Output

PANKAJ GILL

11/CSE/168

Page

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Write a Program of include image in Web Page using HTML


<html> <head> <title>Inserting Image in WebPage using HTML </title> </head> <body bgcolor=green><center> <h1><font size="14" color="blue" face="arial itallic"><b>Plotters</b></font></h1></center> <br><font size="5" color="black" face="arial itallic"> A plotter is a special-purpose output device that draws images with ink pens. That is, the plotter is a graphics printer for making sophisticated graphs, charts, maps, and threedimensional graphics as well as high-quality colored documents. It can also produce larger size of documents. Plotters require data in a vector graphics format that can produce images with a series of lines</br><img src="C:\Users\Hp\Desktop\in.jpg" height=300 width=300 align=right> </img><br><table border="1" cellspacing=4><caption align="bottom"> <tr><th><center><font size=5 color= red>Types of Plotters:</center> </th></tr></font> <tr><td>Drum Plotter</td></tr><tr> <td>Flatered Plotter</td></tr> </body>

Practical No.2

PANKAJ GILL

11/CSE/168

Page

</html>

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Output

PANKAJ GILL

11/CSE/168

Page

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Write a Program of including table in Web Page using HTML


<html> <head> Vaish Education Society</b></font></center> </head> <title> Inserting Table in WebPage using HTML</title> <center><font color="blue" face="Monotype Corsiva"> <h1>Vaish College of Engineering</h1> <h2>Vaish College of Engineering</h2> <h3>Vaish College of Engineering</h3> <br></font></center></br><body bgcolor="red"> <center> <table border=15 border color="red" width="60%" bgcolor"orange">
<tr> <th rowspan=1>Graduation Courses</th> <th colspan=3>Post Graduation Courses</th> </tr> <tr> <th>B.E.</th> <th>M.E.</th> </tr> <tr> <td<Electrical Engineering</td> <td>Computer Science Engineering</td> <td>Computer Science Engineering</td>

Practical No.3

PANKAJ GILL

11/CSE/168

Page

</tr>

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY


<tr> <td>Mechanical Engineering</td>

2013

<td>Electronics & Communication Engineering</td> </tr> <tr> <td>Electronics & Communication Engineering</td> <td>Information Technology</td> </tr> <tr> <td>Information Technology</td> </tr> <tr> <td>Electrical Engineering</td></tr>

</table> </center><br><br><br></body> </html>

PANKAJ GILL

11/CSE/168

Page

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Output

PANKAJ GILL

11/CSE/168

Page

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Write a Program of including video in Web Page using HTML


<html> <head> <title>Inserting Moving Image in WebPage using HTML </title> </head> <body bgcolor=red>
<video width="320" height="240" controls> <source src="C:\Users\Admin\Desktop\BHULA DENGE.mpg" type="video/mpg"> <object data=" C:\Users\Admin\Desktop\BHULA DENGE.mpg" type="video/mpg" width="320" height="240">

Practical No.4

<embed src=" C:\Users\Admin\Desktop\BHULA DENGE.mpg " width="320" height="240">


</object> </video>

</body> </html>

PANKAJ GILL

11/CSE/168

Page

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Output

PANKAJ GILL

11/CSE/168

Page

10

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

A case study of macromedia flash version 5.0

Practical No. 5

Adobe Flash (formerly Macromedia Flash) is a multimedia platform used to add animation, video, and interactivity to web pages. Flash is frequently used for advertisements, games and flash animations for broadcast. More recently, it has been positioned as a tool for "Rich Internet Applications" ("RIAs"). Flash manipulates vector and raster graphics to provide animation of text, drawings, and still images. It supports bidirectional streaming of audio and video, and it can capture user input via mouse, keyboard, microphone, and camera. Flash contains an object-oriented language called ActionScript and supports automation via the JavaScript Flash language (JSFL). Flash content may be displayed on various computer systems and devices, using Adobe Flash Player, which is available free of charge for common web browsers, some mobile phones, and a few other electronic devices (using Flash Lite). Some users feel that Flash enriches their web experience, while others find the extensive use of Flash animation, particularly in advertising, intrusive and annoying. Flash has also been criticized for adversely affecting the usability of web pages.

Flash Video
Virtually all browser plugins for video are free of charge and cross-platform, including Adobe's offering of Flash Video, which was first introduced with Flash version 6. Flash Video has been a popular choice for websites due to the large installed user base and programmability of Flash. In 2010, Apple publicly criticized Adobe Flash, including its implementation of video playback for not taking advantage of hardware acceleration, one reason Flash is not to be found on Apple's mobile devices. Soon after Apple's criticism, Adobe demoed and released a beta version of Flash 10.1, which takes advantage of GPU hardware acceleration even on a Mac. Flash 10.2 beta, released December 2010, adds hardware acceleration for the whole video rendering pipeline.

Flash Audio
Flash Audio is most commonly encoded in MP3 or AAC (Advanced Audio Coding) however it does also support ADPCM, Nellymoser(Nellymoser Asao Codec) and Speex audio codecs. Flash allows sample rates of 11, 22 and 44.1 kHz. It does not support 48 kHz audio sample rate, which is the standard TV and DVD sample rate.

PANKAJ GILL

11/CSE/168

Page

11

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

On August 20, 2007, Adobe announced on its blog that with Update 3 of Flash Player 9, Flash Video will also support some parts of the MPEG-4 international standards. Specifically, Flash Player will have support for video compressed in H.264 (MPEG-4 Part 10), audio compressed using AAC (MPEG-4 Part 3), the F4V, MP4 (MPEG-4 Part 14), M4V, M4A, 3GP and MOV multimedia container formats, 3GPP Timed Text specification (MPEG-4 Part 17), which is a standardized subtitle format and partial parsing support for the 'ilst' atom, which is the ID3 equivalent iTunes uses to store metadata. MPEG-4 Part 2 and H.263 will not be supported in F4V file format. Adobe also announced that it will be gradually moving away from the FLV format to the standard ISO base media file format (MPEG-4 Part 12) owing to functional limits with the FLV structure when streaming H.264. The final release of the Flash Player supporting some parts of MPEG-4 standards had become available in Fall 2007.

Runtime
Adobe Flash Player is a runtime that executes and displays content from a provided SWF file, although it has no in-built features to modify the SWF file at runtime. It can execute code written in the ActionScript programming language which enables the runtime manipulation of text, data, graphics, bitmaps, sound and video. Flash Player is used internally by the Adobe Integrated Runtime (Adobe AIR), in order to provide a cross-platform runtime environment for desktop applications and mobile applications. The runtime supports installable applications on Windows, Linux, Mac OS, and some mobile operating systems such as IOS and Android. Flash applications must specifically be built for the Adobe AIR runtime in order to utilize additional features provided, such as file system integration, native client extensions, native window/screen integration, taskbar/dock integration, and hardware integration with connected Accelerometer and GPSdevices

History
Flash originated with the application SmartSketch, developed by Jonathan Gay. It was published by FutureWave Software, which was founded by Charlie Jackson.SmartSketch was a drawing application for pen computers running the PenPoint OS. When PenPoint failed in the marketplace, SmartSketch was ported to Microsoft Windows and Mac OS. As the Internet became more popular, FutureWave added cell animation editing to the vector drawing capabilities of SmartSketch and released FutureSplash Animator on multiple platforms. FutureWave approached Adobe Systems with an offer to sell them FutureSplash in 1995, but Adobe turned them down at that time. FutureSplash was used by Microsoft in its early work with the Internet (MSN), and also by Disney Online for their subscriptionbased service, Disney's Daily Blast. In 1996, FutureSplash was acquired by Macromedia and released as Flash, contracting "Future" and "Splash". Flash is currently developed and distributed by Adobe Systems, as the result of their 2005 purchase of Macromedia.

PANKAJ GILL

11/CSE/168

Page

12

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Open Screen Project


On May 1, 2008, Adobe announced the Open Screen Project, with the intent of providing a consistent application interface across devices such as personal computers, mobile devices, andconsumer electronics. When the project was announced, several goals were outlined: the abolition of licensing fees for Adobe Flash Player and Adobe Integrated Runtime, the removal of restrictions on the use of the Shockwave Flash (SWF) and Flash Video (FLV) file formats, the publishing of application programming interfaces for porting Flash to new devices, and the publishing of The Flash Cast protocol and Action Message Format (AMF), which let Flash applications receive information from remote databases. As of February 2009, the specifications removing the restrictions on the use of SWF and FLV/F4V specs have been published. The Flash Cast protocolnow known as the Mobile Content Delivery Protocoland AMF protocols have also been made available, with AMF available as an open source implementation, BlazeDS. Work on the device porting layers is in the early stages. Adobe intends to remove the licensing fees for Flash Player and Adobe Integrated Runtime (AIR) for devices at their release for the Open Screen Project. The list of mobile device providers who have joined the project includes Palm, Motorola, and Nokia, who, together with Adobe, have announced a $10 million Open Screen Project fund. As of 2012, the Open Screen Project is no longer accepting new applications according to partner BSQuare. However paid licensing is still an option for device makers who want to use Adobe software.

Flash for mobile platforms


Flash Player for smart phones was made available to handset manufacturers at the end of 2009. Adobe stops supporting Flash Player for mobile device browsers after the release of 11.1. It continues to support deploying Flash based content as mobile applications via Adobe AIR.

Decline on mobile devices


In November 2011 there were a number of announcements that demonstrated a possible decline in demand for rich Internet application architectures, and Flash in particular. Furthermore, in November 2011 Adobe announced the end of Flash for mobile platforms or TV, instead focusing on HTML5 for browser content and Adobe AIR for the various mobile application stores. Pundits questioned its continued relevance even on the desktop and described it as "the beginning of the end". RIM announced that it would continue to develop Flash for the PlayBook. Adobe Flash Player's planned discontinuation as a separately available NPAPI browser plugin for Linux (see Availability on desktop operating systems), although technically just an API change, is notable in this context because availability of new Flash Players on Linux will be restricted to one browser.

PANKAJ GILL

11/CSE/168

Page

13

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Despite the rise of the mobile-friendly HTML5, the Flash Player is still required for streaming the content of many radio and TV websites, often making this content unavailable on mobile devices.

Other uses
Adobe Flash continues to be a favored animation program for low-cost 2D television and commercial animation, in competition with Toon Boom Animation. Notable users of the software includeDHX Media Vancouver for productions including Pound Puppies and My Little Pony: Friendship is Magic, Nelvana for 6teen and Clone High, Williams Street for Metalocalypse and Squidbillies, andNickelodeon Animation Studios for Wow! Wow! Wubbzy! El Tigre: The Adventures of Manny Rivera, Danny Phantom and Happy Tree Friends . Flash is less commonly used for feature-length animated films; however, 2009's The Secret of Kells, an Irish film, was animated primarily in Adobe Flash, and was nominated for an Academy Award for Best Animated Feature at the 82nd Academy Awards.

Format
Flash files are in the SWF format, traditionally called "ShockWave Flash" movies, "Flash movies," or "Flash applications", usually have a .swf file extension, and may be used in the form of a web page plug-in, strictly "played" in a standalone Flash Player, or incorporated into a self-executing Projector movie (with the .exe extension in Microsoft Windows). Flash Video files have a .flv file extension and are either used from within .swf files or played through a flv-aware player, such as VLC, or QuickTime and Windows Media Player with external codecs added. The use of vector graphics combined with program code allows Flash files to be smaller and thus allows streams to use less bandwidththan the corresponding bitmaps or video clips. For content in a single format (such as just text, video, or audio), other alternatives may provide better performance and consume less CPU power than the corresponding Flash movie, for example when using transparency or making large screen updates such as photographic or text fades. In addition to a vector-rendering engine, the Flash Player includes a virtual machine called the ActionScript Virtual Machine (AVM) for scripting interactivity at run-time, with video, MP3-based audio, and bitmap graphics. As of Flash Player 8, it offers two video codecs: On2 Technologies VP6 and Sorenson Spark, and run-time JPEG, Progressive JPEG, PNG, and GIF capability. In the next version, Flash is slated to use a just-in-time compiler for the ActionScript engine. Flash Player is a browser plugin, and cannot run within traditional e-mail clients, such as Microsoft Outlook or Mozilla Thunderbird. Instead, a link must open a browser window.

Flash Video

PANKAJ GILL

11/CSE/168

Page

14

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Virtually all browser plugins for video are free of charge and cross-platform, including Adobe's offering of Flash Video, which was first introduced with Flash version 6. Flash Video has been a popular choice for websites due to the large installed user base and programmability of Flash. In 2010, Apple publicly criticized Adobe Flash, including its implementation of video playback for not taking advantage of hardware acceleration, one reason Flash is not to be found on Apple's mobile devices. Soon after Apple's criticism, Adobe demoed and released a beta version of Flash 10.1, which takes advantage of GPU hardware acceleration even on a Mac. Flash 10.2 beta, released December 2010, adds hardware acceleration for the whole video rendering pipeline.

Flash Audio
Flash Audio is most commonly encoded in MP3 or AAC (Advanced Audio Coding) however it can also use ADPCM, Nellymoser (Nellymoser Asao Codec) and Speex audio codecs. Flash allows sample rates of 11, 22 and 44.1 kHz. It cannot have 48 kHz audio sample rate, which is the standard TV and DVD sample rate. On August 20, 2007, Adobe announced on its blog that with Update 3 of Flash Player 9, Flash Video will also implement some parts of the MPEG-4 international standards. Specifically, Flash Player will work with video compressed in H.264 (MPEG-4 Part 10), audio compressed using AAC (MPEG-4 Part 3), the F4V, MP4 (MPEG-4 Part 14), M4V, M4A, 3GP and MOV multimediacontainer formats, 3GPP Timed Text specification (MPEG-4 Part 17), which is a standardized subtitle format and partial parsing capability for the 'ilst' atom, which is the ID3 equivalent iTunesuses to store metadata. MPEG-4 Part 2 and H.263 will not work in F4V file format. Adobe also announced that it will be gradually moving away from the FLV format to the standard ISO base media file format (MPEG-4 Part 12) owing to functional limits with the FLV structure when streaming H.264. The final release of the Flash Player implementing some parts of MPEG-4 standards had become available in Fall 2007. Adobe Flash Player 10.1 does not have acoustic echo cancellation, unlike the VoIP offerings of Skype and Google Voice, making this and earlier versions of Flash less suitable for group calling or meetings. Flash Player 10.3 Beta incorporates acoustic echo cancellation.

Scripting language
ActionScript is the programming language used by Flash. It is an enhanced superset of the ECMAScript programming language, with a classical Java-style class model, rather than JavaScript's prototype model.

PANKAJ GILL

11/CSE/168

Page

15

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Write a program to show animation using macromedia flash player

Experiment No.6

Steps to create object blinking: 1. Click a frame and add the object that you want to make blink. 2. Skip some frames on timeline and add a key frame after 25 frames. 3. Go to the 25th frame and remove that object from that frame.

Flash view:

PANKAJ GILL

11/CSE/168

Page

Output

16

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

PANKAJ GILL

11/CSE/168

Page

17

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Write a Program to show animation using frame by frame technique using macromedia flash
Steps to create motion tweening: 1. Click a layer name to make it the current layer, and select an empty key frame in the layer where you want the animation to start. 2. Create an instance, group, or text block on the Stage, or drag an instance of a symbol from the Library window. To motion tween an object you have drawn, you must convert it to a symbol. 3. Create a second key frame where you want the animation to end. 4. Do one of the following to modify the instance, group, or text block in the ending frame: Move the item to a new position. Modify the item's size, rotation, or skew. Modify the item's color (instance or text block only). To tween the color of elements other than instances or text blocks, use shape tweening.

Experiment No.7

PANKAJ GILL

11/CSE/168

Page

18

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Output

PANKAJ GILL

11/CSE/168

Page

19

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Write a Program to show tween shape of an object using macromediaflash


1. Open a macromedia flash from the start menu 2. From the toolbar select an object and place it on the play area 3. Select the frame, select the old object and delete it and draw the new object with new different colour and shape 4. In the frame, right click and select insert key frame 5. Select the first object, offset window -> select tween as shape and same for the second object 6. Press ctrl + enter to test the movie.

Experiment No.8

Flash view:

PANKAJ GILL

11/CSE/168

Page

20

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

PANKAJ GILL

11/CSE/168

Page

21

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Output

PANKAJ GILL

11/CSE/168

Page

22

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Write a Program to show Multilayer in macromedia flash player


Steps to create multiple object in flash using layers: 1. Click on insert new layer button in layer section of timeline. 2. Choose Insert->Timeline->Layer 3. Right-click on the layer name and then choose the insert layer option from the shortcut menu a new layer get added above the existing layer. 4. When a new layer is added into the timeline then add object to that layer. 5. Repeat step 1 to 4 until your complete requirement of layers and object is not fulfilled

Experiment No.9

Flash View:

PANKAJ GILL

11/CSE/168

Page

23

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Output

PANKAJ GILL

11/CSE/168

Page

24

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

A Case Study of Visual Basics


Visual Basic is a generation event and integrated development environment (IDE) from Microsoft for its COM programming model first released in 1991. Microsoft intends Visual Basic to be relatively easy to learn and use. Visual Basic was derived from BASIC and enables the rapid application development (RAD) of graphical user interface (GUI) applications, access to databases using Data Access Objects, Remote Data Objects, or ActiveX Data Objects, and creation of ActiveX controls and objects. The scripting languageVBScript is a subset of Visual Basic. A programmer can create an application using the components provided by the Visual Basic program itself. Programs written in Visual Basic can also use the Windows API, but doing so requires external function declarations. Though the program has received criticism for its perceived faults, version 3 of Visual Basic was a runaway commercial success, and many companies offered third party controls greatly extending its functionality. The final release was version 6 in 1998. Microsoft's extended support ended in March 2008 and the designated successor was Visual Basic .NET (now known simply as Visual Basic). Though Visual Basic 6.0 is no longer officially available there remain a sizable number of developers who still prefer Visual Basic 6.0 over .NET. A dialect of Visual Basic, Visual Basic for Applications (VBA), is used as a macro or scripting language within several Microsoft applications, including Microsoft Office.

Program No. 10

Language features
Like the BASIC programming language, Visual Basic was designed to accommodate beginner programmers. Programmers can not only create simple GUI applications, but to also develop complex applications. Programming in VB is a combination of visually arranging components or controls on a form, specifying attributes and actions for those components, and writing additional lines of code for more functionality. Since VB defines default attributes and actions for the components, a programmer can develop a simple program without writing much code. Programs built with earlier versions suffered performance problems, but faster computers and native code compilation has made this less of an issue. Though VB programs can be compiled into native code executable from version 5 on, they still require the presence of around 1 MB of runtime libraries. Runtime libraries are included by default in Windows 2000 and later. Earlier versions of Windows (95/98/NT) require that the runtime libraries be distributed with the executable.

PANKAJ GILL

11/CSE/168

Page

25

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

An empty form in Visual Basic 6.

Forms are created using drag-and-drop techniques. A tool is used to place controls (e.g., text boxes, buttons, etc.) on the form (window). Controls have attributes and event handlers associated with them. Default values are provided when the control is created, but may be changed by the programmer. Many attribute values can be modified during run time based on user actions or changes in the environment, providing a dynamic application. For example, code can be inserted into the form resize event handler to reposition a control so that it remains centred on the form, expands to fill up the form, etc. By inserting code into the event handler for a key press in a text box, the program can automatically translate the case of the text being entered, or even prevent certain characters from being inserted. Programs, can you create with Visual Basic 6? With VB 6, you can create any program depending on your objective. For example, if you are a college or university lecturer, you can create educational programs to teach business, economics, engineering, computer science, accountancy, financial management, information system and more to make teaching more effective and interesting. If you are in business, you can also create business programs such as inventory management system, point-of-sale system, payroll system, financial program as well as accounting program to help manage your business and increase productivity. For those of you who like what games and working as games programmer, you can create those programs as well. Indeed, there is no limit to what program you can create! There are many such programs in this tutorial, so you must spend more time on the tutorial in order to learn how to create those programs.

PANKAJ GILL

11/CSE/168

Page

26

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Properties Window in Visual Basic

PANKAJ GILL

11/CSE/168

Page

27

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Program to Add Sound in Visual Basics 5.0


Option Explicit Private Const SND_APPLICATION = &H80 Private Const SND_ALIAS = &H10000 Private Const SND_ALIAS_ID = &H110000 Private Const SND_ASYNC = &H1 Private Const SND_FILENAME = &H20000 Private Const SND_LOOP = &H2 Private Const SND_MEMORY = &H4 Private Const SND_NODEFAULT = &H2 Private Const SND_NOSTOP = &H10 Private Const SND_NOWAIT = &H2000 Private Const SND_PURGE = &H40 Private Const SND_RESOURCE = &H40004 Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVallpszName As String, ByValhModule As Long, ByValdwFlags As Long) As Long Dim flag As Boolean Private Sub Command1_Click() If Not flag Then Command1.Caption = "Stop" PlaySound "C:\WINDOWS\MEDIA\TADA.WAV", ByVal 0&, SND_ASYNC Or SND_LOOP Else

Program No. 12

End If

PANKAJ GILL

11/CSE/168

Page

PlaySound "C:\WINDOWS\MEDIA\TADA.WAV", ByVal 0&, SND_MEMORY

28

Command1.Caption = "Play"

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY


flag = Not flag End Sub Private Sub Command2_Click() If Not flag Then Command2.Caption = "Stop"

2013

PlaySound "C:\WINDOWS\MEDIA\chimes.WAV", ByVal 0&, SND_ASYNC Or SND_LOOP Else Command2.Caption = "Play" PlaySound "C:\WINDOWS\MEDIA\chimes.WAV", ByVal 0&, SND_MEMORY End If flag = Not flag End Sub Private Sub Command3_Click() If Not flag Then Command3.Caption = "Stop" PlaySound "C:\WINDOWS\MEDIA\chord.WAV", ByVal 0&, SND_ASYNC Or SND_LOOP Else Command3.Caption = "Play" PlaySound "C:\WINDOWS\MEDIA\chord.WAV", ByVal 0&, SND_MEMORY End If flag = Not flag End Sub Private Sub Command4_Click() If Not flag Then Command4.Caption = "Stop" PlaySound "C:\WINDOWS\MEDIA\ding.WAV", ByVal 0&, SND_ASYNC Or SND_LOOP

PANKAJ GILL

11/CSE/168

Page

29

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY


Else Command4.Caption = "Play"

2013

PlaySound "C:\WINDOWS\MEDIA\ding.WAV", ByVal 0&, SND_MEMORY End If flag = Not flag End Sub Private Sub Command5_Click() If Not flag Then Command5.Caption = "Stop" PlaySound "C:\WINDOWS\MEDIA\flourish.WAV", ByVal 0&, SND_ASYNC Or SND_LOOP Else Command5.Caption = "Play" PlaySound "C:\WINDOWS\MEDIA\flourish.WAV", ByVal 0&, SND_MEMORY End If flag = Not flag End Sub Private Sub Command6_Click() If Not flag Then Command6.Caption = "Stop" PlaySound "C:\WINDOWS\MEDIA\ir_begin.WAV", ByVal 0&, SND_ASYNC Or SND_LOOP Else Command6.Caption = "Play" PlaySound "C:\WINDOWS\MEDIA\ir_begin.WAV", ByVal 0&, SND_MEMORY End If flag = Not flag

PANKAJ GILL

11/CSE/168

Page

30

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY


End Sub Private Sub Form_Load() Command1.Caption = "Play" End Sub

2013

PANKAJ GILL

11/CSE/168

Page

31

PRACTICAL FILE OF MULTIMEDIA TECHNOLOGY

2013

Output

PANKAJ GILL

11/CSE/168

Page

32