iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > JavaScript

Reply
 
LinkBack Thread Tools
Old February 13th, 2007, 10:09 AM   #1
New Member
 

Join Date: Feb 2007
Location: Toronto, Ontario, Canada
Age: 32
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 kisaragi is on a distinguished road
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
kisaragi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 13th, 2007, 10:17 AM   #2
New Member
 

Join Date: Feb 2007
Location: Toronto, Ontario, Canada
Age: 32
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 kisaragi is on a distinguished road
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
kisaragi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 15th, 2007, 04:48 AM   #3
Elite Veteran
 
Ryan Fait's Avatar
 

Join Date: May 2006
Location: Las Vegas
Posts: 3,784
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough
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
Ryan Fait is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 15th, 2007, 03:33 PM   #4
Elite Veteran
 

Join Date: Dec 2005
Location: On Internet
Posts: 4,850
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 JacobHaug is a jewel in the rough JacobHaug is a jewel in the rough JacobHaug is a jewel in the rough JacobHaug is a jewel in the rough
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
JacobHaug is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 15th, 2007, 03:36 PM   #5
Elite Veteran
 
Ryan Fait's Avatar
 

Join Date: May 2006
Location: Las Vegas
Posts: 3,784
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough
Re: How to have swf video playback on site tab click?

Haha, fair enough
Ryan Fait is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
button , stop , swf , tab , video


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 June 5th, 2008 10:40 AM
Youtube style video playback on directory site nate2099 Flash and ActionScript 5 August 30th, 2007 01:38 PM
audio/video from site LorEye Flash and ActionScript 1 November 21st, 2006 07:15 PM
Video Page on personal site marcusharun HTML, XHTML and CSS 0 November 1st, 2006 08:36 PM


Search Engine Optimization by vBSEO 3.2.0 RC8