I’m having an issue with a simple movieclip onRollOver event. Here’s my code:
_root.mc_shutternav.mc_nav_8.onRollOver = over;
_root.mc_shutternav.mc_nav_8.onRollOut = out;
_root.mc_shutternav.mc_nav_8.onRelease = hit;
// definition for over state
function over()
{
this.gotoAndPlay(2);
}
// definition for out state
function out()
{
this.gotoAndPlay(6);
}
function hit()
{
_root.gotoAndPlay(2,1); // play scene 2
}
So all I’m trying to do is call one function to control my movie clip onRollOver actions, however I’d like to be able to pass variables to the “hit” function so something like this:
_root.mc_shutterright.mc_nav_8.onRelease = hit(variable);
function hit(variable)
{
_global.urljumpto = variable;
trace(urljumpto);
_root.gotoAndPlay(2,1); // play scene 2
}
However, with this setup the function hit() is called automatically every time I publish the movie. What’s wrong with this? What’s the difference between mc.onRelease = function; and mc.onRelease = function()? thanks!!!
ps, sorry, I’m publishing in AS 2.0 and flash player 9