If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Feb 2011
    Member #
    Hello everybody, i have a video controller skin that i want to use in my website. The controller uses an XML file to define some parameters including the name and path of the flv video.
    What i want to do is to use multiple links to videos and when clicking on a link the name of the video in the controller ( which is found in the XML file) will change to the corresponding name for the clicked link, and reload the controller by reloading the controller, without reopening the page or opening a new one.
    In such case i need to use a javascript variable containing each time the name of the video link clicked, and change the name of the video in the XML file.
    Is there a way to use javascript to change a value existing in the XML file, and then to reset the controller. By the way i dont know XML but i it wasnt hard to get the name of the video found in the XML file.
    And if it helps Here is the XML code:
    <?xml version="1.0" encoding="UTF-8" ?>
    <flash_parameters copyright="socusoftFLVPlayerTheme">
                <basic_property movieWidth="500" movieHeight="400" html_title="Title" loadStyle="res/style(circle2).swf" hideAdobeMenu="true" enableURL="false" autoPlay="false" autoRepeat="false" backgroundColor="0xc0dcc0" bufferTime="5" defaultvolume="100"/>
                <panel_property panelbackgroundColor="0xc0c0c0" buttonColor="0x4b4b4b" buttonbackgroundColor="0x808080" currentbuttonColor="0xc0dcc0" dragbarColor="0x1e1e1e" bufferColor="0xc54339" slideColor="0xff0000" slidebgColor="0x000080" showTime="true" timeColor="0x808080"/>
                <video_property topPadding="1" bottomPadding="40" leftPadding="2" rightPadding="2"/>
                <title_property showTitle="false" titleColor="0xfffbf0" backgroundColor="0xa0a0a4" alpha="30" align="top"/>
                <description_property enable="true" textColor="0xfffbf0" backgroundColor="0x000080" backgroundAlpha="30" cssText="a:link{text-decoration: underline;} a:hover{color:#ff0000; text-decoration: none;} a:active{color:#0000ff;text-decoration: none;} .blue {color:#0000ff; font-size:15px; font-style:italic; text-decoration: underline;} .body{color:#ff5500;font-size:20px;}"  align="bottom"/>
                <basic_property enablethumBack="false" thumBackColor="0xff00ff" thumsAlpha="72" thumsradius="55" enablecurrentColor="false" currentBorderColor="0x0000ff" enableBorderColor="false" borderColor="" thumTextColor=""/>
                <slide jpegURL="1/thumbs/1.jpg" d_URL="1/slides/1.jpg" v_URL="1/flv/1.flv" URLTarget="0" url="" title="1"/>
    And the code in the HTML file is:
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=",0,0,0" width="500" height="400" id="tech" align="middle">
            <param name="allowFullScreen" value="true"/>
            <param name="allowScriptAccess" value="sameDomain" />
            <param name="movie" value="cool.swf?xml_path=1.xml" />
            <param name="quality" value="high" />
                    <param name="wmode" value="transparent">
            <embed src="cool.swf?xml_path=1.xml" quality="high" wmode="transparent" width="500" height="400" name="tech" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="" />


  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Not from USA
    Member #
    2783 times
    If the XML file is dynamically generated via say PHP or ASP, then yes, you could. I haven't done anything with movies specifically, but I have used AJAX to generate XML on the fly and load content for pages.

    If you want the concept, check out any of the alley links from the bowling alley site in my signature and try to drill down by country, then state/province, then city. The Javascript itself is all there (although it could be done more nicely in jQuery, but I did this back in the dark ages of 2008). The XML is generated by the Javascript, which sends URL querystring parameters to an ASP page (in this case). The ASP page then generates the corresponding XML. I'm working on a newer example for a site that uses jQuery but it's a few weeks from being done.

    IMPORTANT: be sure that your content type is "text/xml" if you go this route, or you will be in for all kinds of frustration. Javascript doesn't understand XML that isn't actually served as XML. So for that.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

Remove Ads

Posting Permissions

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

Search tags for this page

javascript autorepeat video


javascript change xml value


javascript variable in xml file

Click on a term to search for related topics.
All times are GMT -6. The time now is 10:12 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: