Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Oct 2002
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy resize window media player X, Y

    Hi,

    I have 3 corp videos all the same encoded at different sizes.

    Im trying to find a way to give the user 3 links 300x400 | 500x800 | 700x1000. These will carry the width and height of the clip.

    <OBJECT ID="mediaPlayer" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" TYPE="application/x-oleobject" width="300" height="400">

    how can I pass these dynamically, im guessing a document.write('') with the above and some how use a JavaScript:vidID(300,400); to populate the video, or something.

    how would i best go implementing this.. im alittle confused.

    D

  • #2
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    something like:
    Code:
    <script type="text/javascript">
    function sizeIt(eId, w, h)
    {
    	eId = document.getElementById(eId);
    	eId.width  = w;
    	eId.height = h;
    }
    </script>
    
    
    <a href="#mediaPlayer" onclick="sizeIt('mediaPlayer', 300, 400)">slide one</a>
    If you were asking about changing the source file too... just send its path as a parameter, adding another argument to the function; e.g.
    Code:
    function sizeIt(eId, w, h, path)
    {
    	document[eId].Filename = path;
    	eId = document.getElementById(eId);
    	// etc...
    Last edited by codegoboom; 03-08-2005 at 11:11 PM. Reason: etc.
    *this message will self destruct in n-seconds*

  • #3
    New Coder
    Join Date
    Oct 2002
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts
    dude thanks for your help - much appricated


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •