So are you saying that other browsers like FF do not have this problem? And when you say <div>s which contain Flash movies and the .swf sound not switching off, are there separate .swfs in each <div> and selecting a different thumbnail selects a different <div> and .swf? Is that .swf loading and playing a .flv video file or is just the .swf playing?
If you are just switching .swfs and not playing .flvs, then you may want to incorporate a
Code:
stopAllSounds();
as the first part of any function on click event used to switch movies.
Another way around the problem if you are using an array to choose movie from (such as an xml list) is to call a non-existing array element (a number higher than the highest number in the array). This should start a new, non-existent sound, stopping the old sound. Then immediately call the real, intended movie.
Good luck on this,
Eye for Video www.cidigitalmedia.com
Well then it sounds like a problem with the html or javascript code on the Web page and not something in the AS of the movie. How is the .swf placed on the page (<object> or swfobject or some other .js). What coding is used to select from movie to the next?
A link to the page may help us figure this out.
EfV
By "using the old plain object embed tags", that means both <object> with a classid="... for the IE browser and <embed> for FF, correct?
Well you might try:
It sounds like when you click to start another movie you are simply opening that movie on top of the one already running. Is there a way you can spread out the movies on a test page to see if more than one is playing at a time? So without seeing the code, it's pretty hard to tell what the problem is. Have you validated the page? http://www.w3schools.com/site/site_validate.asp
Then post a link or post the code you are using to switch and play the movies. Why are the <div>s hidden anyway?
If you want to try another method of placing the swf on the Web page, you should try swfobject. This is a js based method that has the advantage of being able to provide alternate content (to the Flash) that can be indexed by Google and other search engines. Here is a link on a number of different ways to implement swfobject, maybe one would work for your application. http://pipwerks.com/lab/swfobject/
Best wishes,
EfV
Well from what I gleaned from the code and follow-up info at dynamicdrive.com, it looks like you are trying to adapt that Tab Content script for something it was not quite intended for. The examples that I saw at dynamicdrive are all for (more or less) static content, that is, text or perhaps images but not for video. The fact that it works in FF is just lucky I think.
However, the link you posted is not a full Web page and it has no Doc Type, so that may be preventing IE from correctly parsing the page. On the other hand, looking at the source code shows 4 Flash players on the same page…. A very unusual arrangement. Not that it won’t work but in any swapping from one video to another, you’ll have to find a way to “turn off” the current movie when you switch to a second one or the first movie simply keeps playing concurrently with the second movie. That is why the sound is overlapping. When selecting a second movie, switching the display on the first movie to style="DISPLAY: none" does not stop the first movie from playing, it just makes it invisible.
To test this (in IE anyway), get the first movie running then click a thumbnail and get a second movie going. Now right click on the Flash player and unclick “Play” from the menu. The currently playing, top movie stops playing but the other invisible movie, which you cannot unclick “Play” keeps playing.
So in my opinion, not the best application for this Tab Content script. I would suggest using a Flash player that uses an xml file to populate a playlist. The coding is much cleaner, just one Flash player on the page, not 4…. Imagine a page with 20 videos on it! The xml file would be much easier to update (less code required) and could include thumbnails and text.
Best wishes,
EfV
yes i did manipulate the code to display images at first then i used it for flash videos.
DOCTYPE got nothing to do with. i'm showing you simplified version of original that has DOCTYPE.
yes, i'm trying to make videos stop playing when hidden. i didn't create the flash movie. that's what i was given. but going to check out using XML playlist. hopefully that might do the trick
Bookmarks