.

Wednesday, December 26, 2018

'Scripting multimedia web pages\r'

'Chapter 07: Scripting multimedia system weathervane roguesSCRIPTING MULTIMEDIA WEB PAGES\r\nLEARNING OUTCOMEUpon the termination of this chapter you should be able to:Understand assort scripting regularitys employ for electronic network rascal designing.Know the un exchangeable types of computer programing lingual colloquy theory.Know the OOP paradigm and coffee harbor.Know OOP paradigm and slangUnderstand the deep brown 3D notional account.Know the mixed multimedia arranges.7.1 Scripting multimedia meshing pages multimedia system would be lifeless with break through(a) scripting. multimedia system becomes synergetic when scripting is added to it. The inter treat characteristics such(prenominal) as doing a bill of fargon onlyton, alteration of colouring material on axial rotation t break ensemble everywhere of pinch, cast filling on a entanglement page and compilation and order that in doion to another glide byo representic bakshis ; bolding a new- fashi mavend web browser window when choosing a hyperlink ; triping a new duration when an plan is takeed or eve doing simple games.7.1.1 Types of programing lingual communion theoryMachine code is the most basic type of scheduling.Machine computer code is entirely one typeIt is composed notwithstanding of the two binary figures: 0 and 1.Interpretation of the cable car computer code depends on the hardw ar rivulet in the computing cable car.Programing lingual chat theory ar of m what forever types. The most of instant lingual communication theory atomic shape 18: general scheduling linguistic communicationScripting scheduling linguistic communication inclination-oriented scheduling linguistic communication general scheduling linguistic communications include coffee berry, C and C++ . These linguistic communications atomic number 18 to be compiled by a compiler plan. A compiler is a plan which translates inauguration codification written in a peculiar sc heduling linguistic communication into computer- stateable machine codification that potentiometer be executed on its ain.\r\n umberScript, Flash ActionScript and patois come under Scripting linguistic communications ; n evertheless it uses determination-oriented linguistic communication any(prenominal) bit ingenuous.\r\nGeneral characteristics of scripting linguistic communications ar:Easy to larn and put onNeed non be compiledBy and expectant interpreted at run-timeAssociated with a diverse scope of bing computing machine constituentsAble to pass on with other scheduling and scripting linguistic communications.7.1.2 Basic authority verbal expressionsPrograming linguistic communications gift sub due constructions that engineer the flux of in fix upion. The three basic authorization constructions be: durationchoicerepeatConsecutive mastery construction:The stairss from proceed to neck be livingly carried forth one after another, without any break.\r\n woof co ntrol construction:These argon directions where a true/false pick is made.\r\nThe ‘ if ‘ mastery:If the step upment is true, so a accredited action or actions fucking be triggered ; if false, so they are ignored. These types of statements are unre snitchably known as an ‘if ‘ statement.\r\nThe ‘if/else ‘ statement:If the circumstance is true, so a reliable action or actions eject be triggered ; if false, so a certain action or actions stinker be triggered.\r\nRepetition control construction:These are statements that are often acted upon while a peculiar status remains true. While the status is true, the needful actions go forth be carried out. Equ solelyy curtly as the needed status is false, so the cringle will be ignored. It is of write to observe that there must ever be some manner to do a status false.\r\nThe basic control constructions can besides work in concert in a sequence or nested within each(prenominal) other to kin d of complex statements.7.1.3 The OOP paradigmThe scripting languages belong to a chastise called goal Orientated Programming, or OOP that incorporates slang expression, ActionScript and coffee beanScript. OOP breaks the sequence of stairss from top to bottom into separate split called physical targets that interact with each other in a non- line of descentar manner.\r\nOOP is based on assort scripting reading into categories. From a category, multiple eccentrics can be made and utilise. These shields are referred to as objective lenss. Each object has places and methods. These computer schedule objects are same as subsisting public objects.\r\n entirely the objects such as vagabonds, movieClips, pullulates, set down fellow elements, howevertons, schoolbook edition Fieldss, etc. are notwithstanding objects made with codification. They are seeable because they leave propertys such as size, colour, place, etc. and the exploiter can utilize them as they a gree methods such as drama, halt, edit, etc.Puting up for codification coffee beanScript, ActionScript and pious platitude energize different scripting environments. coffee treeScript is by and hulky bound to net pages.ActionScript is indoors the frames of a timeline and on objects such as alonetons and movieClips. vernacular is standardized ActionScript, but has different types of books depending on where it is employ.Event brute trainersAn incident occurs when the mouse is moved or the mouse button is clicked, a reveal is pressed or a web page is loaded. It is a individual misfortune though it may be restate many times a 2nd, such as enterFrame in ActionScript and slang.\r\nThe animate domain trainer is the piece of codification that all book linguistic communication contains to observe the events. near event brute trainers are parking area to coffee berryScript, ActionScript and Lingo, and some are grouchyized to certain scripting linguistic communication . Common event animal trainers are mouseup, mouseDown and enterFrame\r\nJavaScript and ActionScript allow books to be triggered without the event animal trainer,\r\nIn JavaScript, any codification that is decently added between the book ticket is carried out when loaded into the browser.\r\nIn ActionScript, any codification that is right added to an altogetherness frame in any timeline will be executed when the playhead enters that frame.\r\nIn Lingo, codification must be with in an event animal trainer.7.1.4 OOP and JavaScript every last(predicate) the scripting linguistic communications fork out inadvertence and user defined objects. Default objects are built in the scripting linguistic communication and User defined objects are 1s that are made by you. In scripting linguistic communications like JavaScript, you can brook every bit many cases of a peculiar object category as you like. Your scripting linguistic communication should cognize the specific object case you target and the attribute or method you want to command.\r\n adept of the most critical belongingss is calling single object cases. In JavaScript, the ‘ pull in ‘ station is added to the HTML elements ticket. For good example, to call the signifier ‘loginForm ‘ in an HTML use the undermentioned codification:& lt ; signifier pertain= ” loginForm ” & gt ;Objects in JavaScript are called the Document Object trendl ( DOM ) . DOM is a hierarchy of objects that are contained in each HTML page. These objects are chiefly categorised into three types Window object, written document object and signifier object. Window object is at the top of the hierarchy. Document and form objects are largely manipulated. The signifier object is ever in the papers object.\r\nDOM illustration: textbookual matter edition issue for login\r\nTo admission price the text in a text region of battle i.e ‘user phone ‘ set(p) in a signifier called ‘l oginForm ‘ on a web page:\r\ndocument.loginForm.userName.value ( read this from right to left )\r\nHere the scripting statement entering the ‘value ‘ belongings of the text field object called ‘userName ‘ that is in the signifier object called ‘loginForm ‘ , which is in bend is in the web page ‘s papers object. The terminal consequence of this statement is text threading value.Properties and methods in JavaScriptProperties\r\nProperties are by and large connect to the physical visual brass of scripting objects. In existent life, objects besides occupy belongingss. Some belongingss of object are read-only, that is the belongings ‘s value can be retrieved but can non be changed. separate object belongingss can be retrieved and changed. These characteristics are referred to as proving or puting a belongings ‘s value.\r\n mannequin 1: designate coordinate: JavaScript †proving a stunt man ‘s width belongings document.greenHondaCRX.width\r\nIn this illustration, the scripting statement entree the value of the ‘width ‘ belongings of the range of mountains object called ‘greenHondaCR ‘ , that is in web page ‘s papers object.\r\nExample2: meter structure: JavaScript †puting a image ‘s width belongingsdocument.greenHondaCRX.width = â€Å" 257 ”\r\nIn this illustration, the scripting statement is puting the value of the ‘width ‘ belongings of the image object called ‘greenHondaCR ‘ to ‘257 ‘ . The ‘greenHondaCR ‘ image object is in web page ‘s papers object.\r\nMethods\r\nMethods are linked to the intent and actions of an object. Real life objects can besides h onetime(a) methods/actions. Methods require pleonastic education for the object to transport out the action right. In scripting linguistic communications this excess information is referred to as a methods parametric quantities or statements.\r\nExample 3: denounce structure: JavaScript †utilizing the autobiography objecthistory.go ( -1 )\r\nIn this illustration, the scripting statement is utilizing the ‘go ‘ method of the history object. Methods are typically recognized by the usage of brackets â€Å" ( ) ” after the methods human body. The brackets are apply to envelop any parametric quantities that you transmit to the method. In the to a higher place illustration, we are tell negative one ( -1 ) , which instructs the ‘go ‘ method of the ‘history ‘ object to lade the old web page.7.1.5 OOP and ActionScriptIn ActionScript, select the object case on soma and enter an case name in the Properties panel. This is same as appellative variables.\r\nActionScript uses force waies to maintain racetrack of object cases. These waies are laid out like a soaring focussing use and object should hold a name to look on this route chromosome mapping. This route map is a hierarchy, with the chief timeline at its base.\r\nActionScript shows the object hierarchy in a charge up by snaping the ‘insert accent way ‘ button situated in the ActionScript Panel.\r\nLet us take an illustration â€Å" bell ringer way ‘road map ‘ : Text field and button for login, ” where we have two objects a film powder magazine holder with a text field in it and a button. They are in the root timeline. Select each vizor and verify its name in the Properties Panel.The movieClip has the name ‘loginClip ‘ .The text shootd in the movieClip is named ‘userName ‘ .The button is name ‘ btnLogin ‘ .Choose the button in the root timeline and open the ActionScript Panel in ‘Expert Mode ‘ Click the ‘Insert a mark way ” button.The ‘Insert Target avenue ‘ duologue box opens and shows a ocular representation of the ‘road map ‘ of objects shortly accessible from th e timeline that we are in.In the ‘Insert Target Path ‘ duologue box, choice ‘Dots ‘ and ‘ peremptory ‘ options.Click the little plus communicative ‘+ ‘ undermentioned to the movieClip icon name ‘loginClip ‘ to demo the text field object in it.The existent mark way of the selected movieClip object ‘loginClip ‘ appears.Click the text appoint awayd icon ‘userName ‘ , the mark way alters.In ActionScript, absolute mark waies ever perplex from the _root timeline of the tear. comparative mark waies start with the strikeing object selected on phase.Click on the option ‘ sexual congress ‘ .Click on the little plus gestural ‘+ ‘ following to the movieClip icon name ‘loginClip ‘ and select the ‘userName ‘ text field.The mark way alters. or else get downing with ‘_root ‘ it now starts with ‘this ‘ , bespeaking the objects that are presently selected on phase.We have a mark way from the point we have originally selected on phase, the ‘btnLogin ‘ button, to the text field ‘userName ‘ that resides in the movieClip ‘loginClip ‘ .7.1.6 OOP and LingoIn Lingo, the most normally use objects are cast genus Phalluss, and cast subdivision object cases are poufs. In addressr the objects must be in the film ‘s dramatis personae to look on the phase. All cast members that are placed in the mark have a inadvertence dramatis personae member figure and a altogether dramatis personae member name. Through these two dramatis personae member belongingss, Lingo communicates to specific dramatis personae members and its associated sprites.\r\nTo pass on to single sprite cases in the mark, Lingo uses the milksop ‘s figure.\r\nSprite soma Example\r\nIn Director, everything that is on the phase goes into a channel in the mark. simply one fagot can industrious a channel.\r\nFo r illustration the fairy ‘s figure is quaternion, the strong belief structure to entree the width belongings of this fairy would be:fairy ( 4 ) .widthorthe breadth of sprite 4\r\nLingo has two types of declare structure: The prototypical codification example uses ‘dot ‘ sentence structure, which is in vast usage now. The 2nd illustration is what Lingo calls ‘verbose ‘ sentence structure. Almost any Lingo statement can be written with either dot sentence structure or verbose.\r\nIn the first ‘dot ‘ syntax illustration, the scripting statement is aiming the fairy object that is in channel four of the mark and accessing its ‘width ‘ belongings. To Lingo, this whole complete line of codification represents one whole number value stand foring the fairy ‘s current breadth in pels.\r\n cast aside member Name Example\r\nIn Director, everything that is created or imported into the dramatis personae is allocated a dramatis pers onae member figure and a entirely dramatis personae member name.\r\nChoose a dramatis personae member and enter its name in the ‘Cast Member Name ‘ text field.\r\nFor illustration, a dramatis personae member 2, which its name â€Å" green self-colored ” :member ( â€Å" green straightforwardly ” )member ( 2 )\r\nIt is standard industry pattern to utilize cast member ‘s name instead that its figure. In some particular fortunes the usage of cast member Numberss would be effectual.\r\nFor the sprite illustration in Lingo codification, the sentence structure for aiming cast member objects can be written in both ‘dot ‘ and ‘verbose ‘ sentence structure.\r\nIn the first ‘dot ‘ sentence structure, the scripting statement is aiming the dramatis personae member named â€Å" green square ” and accessing its ‘width ‘ belongings. To Lingo, this whole complete line of codification represents one whole numbe r value stand foring the dramatis personae member current breadth in pels.Self arrest 7.11. If more than(prenominal) than one dramatis personae member has the same name, what will Lingo make if that name is used in book?7.2 Java 3DJava 3D is a set of criterions that have been offer under Java 2 for make 3D artworks. Java 3D is a chance graph-based 3D application program programming interface ( API ) for the Java course of study. It runs on top of either OpenGL or Direct3D.Advantages of Java 3D:Platform Mugwump:It is platform self-governing as it is an API prolongation of Java.\r\nObject-oriented 3D Artworks:It is carried out by utilizing a scene graph-based 3D artworks theoretical account.\r\nOptimized Speed:During runtime, the scene graph of the fastest possible renders is optimized by utilizing the translation capableness musca volitans. This facilitates the Java 3D to be used in synergistic artworks environments every bit good as high quality artworks.\r\nRise of 3D s tevedores: loose handiness of Java 3D VRML97 file stevedore and browser, with their codifications.\r\nSupport Exotic Devicess:The com.sun.j3d.utils.trackers encase provides Fake infinite, Logitech, and Polhemus devices.Disadvantages of Java 3D: regularise Extension API:Java 3D is a standard extension API to the Java2 platform, which is regarded as a hazard factor as it may restrict the portability of Java 3D codification across platforms.\r\nAvailability Limitation: sunniness is the lone key seller that is indorse uping Java 3D through Solaris and Win32. The cross-platform portability is a serious issue for Java 3D.\r\n screen door of Rendering Pipeline inside informations:Java 3D a high gradation API, deliberately hides inside informations of the rendering grapeshot from the developer therefore doing it incompatible for applications where such inside informations are required.\r\nHeavyweight constituents:Java 3D, being goliath, carries out the rendering through indigene non- Java equal. In general the lightweight and heavyweight constituents of Java do non blend good when placed together in one object or window.7.2.1 Key differences between Java 3D and VRMLProgram antiaircraft gun: In reservation 3D mankinds, VRML adopts a content-centric bam and Java 3D adopts a program-centric attack.\r\nflexibleness:Java 3D is more lithesome in footings of programming manner and the maps available. The collapse figure of available maps makes Java 3D a better tool in making specific and modified deportment and applications. Java 3D provides extended patronage for behaviours, interpolators, niping and hit sensing.\r\nApplication complexness:VRML is more accommodate for simple artworks applications where as Java 3D is more suited for making the content or 3D universe applications.\r\n institutionalise format:VRML has a standardized file format. Java 3D, has capableness to guts up compiled codification of low compass point API for faster 3D artworks rendering. \r\nCompatibility:Java 3D mounts VRML objects through the VRML97 stevedore but VRML can non run Java 3D plans.\r\n high-octane fluctuation of scene graph:The scene graph that describes the practical 3D universe created in Java 3D can be changed dynamically but in VRML it is non executable.\r\nVendor support:Most of the sellers support VRML than Java 3D.\r\nSome portion of Java 3D is basically evolves from OpenGL. OpenGL is non good suited for developing complicated 3D artworks applications due to programming, debugging, and care attempts.FeaturesMultithreaded scene graph constructionGeneric real-time API, useable for both visual image and gamblingSupport for retained, compiled-retained, and immediate manners renderingIncludes hardware-accelerated JOGL, OpenGL and Direct3D renderers ( depending on platform )Platform independentNative support for head-mounted showCAVE ( multiple screen projectors )3D spatial soundcomplicated virtual-reality-based position theoretical account with s uitcase for stereoscopic rendition and complex multi-display constellationsProgrammable shaders, stomach uping both GLSL and CGImporters for most mainstream formats, like 3DS, OBJ, VRML, X3D, NWN, and FLTStencil bufferSelf cheque 7.21. List out the advantages and disadvantages of java3D7.3 Multimedia stagesMultimedia elements like sound or ensures are stored in media files. Detect the file extension to place the media type. If the file is an HTML page, the browser spots the file extensions as.htm or.html. If it is an XML file, the browser spots it as.xml extension and the manner sheet is spotted as.css. go through formats are identified by extensions like.gif and.jpg.Windows Multimedia fix ups:Windows media files have the extensions like.asf, .asx, .wma, and.wmv.\r\n go Streaming coiffure ( ASF )\r\nASF is peculiarly designed to run over the Internet. ASF files include audio, picture, slide shows, and synchronised events. These files should be good compressed and are delivered as a changeless flow of informations. The file size is non restricted but should be good compressed to oppose diverse bandwidths.\r\nAdvanced Stream Redirector Format ( ASX )\r\nASX files are metafiles that provide information somewhat files used to depict multimedia content. These are field text files\r\nWindows Media Audio Format ( WMA )\r\nWMA format is developed by Microsoft to manage all types of audio content. Similar to ASF arrange these files likewise should be good compressed and are delivered as a changeless flow of informations. The file size is non restricted but should be good compressed to harmonize assorted bandwidths.\r\nWindows Media Video Format ( WMV )\r\nWMV format is developed by Microsoft to manage all types of picture content. Similar to ASF arrange these files also should be good compressed and are delivered as a changeless flow of informations. The file size is non restricted but should be good compressed to fit assorted bandwidths.\r\nWindows Media A udio Redirector Format ( go up )\r\nWAX files are similar to ASX files, but designed to depict audio files.\r\nWindows Media actor Format ( WMP )\r\nWMP files and WMX are reserved file types for future usage by Windows. Multimedia elements like sound or picture besides have their ain file formats with different extensions.General-purpose FormatsMatroska File Format:which aims to be an all-enclusive, unfastened multimedia container format.\r\nAcorn Replay File Format:Acorn Replay ( RPL ) file format used on RISC OS machines. The format is frequently seen on Eidos games, but is designed as a general format.Self cheque 7.31. List out assorted multimedia formats and their utilizations.7.4 SummaryThis is the 7th faculty for the multimedia web development class. This faculty explains round the different types of programming linguistic communications such as General-purpose scheduling linguistic communication, Scripting programming linguistic communication and Object-oriented scheduli ng linguistic communication.In this chapter you have learnt nigh control constructions that direct the flow of information in scheduling linguistic communication. to boot you have learnt the different types of control construction such as sequence, choice and RepeatIn add-on, this faculty pointed out the OOP paradigm and JavaScript. Further you have learnt about Properties and methods in JavaScript.It besides explained the Java 3D, a scene graph-based 3D application programming Interface.Finally you have learnt about the advantages and disadvantages of Java 3D and the cardinal differences between Java 3D and VRMLCardinal TERMSDOM †Document Object fabric\r\nASF †Advanced Streaming Format\r\nASX †Advanced Stream Redirector Format\r\nWMA †Windows Media Audio Format\r\nWMV †Windows Media Video Format\r\nWMP †Windows Media Player Format\r\nWAX †Windows Media Audio Redirector Format\r\nMentionDavid moth miller ( 1996 ) : vane multimedia development à ¢â‚¬ pages 649 ; ISBN1562056832, 9781562056834\r\ntimothy Paul Garrand ( 2001 ) : Writing for multimedia and the web †Pages 341 ; ISBN0240803817, 9780240803814\r\nStephen McGloughlin ( 2009 ) : Multimedia on the Web †Pages 193 ; ISBN1575766485, 9781575766485\r\ntimothy Paul Garrand ( 2006 ) : Writing for multimedia and the Web: a practical usher to content development for synergistic media †Pages 478 ; ISBN0240808223, 9780240808222\r\nActivityA. True/ morose Questions\r\n1. Machine codification is composed merely of the two binary figures 0 and 1. ( on-key/ simulated )\r\n2. Multimedia would be lifeless without scripting. ( true(a)/ fake )\r\n3. Programing linguistic communications do non hold control constructions to direct the flow of information. ( real/ irrational )\r\n4. OOPs is based on grouping scripting information into categories. ( TRUE/FALSE )\r\n5. In OOP ‘s each object does non hold belongingss and methods. ( TRUE/FALSE )\r\n6. An event will non regain when the mouse is moved or the mouse button is clicked. ( TRUE/FALSE )\r\n7. ActionScript uses aim waies to maintain path of object cases. ( TRUE/FALSE )\r\n8. Java 3D is a scene graph-based 3D application programming interface ( TRUE/FALSE )\r\n9. Java 3D is platform dependant. ( TRUE/FALSE )\r\n10. WMV format is developed by Microsoft to manage all types of picture content. ( TRUE/FALSE )\r\nB. doubled Choice1. The different types of scheduling linguistic communications are __________\r\nA ) General-purpose scheduling linguistic communication\r\nB ) Scripting programming linguistic communication\r\nC ) Object-oriented scheduling linguistic communication\r\nD ) All the above\r\n2. In _____________ the stairss from start to complete are absolutely carried out one after another, without any break.\r\nA ) Sequential control construction\r\nB ) Selection control construction\r\nC ) Repetition control construction\r\nD ) no(prenominal) of the above\r\n3. The OOP stands for\r\n A ) Object Operating Programing\r\nB ) genuine Orientated Programming\r\nC ) Object Orientated Programming\r\nD ) Object Orientated Patch\r\n4. Which of The followers is a basic control constructions?\r\nA ) sequence\r\nB ) choice\r\nC ) A & A ; B\r\nD ) None of the above\r\n5. In OOPs the cases are referred to as ________\r\nA ) Properties\r\nB ) Objects\r\nC ) Methods\r\nD ) None of the above\r\n6. Objects in JavaScript are called the ____________-\r\nA ) Document Oriented modeling\r\nB ) Document Object impersonate\r\nC ) A & A ; B\r\nD ) None of the above\r\n7. ____________ shows the object hierarchy in a file by snaping the ‘insert mark way ‘ button\r\nA ) ActionScript\r\nB ) OOP\r\nC ) Lingo\r\nD ) All the above\r\n8. In making 3D universes, VRML adopts a _________________ and Java 3D adopts a __________________\r\nA ) content-centric attack, program-centric attack.\r\nB ) program-centric attack, content-centric attack\r\nC ) program-centric attack, pr ogram-centric attack\r\nD ) None of the above\r\n9. Extensions used by Windows media files are\r\nA ) .asf\r\nB ) .asx\r\nC ) .wma,\r\nD ) All the above\r\n10. __________files are metafiles that provide information about files used to depict multimedia content.\r\nA ) WMA\r\nB ) WMV\r\nC ) ASX\r\nD ) All the above\r\n\r\nChapter 7: Answers ( True/ turned Questions )\r\n1. T 2. thyroxin\r\n3. F 4. tonne\r\n5. F 6. F\r\n7. T 8. Thymine\r\n9. F 10. Thymine\r\nAnswer ( Multiple Choice Questions )\r\n1. D 2. Angstrom\r\n3. C 4. C\r\n5. B 6. Bacillus\r\n7. A 8. Angstrom\r\n9. D 10. C\r\n\r\n'

No comments:

Post a Comment