flash

D

daveyand

Hey guys, have searced within this group and havent found an answer to
what i want to do.

Here is the problem

I have the a hovering div, within that div i have settings that people
can change, but for some reason there needs to be a smal flash
animation with a continual sound clip. When a user clicks close the
hovering div should be removed from the domtree thus removing the div
and the flash movie.

In FF this works fine.

In IE it also works, in that the div is deleted, but for somereason the
sound continues to play on the page. Even though the flash element
doesnt exist. Have done a document.getElementById(flashmovie) to
determine if its there.

I am removing the node from the tree using
document.body.removeChild(hoveringdiv); where hoveringdiv is the
element itself.

Now as you can imagine the continuous sound is an annoyance. How do i
stop flash playing, and hence remove the sound, or how do i mute the
flash. Is this possible in Javascript? I cant access the swf or
actionscript.

Also if this isnt possible can someone point me to where i can learn
about how IE handles sound within a webpage so i can see if there is
some pointers in there. Much appreciated.

Andy
 
E

Erwin Moller

daveyand said:
Hey guys, have searced within this group and havent found an answer to
what i want to do.

Here is the problem

I have the a hovering div, within that div i have settings that people
can change, but for some reason there needs to be a smal flash
animation with a continual sound clip. When a user clicks close the
hovering div should be removed from the domtree thus removing the div
and the flash movie.

In FF this works fine.

In IE it also works, in that the div is deleted, but for somereason the
sound continues to play on the page. Even though the flash element
doesnt exist. Have done a document.getElementById(flashmovie) to
determine if its there.

I am removing the node from the tree using
document.body.removeChild(hoveringdiv); where hoveringdiv is the
element itself.

Now as you can imagine the continuous sound is an annoyance. How do i
stop flash playing, and hence remove the sound, or how do i mute the
flash. Is this possible in Javascript? I cant access the swf or
actionscript.

Also if this isnt possible can someone point me to where i can learn
about how IE handles sound within a webpage so i can see if there is
some pointers in there. Much appreciated.

Andy

Hi Andy,

I think you should just stop the Flashmovie before closing/destroying the
div it lives in.
I expect something like this should work:
var myFlash = document.getElementById("flashmoviename");
myFlash.stop();

(Not tested)

Also, have a look at this simple utility:
http://www.schillmania.com/project/soundmanager

It allows you to play sounds through flash with a simple JS-api.

Regards,
Erwin Moller
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top