0 Replies Latest reply on Apr 18, 2007 11:54 AM by sunnydesign

    attachMovie in an attached Movieclip?

      I am trying to create an interface that has a lot of menus and submenus and a boat load of content. I figured the best way to do this was to create movieclips and attach them dynamically as the user progresses through the site. As it stands currently, I have a mainMenu and those buttons load a submenu via the attachMovie method to empty movieClips created and place in actionscript - (none of this code is a button action - they are all frame actions)

      this.createEmptyMovieClip("submenu1", 10);
      submenu1._x = 10;
      submenu1._y = 20;

      this createEmptyMovieClip("descrip", 20);
      descrip._x = 50;
      descrip._y = 20;

      button1.onRelease = function():Void {
      submenu1.attachMovie("ChefBoyardee_mc", "CBmenu", 10);
      button2.onRelease = function():Void {
      submenu1.attachMovie("Doritos_mc", "Dmenu", 10);

      where ChefBoyardee_mc and Doritos_mc are movieClips in the library that is linked to actionscript.

      that part works and their respective submenus load. My troubles lie in getting those attached submenus to load movieClips into the descrip emptyMovieClip.

      inside those movieClips (the codes are identical except for the instance names)
      I have 5 buttons:

      ravioli_btn.onRelease = function():Void {
      descript.attachMovie("RavDescrip_mc", "description1", 20);
      beefaroni_btn.onRelease = function():Void {
      descript.attachMovie("BeefDescrip_mc", "description2", 20);
      spaghetti_btn.onRelease = function():Void {
      descript.attachMovie("SapghDescrip_mc", "description3", 20);
      pasta_btn.onRelease = function():Void {
      descript.attachMovie("PastaDescrip_mc", "description4", 20);
      rigatoni_btn.onRelease = function():Void {
      descript.attachMovie("RigDescrip_mc", "description5", 20);

      but these buttons don't work. I have used trace statements to see if they're being clicked and I do get output, but no movies load into the descrip area. I have tried _root.descrip.attachMovie(..., _parent.attachMovie(..., _level0.attachMovie(..., _parent._parent.attachMovie(..., _parent._parent._parent.attachMovie(..., etc, and nothing works.

      I have been told that in theory, it should work, but for some reason, I am not getting the description movieClips to load. So my question is - is there a reason attached movieClips cannot attach other movieClips? Is there a workaround without having to place my 150 movieclips on the stage? Any insight would be greatly appreciated. Thanks!