Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
|
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 17th, 2008, 08:11 PM
Authorized User
 
Join Date: Jan 2008
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default how can i do this in javascript ?

<script type="text/javascript">
                var so = new SWFObject('{$baseurl}/player.swf','player','540','445','8');
                so.addVariable('file','{$videourl}/{$videoarray[0].VIDEOID}.flv');
                so.addVariable('height','445');
                so.addVariable('width','540');
                so.addVariable('location','{$baseurl}/player.swf');
                so.addVariable('vid','{$videoarray[0].VIDEOID}');
                so.addVariable("baseurl","{$baseurl}/");
                so.addParam("wmode", "transparent");
                so.addParam("vmode", "transparent");
                so.write('player');
            </script>

i am mainly concerned with this line so.addVariable('file','{$videourl}/{$videoarray[0].VIDEOID}.flv');

the $videourl contains a single folder where the video files are stored.

however, i have another server location that stores another set of videos.

how can i make it so that it will attempt to play from either one of the direcotires which has the actual video file.


for ex)

it will attempt to load from one videodir, the file is not there. it will move on to the second videodir that has the file and play it/

if both files are present on both videodir, then always play the first one.


i have two videodir, just incase there is failure in one of them.







Similar Threads
Thread Thread Starter Forum Replies Last Post
JavaScript. Magxtopher Javascript 2 April 1st, 2014 09:27 PM
stop current javascript function using javascript sakthi Javascript 3 June 2nd, 2008 03:30 PM
javascript rakri2007 C# 2005 1 June 25th, 2007 08:46 PM
"text/javascript" and "javascript" rupen Javascript 1 June 24th, 2005 07:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.