• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 178
  • Last Modified:

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");
}
0
surfjoe
Asked:
surfjoe
1 Solution
 
blue-genieCommented:
does your moveclips exist in the frame you're going to?
0
 
surfjoeAuthor Commented:
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?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now