Flash Interface

Reviews
Shared by: XIAOHUI MA
Stats
views:
31
rating:
not rated
reviews:
0
posted:
10/23/2009
language:
0
pages:
0
RIT Flash Media Player 3.2 User Guide June 2007 RIT Media Player Component ............................................................................... 3 Supported File Formats ..................................................................................... 3 Using the Component ........................................................................................ 3 Dynamic Creation .............................................................................................. 4 Media Player Methods ................................................................................... 4 Property Associations .................................................................................... 5 Setting Media Properties through ActionScript .................................................. 5 Player for the Web ................................................................................................ 6 Passing Parameters .......................................................................................... 6 Parameter String Associations....................................................................... 6 Format ........................................................................................................... 6 Fullscreen .......................................................................................................... 7 Appendix A: Component Parameters.................................................................... 8 Appendix B: Media Info XML .............................................................................. 10 Appendix C: SMIL for Flash Streaming ............................................................... 11 Appendix D: Caption Standards .......................................................................... 12 RIT .................................................................................................................. 12 RIT2 ................................................................................................................ 12 TT (Timed Text)............................................................................................... 13 2 RIT Media Player Component The RIT Flash Media Player Component (RIT FMPC) is a Flash video player much like the FLVPlayback Component in Flash 8 with some added support for multiple formats, captions, and searching. The RIT FMPC is designed to be as flexible as possible providing many options for integration into Flash based content. This documents a few of the ways that the component could be implemented into a project. Supported File Formats  FLV  SWF (from Captivate) Using the Component  Open components panel (Window > components)  Drag RIT Media Player on to the stage  Set player attributes in the Parameters tab of the Properties panel (see Appendix A: Component Parameters for parameter descriptions) NOTE: If RIT Media Player does not appear in the components panel copy the latest version of the component (SWC file) to the components folder and restart Flash. 3 Windows: Documents and Settings\username\Local Settings\Application Data\Macromedia\flash version\language\Configuration\Components Macintosh: HD/Applications/flash version/Configuration/Components Dynamic Creation The RIT Media Player can be created dynamically through ActionScript to fit into an existing Flash Application, or a new application with other dynamic content. Example: var iniObj:Object = {mediaPathXML:”video/media.xml”, playerSkin:"skins/skin.swf", numCapLines:2, centerPlayer:true, dynamicSize:false, isSearchable:true, fullscreenable:false}; var player = this.attachMovie("RIT Media Player", "myPlayer", this.getNextHighestDepth(), initObj); player.setSize(360, 300); NOTE: Because the component does not inherit from UIObject the createClassObject method cannot be used; instead attachMovie must be used. Media Player Methods setSize ( width:Number, height:Number ) Sets the size of the player passed on width and height parameters. getWidth ( ) Returns the width of the player. getHeight ( ) Returns the height of the player. getCurrentTime ( ) Returns the current playhead time of the media in seconds. externalSearch ( search:String ) Execute search, based on parameter, within the player. restorePlayback ( ) Removes onPress from player container and starts media playback. originally for web when returning from fullscreen video window 4 Property Associations Property numCapLines (Number) defaultCapsOn (Boolean) centerPlayer (Boolean) charsPerLine (Number) dynamicSize (Boolean) fitToStage (Boolean) fullscreenable (Boolean) mediaPathXML (String) scrollCaps (Boolean) isSearchable (Boolean) playerSkin (Boolean) ticket (String) mediaArray (Array) Component Parameter Caption Lines Captions Default On Center On Stage Characters Per Line Dynamic Size Fit to Stage Fullscreen Option Path to Media XML Scroll Captions Searchable Skin Ticket not a component parameter, used to override the need for Path to Media XML See Appendix A: Component Parameters for parameter definitions Setting Media Properties through ActionScript The component allows media information to be passed in directly from ActionScript rather than through the XML file specified by “Path to Media XML” parameter or the mediaPathXML property. This allows developers to create their own schema for loading media properties. Example: var mediaArray:Array = new Array(); mediaArray["fileName"] = “video/video.flv”; mediaArray["mType"] = “flv”; mediaArray["mediaWidth"] = 320; mediaArray["mediaHeight"] = 240; mediaArray["mFPS"] = 15; mediaArray["capFile"] = “video_captions.xml”; mediaArray["timeBase"] = “sec”; mediaArray["capType"] = “rit”; var iniObj:Object = {mediaArray:mediaArray, numCapLines:2, isSearchable:true}; var player = this.attachMovie("RIT Media Player", "myPlayer", this.getNextHighestDepth(), initObj); 5 Player for the Web The RIT Media Player allows a single SWF file (containing the component) to be very flexible. Leveraging the component parameters can allow a single file to be used any number of times throughout a site. Passing Parameters Rather than publishing a new SWF for each video, a FlashVar called paramString containing component parameters can be passed into the embedded SWF. The component then checks paramString for parameters when it is created. Parameter String Associations Parameter String cl dco cp cpl ds fts f mp sc s ps t fullscreen Component Parameter Caption Lines Captions Default On Center On Stage Captions Per Line Dynamic Size Fit to Stage Fullscreen Option Path to Media XML Scroll Captions Searchable Skin Ticket not a component parameter, but if set to '1' or 'true' the player becomes scalable and disables fullscreen button See AppendixA: Component Parameters for parameter definitions Format The format of paramString must be a series of name=value pairs; however, rather than & the pairs must be separated by ¶ to prevent Flash from parsing the string and making each parameter its own root level variable. Example: 6 Fullscreen The fullscreen button calls fullscreen(), a JavaScript function expected to be accessible from the location of the embedded Flash object. Below is an example of how the fullscreen() method may be defined. Example: function fullscreen(){ fullWindow = open(„fullscreen.html?‟+queryString, 'mywindow', 'width='+screen.availWidth+',height='+screen.availHeight+'l eft=0,top=0,'); } NOTE: When clicked, the fullscreen button also suspends playback and disables the current player so it must be clicked by the user or manually enabled with the restorePlayback() method (see Media Player Methods). 7 Appendix A: Component Parameters Caption Lines: Number of lines the closed caption window will display. There is no limit, but more lines will decrease video size. Captions Default On: If set to true, captions are on when player starts. If false, captions must be turned on by the user. Center On Stage: A value of true moves the player to the center of the stage. Characters per Line: The number of characters that can fit on a caption line (text scales to fit available space based on this value). 32 Characters is recommended based on television broadcast standards. The player can handle more characters but should be tested to ensure text readability. Dynamic Size: If set to true, this will force the player to fit to the size of the media being loaded (overrides any manual sizing). If this is set to true make sure that the video sizes that you are using are compatible with your characters per line setting. Fit to Stage: If set to true, this scales player to fill the entire stage. Fullscreen Option: If set to true, this adds a full screen button to the control bar (for web only, requires a fullscreen() javascript function). Path to Media XML: Path to the XML file containing information about the Video File. If you are streaming video, this will be the path to an XML file containing a link to a SMIL file (that will handle the bandwidth detect). See Appendix C: SMIL Flash Streaming for information about the SMIL file used for Flash Bandwidth detect. Bandwidth detect requires the use of a Flash Media Server. Scroll Captions: If set to true, when captions update caption lines move up one line and the new caption is displayed on the bottommost line. If set to false, all caption lines are updated at once with new captions (pop-on). Searchable: A value of true adds search functionality to the player (requires captions to search). Secure: If set to true, authentication for streaming video is required (see Ticket) For more information on implementation contact Ian Webber at jiwetc@rit.edu. Skin: Path to swf file containing visual elements to replace the defaults (see the “SampleSkin.fla” for an example of a skin layout). 8 Ticket: Used to authenticate connection for a streaming flv when "Secure" is enabled (generally passed in from webpage, not set in component inspector). 9 Appendix B: Media Info XML An XML file that contains the information about the media clip being referenced. media: Complex Element - Contains elements describing the media to be played.    title: String - Attribute containing the title of the media clip. mediaSRC: String - Element containing the (absolute or relative) path to the media file. mediaType: String - Element indicating filetype of the media as:  “swf” - Standard SWF from flash (not yet fully supported)  “cap_swf” - SWF file exported from Captivate  “bre_swf” - SWF published from Breeze Presenter  “flv” - Flash video file mediaWidth: Number - Element containing the width of media file in pixels. mediaHeight: Number - Element containing the height of media file in pixels. mediaFPS: Number - Element containing frame rate of the media file. capFileSRC: String - Element containing the path to the XML that contains the caption data. capTimeFormat: String - Element containing the time format of the captions as:  “mil” - milliseconds  “sec” - seconds  “frames” - frames capType: String - Caption format as: (see Appendix D: Caption Standards)  “rit” – Version 1 of RIT caption standard  “rit2” – Version 2 RIT caption standard  “qt” – Captions converted from QuickTime text files into XML  “tt” – Timed Text (W3C standard)       10 Appendix C: SMIL for Flash Streaming This is the file used by the Video Competent provided with Flash 8. This file requires the use of a Flash Media Server. NOTE: To use the RIT Flash Media Player, you will need to make sure that you have the latest version of Adobe’s FLVPlayback component for Flash. You can download the latest version from: http://www.adobe.com/support/flash/downloads.html Example: 11 Appendix D: Caption Standards There are currently three XML standards that are supported by RIT Media Player. RIT RIT’s original XML captioning standard. captions: Complex Element - Contains caption data. start: string - attribute of “cap” with the cue point (time) for the caption. cap: string - element containing the text for the audio. Example: (MUSIC). HI. I'M STARTING HERE WITH SESSION 2, TAKING UP WHERE WE RIT2 Update to original caption standard (RIT) including addition of the speaker field. captions: Complex Element - Contains elements that hold the caption data. caption: Complex Element – Contains elements with data for a line of captions start: string - attribute of “caption” with the cue point (time) for the caption. speaker: String – element containing who is speaking cap: string - element containing the text for the audio. Example: (MUSIC) HI, I AM JOEANN HUMBERT, THE DIRECTOR OF ONLINE LEARNING AT 12 TT (Timed Text) A small subset of the standard specified by the W3C (http://www.w3.org/AudioVideo/TT/). Style and layout information can be included, but that information is striped and only the text is displayed. tt: Complex Element - Contains elements that hold all relevant caption data. body: Complex Element – Must contain all the actual captions div: Complex Element – logical container for related captions. p: string - element containing the text for the audio. begin:String – attribute of “p” with the cue point (time) for the caption. dur:String – (optional) attribute of “p”, time the caption should be visible. Example:

This is the first caption.

This is caption 2.

Here is another.

13

Related docs
FLASH
Views: 61  |  Downloads: 10
flash tutorials
Views: 205  |  Downloads: 30
Flash-Tracking-with-Variables
Views: 0  |  Downloads: 0
Flash Tutorial
Views: 1085  |  Downloads: 46
Bulletin flash
Views: 0  |  Downloads: 0
Flash Tips
Views: 96  |  Downloads: 4
Interface Research
Views: 2  |  Downloads: 0
The Future of Flash
Views: 218  |  Downloads: 35
Flash tutorial
Views: 49  |  Downloads: 8
Learning Flash Mx
Views: 135  |  Downloads: 49
premium docs
Other docs by XIAOHUI MA
Group Exercise Schedule - ymcadcorg
Views: 78  |  Downloads: 0
FT 240
Views: 67  |  Downloads: 0
Fitness-Pilates for Pregnancy Handout
Views: 74  |  Downloads: 1
Fitness-Pilates Exercises
Views: 75  |  Downloads: 0
FINAL PARADE LINEUP 2006 - City Of Belvedere
Views: 71  |  Downloads: 0
Exercise for Life
Views: 72  |  Downloads: 0
Directory - cmslgflnet - LGfL
Views: 94  |  Downloads: 0
CSP Student Representatives Conference
Views: 78  |  Downloads: 0
Covenant Wellness Center Schedule
Views: 98  |  Downloads: 0