Hi miksu174,
As expected, I am sure that frame 47 lies on root ?? if yes try one of the following approach :
1- Change gotoAndStop statement like this :
Code:
_root["gotoAndStop"](46);
2- Labeled the frame 46 (lets say its name is "Jump" ) then change the gotoAndStop line like this :
Code:
_root.gotoAndStop("Jump");
3- [AS 2 Approach] Instead of putting the event on the spinning part, put the code on the keyframe containing the spinning part like this (Lets say the instance name of your spinning part is "spin":
Code:
spin.onPress = function()
{
pressed=true;
}
spin.on.Release = function()
{
pressed=false;
}
spin.onEnterFrame = function()
{
if(pressed==true){
_root.Lever._rotation += 2;
if(_root.Lever.hitTest(_root.hit)){
gotoAndStop(46);
trace( "Frame changed" );
}
}
One of the above solution have to solve your issue if frame 46 lies on the root. If not please let us know.
Best Regards,
SajiSoft