www.webdeveloper.com
Results 1 to 12 of 12

Thread: Problem in IE - swf sound not switching off when change to new div

  1. #1
    Join Date
    Aug 2008
    Posts
    23

    Unhappy Problem in IE - swf sound not switching off when change to new div

    i have flash gallery - hidden DIVs containing flash movies. thumbnail images at bottom that when clicked switch to different flash movies at top.

    problem is that IE keeps playing movie when click on different thumbnail, so that all the movies sounds get overlapped

    any suggestions, thank you

  2. #2
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    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

  3. #3
    Join Date
    Aug 2008
    Posts
    23

    overlapping sound

    FF don't have dat problem. there are separate hidden DIVs containing swf's which play flv's.

    and not using arrays

  4. #4
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    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

  5. #5
    Join Date
    Aug 2008
    Posts
    23

    javascript

    i'm just using the old plain object embed tags. cant show you da work cuz you need a VPN connect. the only javascript is the gallery function

  6. #6
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    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:
    Code:
    <object type="application/x-shockwave-flash" data="filename.swf" width="#" height="#">
    <param name="movie" value="filename.swf">
    </object>
    Edit to fit your situation of course.
    Does your IE browser have the correct Flash plugin?...can you display other Flash?
    EfV

  7. #7
    Join Date
    Aug 2008
    Posts
    23

    tried it

    still, the sound overlaps. think some type javascript might do the trick?

    thank u
    J

  8. #8
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    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

  9. #9
    Join Date
    Aug 2008
    Posts
    23

    sample

    hello my friend,

    let me show you a sample of what i'm working on so you can clearly see what's happening.

    just click on thumbnails and you will see that the sound keeps overlapping

    http://www.corneliodesign.com/movies.html

    thanks
    julio

  10. #10
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    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

  11. #11
    Join Date
    Aug 2008
    Posts
    23
    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

    thankx

  12. #12
    Join Date
    Aug 2008
    Posts
    23

    playlist

    my friend,

    i found a good tutorial on making this xml plalist

    http://republicofcode.com/tutorials/...mlvideoplayer/

    the thing is that i am not flash developer, i'm actually a web developer. i thought using javascript was the way to go. obviously not.

    but i thank you for directing in the right direction

    julio

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles