Groups | Blog | Home
all groups > flash actionscript > march 2007 >

flash actionscript : Play SOUND and the go to URL



rowby
3/18/2007 9:44:41 PM
Hi All,

I want the visitor to click on a button. First a sound is heard and then they
are taken to a url.

I'm using this script:

on (release) {
var your_sound:Sound = new Sound();
your_sound.attachSound("store");
your_sound.onSoundComplete = function() {
var intervalID;
intervalID = setInterval( function(){
getURL("http://www.Domaincom/store.html","_self"); clearInterval(intervalID) },
1000);
}
your_sound.start();
}


And I"m getting this error code:

**Error** Symbol=joni, layer=JONI'S STORE, frame=1:Line 1: Mouse events are
permitted only for button instances
on (release) {

Total ActionScript Errors: 1 Reported Errors: 1

---------------
BTW, Is this the best script to use to do this?

Thanks

Rowby
ahref
3/18/2007 10:50:21 PM
rowby
3/18/2007 10:58:12 PM
rowby
3/18/2007 11:00:11 PM
ahref
3/18/2007 11:20:34 PM
AddThis Social Bookmark Button