Skip to main content
March 18, 2007
Question

Play SOUND and the go to URL

  • March 18, 2007
  • 2 replies
  • 315 views
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
This topic has been closed for replies.

2 replies

March 18, 2007
Yes it's a button symbol.
March 18, 2007
PRoperties calls it a Button (Instance of Joni's Store) Track as button
Inspiring
March 18, 2007
how odd i have no idea then sorry :(
Inspiring
March 18, 2007
are you using a button symbol