Please please help

on (release) = function()
{
    _root.ContentMC.gotoAndStop(2)//frame i want to hold for one second
    setInterval(linkInt,"link",1000) //clear interval command to be in frame last played
    function(link){_root.ContentMC.gotoAndStop(3)};//final frame player stays here
};

that is a code i have written for a button on a website. but i cannot get it to work. can anyone please help?

what i need it to do is to go to the first frame, stop, hold for one second, then go to the second frame. the clear interval command will be in the last frame played. and i cannot just play two frames beside eachother, as they will not always be corrisponding with one another, they will be mixed combinations. that is why it is so important that the code is in the button.

please please help me… :crying:

setInterval(linkInt,“link”,1000)

should be changed to

_root.linkInt = setInterval(link,1000);

then in your final frame

clearInterval(_root.linkInt);

thanx for your help flextnet, but there is still something not working in it, showing the following errors…

Error Symbol=Naivgation, layer=buttons, frame=2:Line 1: ‘{’ expected
on (release) = function()

Error Symbol=Naivgation, layer=buttons, frame=2:Line 2: Statement must appear within on handler
{

with this modified code…

on (release) = function()
{
    _root.ContentMC.gotoAndStop(2)
    _root.linkInt = setInterval(link,1000);
    function(link){_root.ContentMC.gotoAndStop(3)};
}

can anyone see the problem with it? starting to wreck my nerves… :crying:

You need to put that code on the button instance, and it looks like you have it on the frame.

no mate, definatly on the button. dont understand it. im not that good at as, well nearly useless at it, but i cant see the problem with it, and it just wont work. leaves the button so that it does nothing. anyone got an idea what’s wrong with it???

Are you still getting the complie errors? Can you post the fla?

yes still getting the error messages, any help with this would be greatly, greatly appreciated.

had to zip the file before uploading it because it’s over the size allowance.