flash/javascript question
- Started
- Last post
- 17 Responses
- kerus
first off, i know its "easier" to do in all flash, but is it possible to have a javascript function trigger a sound in an swf ?
so that a plain TEXT link that makes a sound onmouseover?i know its a pain in the ass, but hey, its snowing and im bored.
gracias
the whole javascript/flash playing nicely thing is something ive been dying to toy with and im quite stuck at the get-go. doh.
- Mick0
This may help get you started...
http://www.macromedia.com/suppor…Basically what you want is the javascript to goto a frame in flash that pays the sound - the javascript will be triggered on HTML mouseover event.
- kerus0
PERFECT! you rock. thanx for the link
- kerus0
okayyyyyyy thats the correct link eh?
- Mick0
Have a look around the macromedia site.. there's a tonned of examples.
Also try google and you'll find links like this...
http://www.moock.org/webdesign/f…
- ********0
you don't necessarily need AS to do it. You can just put them in your objects up and over states.
- kerus0
brutal.
i thought this would be a simple case of making some sort of javascript function that makes an "invisible" flash movie gotoandplay a frame # (to play the sound) or something simple.
- ********0
yeah you can do it that way too. Two ways of skinning this dog I guess. It all depends on how you want to use the sound, or if multiple sounds are used and the length of those sounds, externally speaking.
- ********0
Make a square and click F8 to make it an object. Edit that object. Import a .wav (preferrably) or .mp3 and put it in the over state of that object timeline.
- Mick0
When you say TEXT LINK, do you mean a text link in a HTML page or in the flash movie?
- kerus0
hah.
i mean text link, like written out in html and not partof the flash movie at all.. the flash movie can just lurk somewhere only to "house" the sound i want to use.. so that when you mouseover the links it does a "gotoandplay" a subtle clicking type noise in the swf.
heheand its still snowing.
- kerus0
still no luck, anyone ever done something like this?
- unfittoprint0
as u stated it's a pain in the ass.
- kerus0
B to the IZUMP
- instantok0
why use flash?...you can trigger sounds with css...
- kerus0
oh, DO TELL! DO TELL! :)
- instantok0
sort through the stuff in here...i dont remember the exact syntax or compatibility issues...it is relatively new (several months)...sorry i cant be more specific...
- kerus0
thanx dude. its worth a shot..