Hi All,
I have html page, in that i have some flash header. In that flash header i have sound on/off function. i implemented this in my html page. but i need some modification in this. now it works fine. if i switch off the flash sound sound gets switch off. But if i again refresh page or navigate to another page falsh sound gets switch on automatically.
But i dont want to switch on sound automatically.
Can any one give me idea how to overcome this problem.
i have given my script and html script below -
<div id="container">
-
<div id="logoflash">
-
</div>
-
<div id="load">
-
</div>
-
<div class="contentbg">
-
---------------------------------------
-
--------------------------
-
--------------Some code---------------------
-
----------------------------------------
-
-
</container>
-
-
-
<script type="text/javascript">
-
var flashlogo = new SWFObject("images/Flash_Logo_v1.swf", "slideshow", "394", "267", "6", "#000");
-
flashlogo.addParam("wmode", "transparent", "high");
-
flashlogo.write("logoflash");
-
-
var flashpic = new SWFObject("images/Flash_Pics_v3.swf", "slideshow2", "600", "300", "6", "#000");
-
flashpic.addParam("wmode", "transparent", "high");
-
flashpic.write("pictflash");
-
-
var sound = new SWFObject("images/ad1-sound-on.swf", "slideshow1", "27", "20", "6", "#000");
-
sound.addParam("wmode", "transparent", "high");
-
sound.write("load");
-
</script>
-
This same format will repeat for all the pages which loading.
Thanks in advance,
Regards,
Magesh
5 2279 gits 5,390
Expert Mod 4TB
in this case you could use a cookie to make the users choice persistent, or pass it everytime through an url-param, another option is to use a serverside storage (session or whatever) ... when the switch-off action is triggered do a request (probably the best is an ajax-call to avoid page-reload) and store the choosen option. when you refresh the page you will loose every runtime-made settings unless you store them somewhere before.
kind regards
@gits
Thanks Gits,
But i m not using any Server side scripting or client side scripting for my application, even i dont have cookie or session. Is there any other way to control this flash sound other than this...
Regards,
You are using client-side scripting (the JavaScript code which interfaces with Flash). The web is stateless by default. As gits suggested, use client-side cookies to store that the sound should be off by default. When the page loads, check for the cookie and if set, read it and set the sound accordingly.
Just a question though: do you want sound to be off for everyone by default or just for the user that decides to switch it off?
@acoder
By default the sound should be ON. if user wish he supposed to switch off the music. but till he switch ON that music. it should be in OFF state..
I think i meet your question.
Kind Regards,
Sign in to post your reply or Sign up for a free account.
Similar topics
by: jean-marc |
last post by:
As an application programmer, I'm not well versed in the material
aspects of computing (memory, cpu, bus and all). My understanding of
imports in Python is such: the __main__ program is the center...
|
by: Emil Karlen |
last post by:
Using the import-tag, a template appearing in the imported file, can be
extended in the importing file.
I am extending a template this way and in the main-file, inside the
template use...
|
by: Kamilche |
last post by:
I have a large project that is getting complex, and I would like to
print the docstrings without importing the modules. The only Python
utility I could find references is apparently defunct and...
|
by: Grim Reaper |
last post by:
I am importing a .csv file into Access that has 37 fields. My problem is
that sometimes the last field only has data at the end of the column (it
looks like when you import a file into Access, for...
|
by: Natan |
last post by:
When you create and aspx page, this is generated by default:
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Configuration;
using System.Text;
using...
|
by: rpjanaka |
last post by:
Hi all,
Instead of writing javascript functions on the html page it self, we could write those in separate “.js” file and import it as follow.
<script src="fileName.js" ></script>
But when...
|
by: Phil |
last post by:
I want to add a button to a form to import a text delimited file. The
File is delimited by "^" and so I have created a specification file by
manually impoting the text file, using the advanced...
|
by: dbsmilr |
last post by:
This is what I want to do:
<html>
<xml id="myXml">
<book title="book1" />
<book title="book2" />
</xml>
<div id="out"><!-- I would output the xml formatted nicely for the
user in this...
|
by: passionateforjava |
last post by:
Hi All,
I am using struts application wherein I need to import file for some purpose.I have used input type="file" for the same which goes like:
<input type="file" id="uploadFile" name="uploadFile"...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM).
In this month's session, the creator of the excellent VBE...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: Aftab Ahmad |
last post by:
Hello Experts!
I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
|
by: Aftab Ahmad |
last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below.
Dim IE As Object
Set IE =...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
| |