Play & Stop Control In Java Script - SWiSH 2 Tutorials
 
  Buy Ebooks, Video Games, DVDs, Electronics and more !
Home | Help Forums | Web Design Tutorials | Free Swishmax Downloads Make Money Online Blog . Free Image and Photo Sharing and Hosting

 

 

Company

Home

Nework Details

Tutorials

SWiSH 2

SWiSHMax

Flash MX

PHP & MySQL

HTML / JScript

Adobe Photoshop

Corel Draw

Gimp

Miscellaneous

Downloads

Templates

Plugins

Fonts

Wallpapers

Free Images

Scripts and Codes

Products

E-Books

SWiSH BB

SWiSH Templates

SWiSH-DB Newsletter
Subscribe to our newsletter : GO
  Partners / Affiliates

   Free image hosting
   Web Design Pakistan
   Swish Templates
   SWiSH Climax
   Talkfreelance Community
   Template Desire
   Lite boards
   Script Sector
   GimpTalk
   13dots
   Idea Designs
   PHP Cafe
   Sposatoettore
   Free swishmax templates
   Swishzone

Manage your site with Flax Article Content Management System
Play & Stop Control In Java Script
Category : SWiSH 2 | Level : Beginner | Language : English
Ask Question | Read Comments | Post tutorial | Previous | Next

Web www.swish-db.com

1: Add this code inside the body tags:
QUOTE
<SCRIPT LANGUAGE=\"JAVASCRIPT\">

n = (document.layers) ? 1:0
ie = (document.all) ? 1:0
function play_sound() {
   if (n) document.thesound.play(false)
   if (ie) {
       document.thesound.stop()
       document.thesound.play()
   }
}
function stop_sound() {
   document.thesound.stop()
}
</SCRIPT>
<EMBED SRC=\"http://your.host.com/midifile.mid\" HIDDEN=TRUE AUTOSTART=\"false\" MASTERSOUND NAME=\"thesound\">


2. Create a new swish movie and name it whatever you want
3. Create some stop and play buttons, text, etc
4. Insert this in the action of the play button:
QUOTE
 
on [release]
 Goto URL: javascript:play_sound();

5. Insert this in the action of the stop button:
QUOTE

on [release]
 Goto URL: javascript:document.thesound.stop()


The music file can be anything from midi, wav, or an mp3 file. The most interesting part is, it's from and external source and does not use any plugin.

I'll create a web site with the tutorial because the formating doesn't seem right.


© 2002-2005 Flaxweb Network | Article Manager | Gimp Tutorials Library | RAD C++ Library | Free C/C++ Sourcecode |
Sites of interest : Web Design Blog | Swish Templates | Swishmax Ebook | Photoshop Templates | Gimp Tutorials | Text Forum | Make Money Online