Duplicate Movie Clip in a Duplicated Movie Clip...

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default Duplicate Movie Clip in a Duplicated Movie Clip...

    I'm making a Flash Navigation Bar (menu) that could be freely customized by people just through a text file.
    The problem is that my submenus won't duplicate properly.
    I'm using Flash MX 2004 Pro, on Windows XP pro.
    I attached the file.
    thanks in advance.

    [url]http://webforums.macromedia.com/attachments/DuplicateMovieClip.zip[/url]


    TommyHilfiger webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. need help positioning movie clip relative to a resizing clip...
      I am trying to attach a "caption" to the bottom right edge of a movie clip that resizes. I am using the resizing clip as a image holder for a...
    2. Duplicate Movie Clip & Code?
      If I use duplicate movie clip to create another instance of the clip on the main time line, and it gives it a new name, how do I relate the code...
    3. control main movie from inside a movie clip
      this has probably been discussed already but i couldn't find it, heck I may have already asked it. I have a movie clip with a button in it, when the...
    4. duplicate movie clip question
      Hello peoples, Could someone please help me figure out the action script needed to do this: duplicate a mc (which contains a bitmap) once every...
    5. Duplicate movie clip instance naming
      Hi, I've got a movie where I duplicate a Button a bunch of times using the DuplicateMoiveClip command. This works fine and dandy. however I now...
  3. #2

    Default Re: Duplicate Movie Clip in a Duplicated Movie Clip...

    here's your file with the main menu corrected. use a similar method to ensure your data is loaded before using it. in fact, i would recommend using all the data in the onData event on the main timeline instead of scattering it throughout your movie.

    [url]http://webforums.macromedia.com/attachments/New[/url] Menu.zip


    kglad webforumsuser@macromedia.com Guest

  4. #3

    Default Re: Duplicate Movie Clip in a Duplicated Movie Clip...

    Thanks a lot for your fast reply. :)
    but unfortunetly there's still the same problem.
    i tried to apply the changes you made for the main menu to the submenus but it still doesn't work.
    I ll be more specific this time :)

    Alright. so i thought about making a menu script that could be customize by any users just throught a .txt file.
    With DuplicateMovieClip() and a for loop function which would duplicate a movieclip.
    the variable Nb_Gmenu is loaded from an info.txt. so that the user can specify how many Main Menu they want. everything work alright with this.

    for (count=2; count<Nb_Gmenu; count++) {
    mcount = count-1;
    _root.Gmenu1.duplicateMovieClip("Gmenu"+count, count);
    _root["Gmenu"+count]._y = _root["Gmenu"+mcount]._y+_root["Gmenu"+mcount]._height;
    _root["Gmenu"+count].Gmenutxt = eval("Gmenutxt"+count);
    _root["Gmenu"+count]._width = _root["Gmenu"+count].Gmenutxt.length*6.7;
    _root["Gmenu"+count]._x = _root["Gmenu"+count].Gmenutxt.length*6.7/2;
    }

    In this MovieClip that is Duplicated there is an other MovieClip which i call Submenu.

    in the info.txt:
    &Gmenutxt1=Home page&
    &Gmenutxt2=Tutorials&

    eval("Gmenutxt"+count); so that the Duplicated MovieClip has a button that says "home page", and an other one just below that says "Tutorials"

    I don't understand why the submenus won't expand as i want... :( Only one lines does.


    TommyHilfiger webforumsuser@macromedia.com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139