Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
swf file volume turnoff using javascript
Old 11-28-2008, 05:54 AM swf file volume turnoff using javascript
Junior Talker

Posts: 1
Trades: 0
Hi All..

I am facing a problem..i am seeking ur help in this.

i am playing swf file from html and i want to turn on and off on clicking the button which is there in another html(footer.html). and i am including this in main html file.

here is my footer.html

Code:
<html>
<head>
<title>footer</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body,td,th {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size: 10px;
}
body {
 background-color: #1D5081;
 margin-left: 0px;
 margin-top: 0px;
 margin-right: 0px;
 margin-bottom: 5px;
 background-image: url(../images/main_bg.gif);
}
-->
</style>
<script language="JavaScript">
<!--
document.oncontextmenu = NoRClkMenu
document.onkeydown= SendKey
//======================================================================
function SendKey()
{
parent.Navigation.SetKey(event.keyCode)
}//end function
function NoRClkMenu()
{
event.returnValue = false
}//end function

function SendAudStatus()
{
 var theStatus
 //alert("in sendAudStatus before fetching textbox value");
//f1=document.getElementById("topframe");
//alert(f1.src)
 theStatus=document.myChoices.AStatus.value
 //alert("the audio value is"+theStatus);
document.ContentDCR.EvalScript(theStatus);

}
function AudSwitch()
{
//var theStatus1
//theStatus1=top.frames['topframe'].document.myChoices.AStatus.value; 
//alert("got form value from php"+theStatus1);
//g=document.getElementById("main");
 //g.src="www.google.com"
//theStatus1=window.frames['topframe'].document.myChoices.AStatus.value
//f = document.getElementById("topframe");
 
//f.src = "www.netscape.com";
 
 theStatus=document.myChoices.AStatus.value
 //alert(theStatus)
 if(theStatus=='Aon')
 {
      document.myChoices.AStatus.value='AOff'
       theStatus='AOff';
   }
   else
   {
      document.myChoices.AStatus.value='Aon'
   theStatus='Aon';
   }
 //alert(theStatus)
 //if(theStatus==null)
  //theStatus='Aon'
parent.content.AudSwitch()
}//end function
function audioReplay()
{
//theSoundStatus=parent.topframe.myChoices.AStatus.value

 //if(theSoundStatus=='AOff')
 //{
   //alert("audio is off")
// }
// else
// {
 //theStatus='AR'
//document.ContentDCR.EvalScript(theStatus)
 //}
 parent.content.audioReplay()
}
function showMe()
{
  theStatus='SM'
 parent.content.showMe()
}
function nextPage()
{
  parent.content.nextPage();
}

function prevPage()
{
  parent.content.prevPage();
}
</script>
<script language="VBScript">
sub  ContentDCR_ExternalEvent(byVal aCommand)
 if aCommand = "SendAudStatus()" then
 call SendAudStatus()
 end if
if aCommand = "goNext()" then
 call parent.Instruction.goNext()
 end if
 if aCommand = "goCorrect()" then
 call parent.Instruction.goNextQ("C")
 end if
if aCommand = "goIncorrect()" then
 call parent.Instruction.goNextQ("I")
 end if
end sub
</script>
</head>
<body>
<table width="120" height="30" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#949EB3" bgcolor="#FFFFFF">
  <tr bgcolor="#e7f4ff">
  
    <td width="30" height="30" align="center">
  <img src="../images/btn_prev.gif" alt="Previous" width="30" height="30" style="cursor:hand" onMouseOver="this.src='../images/btn_prev_h.gif'" border="0" onMouseOut="this.src='../images/btn_prev.gif'" onClick="prevPage()"></td>
  
    <td width="30" height="30" align="center"> 
 <img src="../images/btn_mute.gif" name="changer" alt="Audio on/off" width="23" height="23" style="cursor:hand" onClick="AudSwitch()"></td>
 
    <td width="30" height="30" align="center">
  <a href="Moodle Changes helps.doc"><img src="../images/btn_glossary.gif" alt="Glossary" width="30" height="30" border="0" style="cursor:hand" onClick="" onMouseOver="this.src='../images/btn_glossary_h.gif'" onMouseOut="this.src='../images/btn_glossary.gif'"></a></td>
  
    <td width="30" height="30" align="center"> 
  <img src="../images/btn_next.gif" alt="Next" width="30" height="30" style="cursor:hand" onMouseOver="this.src='../images/btn_next_h.gif'" border="0" onMouseOut="this.src='../images/btn_next.gif'" onClick="nextPage()"></td>
  
  </tr>
</table>
</body>
</html>
and my html file containing swf file is below
Code:
<html><head><title></title>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<style type='text/css'>
<!-- body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;}
body {
background-color: #1D5081;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: url(images/main_bg.gif);
}--> </style> 
<script language=JavaScript>
<!--
function SendKey()
{ parent.Navigation.SetKey(event.keyCode)
}//end function
function NoRClkMenu()
{
event.returnValue = false
}//end function
function SendAudStatus()
{
var theStatus
theStatus=parent.footer.myChoices.AStatus.value
document.ContentDCR.EvalScript(theStatus);
}
function AudSwitch()
{
theStatus=parent.footer.myChoices.AStatus.value
document.ContentDCR.EvalScript(theStatus)
}//end function
function audioReplay()
{
 theStatus='AR'
 document.ContentDCR.EvalScript(theStatus)
}
function showMe()
{
theStatus='SM'
document.ContentDCR.EvalScript(theStatus)
}
function nextPage()
{
 document.location.href='M02L02F001.htm'
}
function goNext()
{
 document.location.href='M02L02F001.htm'
}
function prevPage()
{
 document.location.href='M02L01F002.htm'
}
top.frames[0].SetThisPage(1)
</script>
<script language='VBScript'>
sub  ContentDCR_ExternalEvent(byVal aCommand)
 if aCommand = "SendAudStatus()" then
 call SendAudStatus()
 end if
if aCommand = "goNext()"then
call goNext()
 end if
 if aCommand = "goCorrect()" then
 call parent.Instruction.goNextQ("C")
 end if
if aCommand = "goIncorrect()"then
 call parent.Instruction.goNextQ("I")
 end if
end sub
</script></head>
<Body>
<center><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="example" name="example" codebase="http://download.macromedia.com/pub/s...rsion=6,0,29,0" width="780" height="550">
<param name="movie" value="M02L01F003.swf">
<param id="example" value="example">
<param name="example" value="example">
<param name="quality" value="high">
<embed src="M02L01F003.swf" id="example" name="example" swliveconnect="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="780" height="550"></embed>
</object> 
</Body></html>
and finally html which containing both is index.html is
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<frameset rows="95%,5%" border="0">
<frame name="content" src="M02L01F001.htm"   noresize frameborder="no" scrolling="no">
<frame name="footer" src="footer.htm"   noresize frameborder="no" scrolling="no">
</frameset>
</HTML>

 
Experts...Pls help me in this...
 
i dont know javascript much...
pls help me..its urgent..
 
Thanking in advance..
 
Regards,
sathya
satyaala is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to swf file volume turnoff using javascript
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.08087 seconds with 12 queries