Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.lang.javascript > #8038 > unrolled thread
| Started by | Joe rock <joerock@se.ce> |
|---|---|
| First post | 2016-06-01 04:44 +0200 |
| Last post | 2016-06-03 09:57 +0000 |
| Articles | 4 — 2 participants |
Back to article view | Back to it.comp.lang.javascript
script java Joe rock <joerock@se.ce> - 2016-06-01 04:44 +0200
Re: script java "ciccio" <21669invalid@mynewsgate.net> - 2016-06-01 08:56 +0000
Re: script java Joe rock <joerock@se.ce> - 2016-06-02 02:25 +0200
Re: script java "ciccio" <21669invalid@mynewsgate.net> - 2016-06-03 09:57 +0000
| From | Joe rock <joerock@se.ce> |
|---|---|
| Date | 2016-06-01 04:44 +0200 |
| Subject | script java |
| Message-ID | <nili5r$kta$1@gioia.aioe.org> |
Cosa fa questo script ?
-----------------
<script>
<!--
// Mouseover/ Click sound effect- by JavaScript Kit (www.javascriptkit.com)
// Visit JavaScript Kit at http://www.javascriptkit.com/ for full source
code
//** Usage: Instantiate script by calling: var
uniquevar=createsoundbite("soundfile1", "fallbackfile2",
"fallebacksound3", etc)
//** Call: uniquevar.playclip() to play sound
var html5_audiotypes={ //define list of audio file extensions and their
associated audio types. Add to it if your specified audio file isn't on
this list:
"mp3": "audio/mpeg",
"mp4": "audio/mp4",
"ogg": "audio/ogg",
"wav": "audio/wav"
}
function createsoundbite(sound){
var html5audio=document.createElement('audio')
if (html5audio.canPlayType){ //check support for HTML5 audio
for (var i=0; i<arguments.length; i++){
var sourceel=document.createElement('source')
sourceel.setAttribute('src', arguments[i])
if (arguments[i].match(/\.(\w+)$/i))
sourceel.setAttribute('type', html5_audiotypes[RegExp.$1])
html5audio.appendChild(sourceel)
}
html5audio.load()
html5audio.playclip=function(){
html5audio.pause()
html5audio.currentTime=0
html5audio.play()
html5audio.stop()
}
return html5audio
}
else{
return {playclip:function(){throw new Error("Your browser doesn't
support HTML5 audio unfortunately")}}
}
}
//Initialize two sound clips with 1 fallback file each:
var clicksound=createsoundbite("italian.mp3")
-->
</script>
[toc] | [next] | [standalone]
| From | "ciccio" <21669invalid@mynewsgate.net> |
|---|---|
| Date | 2016-06-01 08:56 +0000 |
| Message-ID | <2016060108561221669@mynewsgate.net> |
| In reply to | #8038 |
Joe rock <joerock@se.ce> ha scritto: > > Cosa fa questo script ? CUT Sul sito segnalato nel commento puoi analizzarlo in azione: http://www.javascriptkit.com/script/script2/soundlink.shtml
[toc] | [prev] | [next] | [standalone]
| From | Joe rock <joerock@se.ce> |
|---|---|
| Date | 2016-06-02 02:25 +0200 |
| Message-ID | <ninueh$1q62$1@gioia.aioe.org> |
| In reply to | #8039 |
On 01/06/2016 10:56, ciccio wrote: > Joe rock <joerock@se.ce> ha scritto: >> >> Cosa fa questo script ? > CUT > Sul sito segnalato nel commento puoi analizzarlo in azione: > > http://www.javascriptkit.com/script/script2/soundlink.shtml > Si' grazie , avevo visto. Ma non c'è un visual editor per javascript ? Un ambiente visuale che abbia breakpoint , valore delle variabili eccc... ( tipo i vecchi ambienti di sviluppo della Borland o di microsoft ). Scusa ma conosco poco javascript. Grazie
[toc] | [prev] | [next] | [standalone]
| From | "ciccio" <21669invalid@mynewsgate.net> |
|---|---|
| Date | 2016-06-03 09:57 +0000 |
| Message-ID | <2016060309574521669@mynewsgate.net> |
| In reply to | #8040 |
Joe rock <joerock@se.ce> ha scritto: > On 01/06/2016 10:56, ciccio wrote: > > Joe rock <joerock@se.ce> ha scritto: > >> > >> Cosa fa questo script ? > > CUT > > Sul sito segnalato nel commento puoi analizzarlo in azione: > > > > http://www.javascriptkit.com/script/script2/soundlink.shtml > > > > Si' grazie , avevo visto. > > Ma non c'è un visual editor per javascript ? > > Un ambiente visuale che abbia breakpoint , valore delle variabili > eccc... ( tipo i vecchi ambienti di sviluppo della Borland o di microsoft ). Certo che si può fare debugging, ma il concetto non è automaticamente abbinato al concetto più generale di "visual editor". Cmq, se stai iniziando, ti converrebbe o usare Firebug, oppure gli strumenti di sviluppo del browser che usi. Per entrambi su Internet trovi gozdliardi di informazioni, basta una ricerca su google.
[toc] | [prev] | [standalone]
Back to top | Article view | it.comp.lang.javascript
csiph-web