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 2285 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: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |