Link to home
Start Free TrialLog in
Avatar of surfjoe
surfjoe

asked on

Flash actionscript displaying a subnav bar but after clicking all movie functions stop working?

I am using the following code to tween movieclips when the user clicks on a button within a menu movie clip and all is working untill I add "menu_MC.gotoAndStop("oidirectNav");" on the code for the second button this works and displays a subnav bar but afterwards all menu actions just stop working? any sugestions welcome as to what is going wrong... below is the code I am using (using the fuse ZigoEngine for the tweening)...


import com.mosesSupposes.fuse.*;
ZigoEngine.register(Fuse,PennerEasing,FuseFMP);
// loads menu bar
this.attachMovie("menu_MC", "menu_MC", this.getNextHighestDepth(), {_x:50, _y:515});

// HOME  ------- plays movie floor code
this.menu_MC.homeBtn.onRelease = function (){
      //ZigoEngine.doTween( '_x,_y', [0,-625], 1, Strong.easeInOut);
      ZigoEngine.doTween( Home_MC,'_x,_y', [0,0], 1, Strong.easeInOut);
      ZigoEngine.doTween([AboutSection_MC,Clients_MC,newsRoom_MC,oiadvertising_MC,recruitment_MC,oidirect_MC,ContactUs_MC,Portfolio_MC], '_x,_y', [0,625], 1, Strong.easeInOut);

      //this swaps the depths ------------------------
_root.x +=2;
// change movieclip ref below to current floor ---------
_root.Home_MC.swapDepths(_root.x);
//oiadvertising_MC.swapDepths();

} // end of floor play code


this.menu_MC.oidirectBtn.onRelease = function (){
      ZigoEngine.doTween([Home_MC,AboutSection_MC,oiadvertising_MC], '_x,_y', [0,-625], 1, Strong.easeInOut);
      ZigoEngine.doTween(oidirect_MC,'_x,_y', [0,0], 1, Strong.easeInOut);
      ZigoEngine.doTween([newsRoom_MC,Clients_MC,recruitment_MC,ContactUs_MC,Portfolio_MC], '_x,_y', [0,625], 1, Strong.easeInOut);

      //this swaps the depths ------------------------
_root.x +=2;
// change movieclip ref below to current floor ---------
_root.oidirect_MC.swapDepths(_root.x);
//oiadvertising_MC.swapDepths();

// moves the menu to subnav label
menu_MC.gotoAndStop("oidirectNav");
}
ASKER CERTIFIED SOLUTION
Avatar of blue-genie
blue-genie
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of surfjoe
surfjoe

ASKER

Yes they do but don't have an actual keyframe on that frame this is on a previous frame. I have just tried changing the code now and have the button coded using a gotoAndPlay going to a frame label and have then placed the following code a keyframe at the frame label:

import com.mosesSupposes.fuse.*;
ZigoEngine.register(Fuse,PennerEasing,FuseFMP);

// OiDIRECT ------- plays movie floor code start snipet

      ZigoEngine.doTween([Home_MC,AboutSection_MC,oiadvertising_MC], '_x,_y', [0,-625], 1, Strong.easeInOut);
      ZigoEngine.doTween(oidirect_MC,'_x,_y', [0,0], 1, Strong.easeInOut);
      ZigoEngine.doTween([newsRoom_MC,Clients_MC,recruitment_MC,ContactUs_MC,Portfolio_MC], '_x,_y', [0,625], 1, Strong.easeInOut);

      //this swaps the depths ------------------------
_root.x +=2;
// change movieclip ref below to current floor ---------
_root.oidirect_MC.swapDepths(_root.x);
//oiadvertising_MC.swapDepths();


This now works as I need it to but when testing I get the following output error:

Target not found: Target="/Home_MC/instance154/_mcHolder/mcContent" Base="_level0.Home_MC.instance154._mcHolder.mcContent"

Dispite the error everything works correctly, and the error only appears if I click serval buttons randomly within the movie navigation  not sure why this is?