spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column20


The ActiveMovie Control Properties

Developer News
Metasploit 3.2 Offers More 'Evil Deeds'
'Thank You Apple. Seriously.'
The Buzz: BlackBerry App Store Seen Next

Internet Explorer uses the ActiveMovie Control to play sound tracks embedded in Web pages. ActiveMovie Control is a programming interface for Microsoft's DirectShow media architecture that supports many media formats and operations on them. ActiveMovie supports media tracks embedded in <EMBED>, <OBJECT>, and <IMG> HTML tags. The <OBJECT> and <IMG> HTML tags will be covered in the next column, but the ActiveMovie Control interface explained in this and following pages applies to them as well. Although ActiveMovie Control supports many media formats, this column deals only with the audio ones.

The ActiveMovie Control programming interface includes control properties, methods, events, property sheet, and shortcut keys. Their names are case-insensitive, so, for example, all the following methods will stop a playing sound track: Stop(), stop(), sTop(), and stoP().The following table summarizes the control object properties, accessible by JavaScript:

PropertyDescription
AllowChangeDisplayMode = true | falseSpecifies whether or not the user can change the display panel to show frames instead of seconds. Default is true.
AllowHideControls = true | falseSpecifies whether or not the user can hide the control panel at run time. Default is true.
AllowHideDisplay = true | falseSpecifies whether or not the user can hide the display panel at run time. Default is true.
Appearance = 0 | 1Specifies the appearance of the display panel border. Appearance = 1 specifies an inset border which gives the illusion of depth. Appearance = 0 indicates the display panel has no border. Default is 1.
AutoRewind = true | falseSpecifies whether or not to rewind the sound track to the initial position. Default is true.
Balance = nSpecifies the stereo balance. Ranges between -10000 (left channel only), through 0 (perfect balance), and 10000 (right channel only).
BorderStyle = 0 | 1Specifies the control border's style. BorderStyle=0 indicates no border, while BorderStyle = 1 means a single-line border. Default is 1.
CurrentPosition = nSpecifies a new position into the sound track, in seconds from the beginning of the track.
CurrentStateSpecifies the current state of the sound track: stopped (0), paused (1), or running (2). You cannot set this property, just read its value. You can change its value by calling the Stop(), Pause(), or Play() methods.
DisplayBackColor = colorSpecifies the display panel's background color. First way to specify colors is by normal RGB colors. The valid range for normal RGB colors is between 0 and 16,777,215 (00ffffff). The high byte of this number is zero. The lower three bytes determine, from least to most significant byte, the amount of Red, Green, and Blue, respectively. Each color is represented by a number between 0 and 255 (ff). The second way to specify color is by system color constants listed in the Object Browser's object library. The operating system substitutes the user's choices as specified in the Control Panel settings.
DisplayForeColor = colorSpecifies the display panel's foreground color. First way to specify colors is by normal RGB colors. The valid range for normal RGB colors is between 0 and 16,777,215 (00ffffff). The high byte of this number is zero. The lower three bytes determine, from least to most significant byte, the amount of Red, Green, and Blue, respectively. Each color is represented by a number between 0 and 255 (ff). The second way to specify color is by system color constants listed in the Object Browser's object library. The operating system substitutes the user's choices as specified in the Control Panel settings.
DisplayMode = 0 | 1Specifies whether the display panel shows the track position in seconds (DisplayMode=0) or frames (DisplayMode=1). Default is 0.
EnableContextMenu = true | falseSpecifies whether or not to enable the shortcut menu. You can invoke this menu by right-clicking anywhere on the control. Default is true.
Enabled = -1 | 0Specifies whether the control panel is enabled (Enabled=-1) or not (Enabled = 0). Default is -1.
EnablePositionControls = true | falseSpecifies whether or not to show the position buttons in the control panel. Default is true.
EnableSelectionControls = true | falseSpecifies whether or not to show the selection buttons in the control panel. Default is true.
EnableTracker = true | falseSpecifies whether or not to show the trackbar control in the control panel. Default is true.
FileName = URLSpecifies the file name where the sound track is stored.
PlayCount = nSpecifies the number of times to loop the sound track.
rate = dSpecifies the playing speed with respect to its authored one. rate = 1.0 indicates a normal sound playing. rate = 2.0, for example, indicates a double speed. Audio tracks are difficult to understand when rate < 0.5 and when rate > 1.5
ReadyStateReturns the control's state of readiness. There are four possible return values: 0 if the control is synchronously loading a file, 1 if the FileName property has not been initialized, 3 if the control has loaded enough data to start playing but not all data, and 4 if all data has been downloaded. This property is read-only and cannot be set. The play() method will work only if ReadyState is equal to or greater than 3.
SelectionEnd = nSpecifies the desired end position in seconds from the beginning of the sound track. The property is accessible only after the file is loaded completely. Shown on the digital display panel.
SelectionStart = nSpecifies the desired start position in seconds from the beginning of the sound track. The property is accessible only after the file is loaded completely. Shown on the digital display panel.
ShowControls = true | falseSpecifies whether or not to show the control panel. Default is true
ShowDisplay = true | falseSpecifies whether or not to show the display panel. Default is true
ShowPositionControls = true | falseSpecifies whether or not to show the position controls. Position controls include four buttons: Previous, Rewind, Forward, and Next. If the current media position is after SelectionStart, Previous returns the media position to SelectionStart. If the current media position is before the SelectionStart, Previous returns the media position to the beginning of the sound track. If the current media position is before SelectionStart, Next sets the media position to SelectionStart. If the current media position is after the SelectionStart, Next sets the media position at the end of the sound track. Default is false

The usage of these properties is demonstrated later in this column, in the Audio Control Example.

http://www.internet.com



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
Avaya Article: Call Control XML - Powerful, Standards-Based Call Control
Tripwire Whitepaper: Seven Practical Steps to Mitigate Virtualization Security Risks
Internet.com eBook: The Pros and Cons of Outsourcing
Go Parallel Article: Scalable Parallelism with Intel(R) Threading Building Blocks
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
HP Video: Is Your Data Center Ready for a Real World Disaster?
Microsoft Partner Portal Video: Microsoft Gold Certified Partners Build Successful Practices
HP On Demand Webcast: Virtualization in Action
Go Parallel Video: Performance and Threading Tools for Game Developers
Rackspace Hosting Center: Customer Videos
Intel vPro Developer Virtual Bootcamp
HP Disaster-Proof Solutions eSeminar
HP On Demand Webcast: Discover the Benefits of Virtualization
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Microsoft Download: Silverlight 2 Software Development Kit Beta 2
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt
Iron Speed Designer Application Generator
Microsoft Download: Silverlight 2 Beta 2 Runtime
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview · Controllers: Programming Application Logic - Part 2 · How to Use JavaScript to Validate Form Data
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Choosing the Right Online Backup Provider · Mother Avaya Nurtures Her Technology Partners · Software as a Service a Winning Model for Hotspot Provider


Created: May 31, 1998
Revised: May 16, 1999

URL: http://www.webreference.com/js/column20/amproperties.html