3 Replies Latest reply on Aug 20, 2007 8:42 AM by kglad

    drop down box drag and drop storyboard

    annatriant
      Hello

      I'm trying to create an interactive storyboard using the drag and drop function to drag characters onto a stage so the user can arrange them however they wish. My problem is that now I have started this project I have realised I need a lot more images than first thought and have limited space as this is to go on a website and have the option to be printed.

      Therefore, I have been trying to create a dropdown menu with tabs with the character name on and when the tab is clicked a box with all that characters images appears below. Now I managed to make this work but then when you click between the tabs having placed the characters on the storyboard, if you click a tab in the timeline before the one you were on, obviously the character disappears from the stage. Is there anyway of creating a drop-down menu or something similar to save space, which can have draggable movieclips in?

      Also my second problem is does anyone know how to create a duplicateable movieclip. For example, once a character is dragged from the menu onto the storyboard, it is now only on the storyboard and there is only one copy. Now I know I could just make loads of the same character and layer them, but it would be much better if someone knew of a way to duplicate a movieclip once it is dragged away so that there is always one in the menu.

      Any help would be greatly appreciated as I am fairly new to flash and am trying my hardest to get to grips with actionscript.

      Cheers,

      Anna
        • 1. Re: drop down box drag and drop storyboard
          kglad Adobe Community Professional & MVP
          your first issue is specific to your set-up: there's no reason movieclips would disappear from a timeline unless they were placed on-stage by virtue of a particular frame playing that contained that movieclip.

          you probably want to use actionscript to place that movieclip on-stage. then it wouldn't matter what timeline frame was playing. the movieclip could be removed (if and when necessary with actionscript).

          for your 2nd problem, just use duplicateMovieClip() when a character starts dragging. you'll want to swapDepths() so your character being dragged is on top.
          • 2. Re: drop down box drag and drop storyboard
            annatriant Level 1
            Thanks for your help but not too sure I understand most of it.

            Just working on duplicating characters at the moment and so far have managed to duplicate once but then can only move duplicate character and original disappears.
            This is the code I have on the movieclip at the mo - any suggestions very very welcome.

            on (press) {
            startDrag(this, true);

            duplicateMovieClip(this, newname="drag_clip_new", 2);
            }
            on (release) {
            stopDrag();
            {

            }
            }

            Don't know much about depth etc.

            Also found this code on the net but am having trouble changing it to fit my needs:

            var mcNum = 1;
            var dupli:MovieClip;
            mc1.onPress = function() {
            dupli = mc1.duplicateMovieClip("mcname"+mcNum, ++mcNum);
            dupli._x = mc1._x;
            dupli._y = mc1._y;
            dupli.startDrag();
            this._parent["mcname"+mcNum].onPress = function() {
            this.startDrag();
            }
            this._parent["mcname"+mcNum].onRelease = function() {
            this.stopDrag();
            }
            };
            mc1.onRelease = function() {
            dupli.stopDrag();
            };
            mc1.onReleaseOutside = function() {
            dupli.stopDrag();
            };


            Again any help very welcome!
            • 3. Re: drop down box drag and drop storyboard
              kglad Adobe Community Professional & MVP
              you must use unique depths for each movieclip. and you must learn about depths for your project:

              http://www.kirupa.com/developer/actionscript/depths.htm