Electric Type

Multimedia

About Us

News

Help

Active Movie Control in Two Easy Steps

Page 4 — Step 1: Continues

If you're paranoid like I am, the simplicity of the last two examples left you highly suspicious. How is it possible to get such behavior out of such simple HTML? Well, you can't, really. Both embed and img dynsrc (image dynamic source) are very simple ways to invoke the Active Movie Control, but all they really do is play back the media that they point to. They expose the sometimes clunky and real-estate-wasting user-interface controls of the AMC by default, which can often be a nuisance on smaller monitors. What we need is a way to do a little fine tuning, get rid of the interface elements that we don't need, and specify what the user can and can't change. To do this, we need the power of the object tag. First, a word of warning to our younger readers, the squeamish, persons with heart conditions, and pregnant women - the object tag can seem a bit grisly at first. But don't worry, it's akin to watching violence on television - remember how it once upset you, but after prolonged exposure it didn't seem so bad, and now you wonder how you ever got along without it? Ahhh, violence. Well, the AMC's a bit like that. To wit, here's an example of the object tag in full regalia, with tailfins:


    <OBJECT ID="mySound" WIDTH=800 HEIGHT=600 CLASSID="CLSID:05589FA1-C356-11CE-BF01-00AA0055595A">
    <PARAM NAME="Version" VALUE="1">
    <PARAM NAME="EnableContextMenu" VALUE="-1">
    <PARAM NAME="ShowDisplay" VALUE="-1">
    <PARAM NAME="ShowControls" VALUE="-1">
    <PARAM NAME="ShowPositionControls" VALUE="0">
    <PARAM NAME="ShowSelectionControls" VALUE="0">
    <PARAM NAME="EnablePositionControls" VALUE="-1">
    <PARAM NAME="EnableSelectionControls" VALUE="-1">
    <PARAM NAME="ShowTracker" VALUE="-1">
    <PARAM NAME="EnableTracker" VALUE="-1">
    <PARAM NAME="AllowHideDisplay" VALUE="-1">
    <PARAM NAME="AllowHideControls" VALUE="-1">
    <PARAM NAME="MovieWindowSize" VALUE="0">
    <PARAM NAME="FullScreenMode" VALUE="0">
    <PARAM NAME="MovieWindowWidth" VALUE="700">
    <PARAM NAME="MovieWindowHeight" VALUE="500">
    <PARAM NAME="AutoStart" VALUE="0">
    <PARAM NAME="AutoRewind" VALUE="-1">
    <PARAM NAME="PlayCount" VALUE="1">
    <PARAM NAME="SelectionStart" VALUE="0">
    <PARAM NAME="SelectionEnd" VALUE="4.00">
    <PARAM NAME="Appearance" VALUE="1">
    <PARAM NAME="BorderStyle" VALUE="1">
    <PARAM NAME="FileName" VALUE="http://somedomain.com/somepath/tothefile/someSound.mp3">
    <PARAM NAME="DisplayMode" VALUE="0">
    <PARAM NAME="AllowChangeDisplayMode" VALUE="-1">
    <PARAM NAME="DisplayForeColor" VALUE="16777215">
    <PARAM NAME="DisplayBackColor" VALUE="0">
    </OBJECT>

OK, so it looks hairy at first glance, but if you look closer, certain parameters become obvious. And the good news is you don't have to specify every single parameter when you invoke the Active Movie Control, just the ones that you want to change from their default settings. Now, I have neither the inclination nor the time (my editor needs this on his desk tomorrow, dammit!) to explicitly detail each parameter, so let's arrange them into like-minded groupings.

First, there's the object tag itself. It is very important that you give your object an ID so that you can reference it later using JavaScript and the Document Object Model (DOM). Name it whatever you feel like, provided it's within your scripting language's namespace, and give the object an appropriate width and height if necessary. Most important, though, is to include the correct ClassID, which in this case is CLSID:05589FA1-C356-11CE-BF01-00AA0055595A. Every ActiveX control has a unique ClassID, and it is crucial that you get every character correct, or else the ActiveX control will not be invoked properly, and whatever you're building will simply not work. If everything checks out, then we're ready to move on.

next page»


Dynamic HTML  

Frames  

HTML Basics  

Stylesheets  

Tables  

XML  

Javascript  

Database Connections  

Intro To Perl  

HTML 4.0  

User Blogs

Screen Shots

Latest Updates

Contact Us

Valid HTML 4.01!
Valid CSS!

Breadcrumb

© ElectricType
Maintained by My-Hosts.com
Site map | Copyright | Disclaimer
Privacy policy | Acceptable Use Policy
Legal information.