Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.


    • CommentAuthorphilips
    • CommentTimeNov 9th 2006
     
    What I want to do is have an mp3 or another movie with a sound embed play when you select the song in the combobox. I am some what of a newbie and the only way I can get it to play is if I do a get url command which pops up another window which I don't want.

    Thanks
    • CommentAuthorjustnajm
    • CommentTimeNov 14th 2006
     
    Hi,

    It is little bit messy task as the sounds are not much easy to handle but I have found the way once I tried to play them on click event of link.

    here it is:

    You need to load the sound as the page loads with the help of html <embed> tags but also should take care that the hidden property of embed tag should be set to true as it will avoid the browser to display the media player buttons on the page, also should set the property of autostart to false, I don't think I need to describe this.

    <embed src="myfile.format" hidden=true autostart=false name="file1">

    Now you need a javascript function that should call it on any event.

    document.embed["file1"].play();

    this line also do the same task

    document.embed[0].play();

    I hope I answer the question, you can ask much more if you did'nt get it.