How to have swf video playback on site tab click?

This is a discussion on "How to have swf video playback on site tab click?" within the JavaScript Forum section. This forum, and the thread "How to have swf video playback on site tab click? are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Feb 13th, 2007, 13:09
New Member
Join Date: Feb 2007
Location: Toronto, Ontario, Canada
Age: 30
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
How to have swf video playback on site tab click?

Hello..

First off i'm new here and new to js and flash and hoping i could get some help..

here is the scripting as i know it so far that is on the page currently.

This is the video player

<html>
<head>
<title>videoplayerclassic</title>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<meta name="author" content="">
<meta name="generator" content="SWiSHmax http://www.swishzone.com">
<meta name="description" content="videoplayerclassic">
<meta name="keywords" content="ashley, ingram, music, player, school, video">
<script src="./mpl.js" type="text/javascript"></script>

</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0" bottommargin="0" rightmargin="0">
<left>
<?php
function counter($v_path){
$v_path = str_replace("./vdo/", "./cnt/", $v_path);
$v_path = str_replace(".swf", ".dat", $v_path);
if (file_exists($v_path)) {
$yomiko=file($v_path);
$fp = @fopen($v_path, "r+");
flock($fp, 2);
$yomiko[0]++;
fputs($fp, $yomiko[0]);
flock($fp, 3);
fclose($fp);
} else {
$ret = touch($v_path);
$datap = file($v_path);
$fp = @fopen($v_path, "r+");
flock($fp, 2);
fputs($fp, "1");
flock($fp, 3);
fclose($fp);
};
};


$va = $_REQUEST["va"];
if ($va != ""){
$va = str_replace("video/" , "" , $va);
echo" <script type=\"text/javascript\">
<!--
mpw(\"$va\");
// -->
</script>
";
counter($va);
} else {

$data = file("data.txt");
$newdata = Array();
for($i=0;$i<sizeof($data);$i++){
list($videoa,$pica,$videon,$videod) = explode("<>",$data[$i]);
$newdata[$i] = "$videoa";
};
shuffle($newdata);
$address = $newdata[0];
$address = str_replace("video/" , "" , $address);
echo" <script type=\"text/javascript\">
<!--
mpw(\"$address\");
// -->
</script>
";
};


?>
</left>
</body>
</html>

The tabs on page are defined by

<?php
function henkan($url){
$text = file_get_contents($url);
$ttxt = nl2br($text);
$ttxt = str_replace("\r\n", "\r", $ttxt);
$ttxt = str_replace("\r", "\n", $ttxt);
$ttxt = str_replace("\n", "", $ttxt);
$ttxt = str_replace("<br />", "", $ttxt);
echo($ttxt);
};
?>
<script type="text/javascript">
<!--
if (document.images) {
btn0 = new Image();
btn0.src = "nakami/img/0.gif";
btn1 = new Image();
btn1.src = "nakami/img/a1.gif";
btn2 = new Image();
btn2.src = "nakami/img/a2.gif";
btn3 = new Image();
btn3.src = "nakami/img/a3.gif";
btn4 = new Image();
btn4.src = "nakami/img/a4.gif";
}
function setImage(name, src) {
if (document.images) {
document.images['btn0'].src = 'nakami/img/0.gif';
document.images['btn1'].src = 'nakami/img/1.gif';
document.images['btn2'].src = 'nakami/img/2.gif';
document.images['btn3'].src = 'nakami/img/3.gif';
document.images['btn4'].src = 'nakami/img/4.gif';
document.images[name].src = src;
}
}
// -->
</script>
<script language="JavaScript">
<!--
var ns4=document.layers?1:0
var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
var IsInit = 0
var tabcont=new Array()

tabcont[0]='<?php require("nakami/project.php");?>'
tabcont[1]='<?php henkan("nakami/intro.txt") ?>'
tabcont[2]='<?php henkan("nakami/course.txt") ?>'
tabcont[3]='<?php henkan("nakami/koe.txt") ?>'
tabcont[4]='<?php henkan("nakami/gaiyo.txt") ?>'
var subobj=""
function showit(tabnum) {
currentCont=(tabnum==-1)?"":tabcont[tabnum]
if (ns4) {
subobj=document.contArea1.document.contArea2
subobj.document.write(currentCont)
subobj.document.close()
} else if (ie||ns6) {
subobj=ns6?document.getElementById("contArea3"):do cument.all.contArea3
subobj.innerHTML=currentCont
}
if (IsInit==0) {
IsInit=1
}
}

//-->
</script>

<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a href="" onclick="setImage('btn0', 'nakami/img/a0.gif');showit(0);return false;"><img name="btn0" src="nakami/img/a0.gif" border="0"></a></td>
<td><a href="" onclick="setImage('btn1', 'nakami/img/a1.gif');showit(1);return false;"><img name="btn1" src="nakami/img/1.gif" border="0"></a></td>
<td><a href="" onclick="setImage('btn2', 'nakami/img/a2.gif');showit(2);return false;"><img name="btn2" src="nakami/img/2.gif" border="0"></a></td>
<td><a href="" onclick="setImage('btn3', 'nakami/img/a3.gif');showit(3);return false;"><img name="btn3" src="nakami/img/3.gif" border="0"></a></td>
<td><a href="" onclick="setImage('btn4', 'nakami/img/a4.gif');showit(4);return false;"><img name="btn4" src="nakami/img/4.gif" border="0"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#f7efe7">
<tr height="16"><td></td><td></td><td></td></tr>
<tr>
<td>
<div class="frm" onload="showit(0)">
<!--------------------------------- ?{?¶?\?¦?p???C???[?Ì?T?C?Y?ð?w?è?iNN4?p?j -------------------------->
<ilayer name="contArea1" width="500" height="800">
<layer name="contArea2" width="500" height="800"></layer>
</ilayer>
<div id="contArea3"></div>
</div></td></tr></table>


</td>
</tr>
</table>

the structure of the page is as follows

index php page
loads a left panel page through txt video play in this section
loads a center panel trhough txt with the tabs

7 tabs load pages within the center panel from txt files

would like the video in the left panel to stop
when any tab is clicked in the center panel

Also side issue center panel has 7 tabs across the top
and the 7 tabs duplicated across the bottom
defined as indepenant btns for all 14
would like both top 7 & the bottom 7 btns to mirror
basically when btn0 clicked btn0a also changes to match
when btn1 clicked btn1a also changes to match
and so on to btn6
and vice versa
when btn0a clicked btn0 also changes to match
when btn1a clicked btn1 also changes to match
and so on to btn6a

thank you
Reply With Quote

  #2 (permalink)  
Old Feb 13th, 2007, 13:17
New Member
Join Date: Feb 2007
Location: Toronto, Ontario, Canada
Age: 30
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to have swf video playback on site tab click?

I Have attempted to implement the pauseMe() with no success

<td><a href="" onclick="setImage('btn0a', 'nakami/img/a0n.gif');showit(0);pauseMe();return false;"><img name="btn0a" src="nakami/img/a0n.gif" border="0"></a></td>
//etc
Reply With Quote
  #3 (permalink)  
Old Feb 15th, 2007, 07:48
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to have swf video playback on site tab click?

While this is JavaScript, I think you'll find better help in the Flash forum.

Moved. Feel free to override me, Jacob
Reply With Quote
  #4 (permalink)  
Old Feb 15th, 2007, 18:33
JacobHaug's Avatar
SuperMember

SuperMember
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JacobHaug Send a message via MSN to JacobHaug
Re: How to have swf video playback on site tab click?

More JavaScript, I think it would work better where some who actually likes JavaScript, can take a look, moved back just because I can...lol
Reply With Quote
  #5 (permalink)  
Old Feb 15th, 2007, 18:36
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to have swf video playback on site tab click?

Haha, fair enough
Reply With Quote
Reply

Tags
button, stop, swf, tab, video

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Showing Video On Site ChainsawDR Search Engine Optimization (SEO) 5 Jun 5th, 2008 13:40
Silverlight & C# Video Site ITG Job Opportunities 0 Dec 1st, 2007 02:45
Youtube style video playback on directory site nate2099 Flash & Multimedia Forum 5 Aug 30th, 2007 16:38
audio/video from site LorEye Flash & Multimedia Forum 1 Nov 21st, 2006 22:15
Video Page on personal site marcusharun Web Page Design 0 Nov 1st, 2006 23:36


All times are GMT. The time now is 10:23.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43