Hi,
I am trying to create a simple click through. I have one button. On release, I want it to play to one frame, and stop. Then, the part I don't understand, I want a second release that plays to a third keyframe.
Here is my code:
stop();
_global.mrt = this;
threeinone.hitArea = hitArea_mc;
threeinone.onRelease = function(){
trace("onRelease has been called.")
this.gotoAndPlay("begin");
};
In case you've got more than two possibilities, you can use a number (although here, it's illustrated with two possibilities as well):
code:
threeinone.hitArea = hitArea_mc;
var i = 1;
threeinone.onRelease = function()
{
trace("onRelease has been called.");
if (i == 1)
{
this.gotoAndPlay("begin");
i = 0;
}
else
{
this.gotoAndPlay("open");
i = 1;
}
};