1 Reply Latest reply on Sep 10, 2008 12:36 PM by kglad

    buttons in movieclip problem

      Hello Flash-people,

      Even though i know not much of actionscripting, i like to make sites that are flash-based, so i keep on challanging myself with that. But now i stumbled into something, and i just cant find a solition!

      here is my problem:

      I have made dropdownmenu's in a movieclip and the mc works with hittest like this:

      onClipEvent (enterFrame) {
      if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
      } else {

      In this dropdown-menu i have buttons, those should be able to load and unload movieclips into an emptymc and an emptymc2 in the main movie (_root). I need them to load 2 things:
      the background (background.swf) and the text that comes over te background. And since i want only the text to change when another button is hit in the same dropdown menu, i tried to work with this:

      on (press) {
      if (_root.emptymc.getBytesTotal()<10) {
      loadMovie("background.swf", "emptymc");
      loadMovie("text1.swf", "emptymc2");

      But, no matter what i try to do, i just cant get it to work, it only works when the button with this action is already in the _root, and i dont want that. Neither can i put the emptymc or the emptymc2 in the same movieclip as the dropdownmenu, because i want other buttons (from another dropdownmenu) also to use the emptymc and emptymc2.

      Maybe i have taken a wrong direction to begin with, i really dont know. But if you do, please enlighten me! :-)
        • 1. Re: buttons in movieclip problem
          kglad Adobe Community Professional & MVP
          use the correct paths to emptymc (_root.emptymc) and emptymc2 (likewise), don't use strings for the movieclips and you really should use the loadMovie() method, not the function so you avoid bad habits like you're currently developing using strings instead of movieclips.