7 Replies Latest reply on Jun 25, 2007 12:02 PM by crazyjoemilan

    Create Resizable Label

    ajayscript
      Hi Memebers,

      I am new here and this is my first posting regarding a moviclip (label with ,their title bar and icon to resize it through mouse )
      What i was trying to make is a lable means movieclip which have a editable title bar with resizable through mouse and draggable also. i have lots of objects or images on the screen through XML file and i am dragging each object on the screen any where after creating this label i have to attach the objects on the label or place the objects on the label and then i have to move label with all attached objects . So i need a script for creating resizable movieclip or lable to attach objects on that or place objects on that label .

      If anybody have idea about it , plz connect to me , mail me suggest me plz.
        • 1. Re: Create Resizable Label
          crazyjoemilan Level 2
          create a box, make it into an mc.
          create a button, place it on the bottom right corner of the box (should be on top).

          name the mc instance "my_mc"
          name the button "but"

          but.onDrag = function() {
          my_mc._xscale = 110;
          my_mc._yscale = 110;
          startDrag(this);
          }

          What this will do is make your movie clip 110% in size when you drag out on the button. Now you'll want to hook up your resizing to a function, so you can call it more often, thus showing it growing and shrinking. Do you think you can do this?

          HmcH
          • 2. Re: Create Resizable Label
            ajayscript Level 1
            but.onDrag = function() {
            my_mc._xscale = 110;
            my_mc._yscale = 110;
            startDrag(this);
            }

            is not working meansbut.onDrag is not working , i have tried so much but output is nothing , if i change it but.onDrag to but.onPress it is working but not like i want . So please correct if any errors in but.onDrag Please
            • 3. Re: Create Resizable Label
              crazyjoemilan Level 2
              whoops

              onDragOutside() is a handler, onDrag is not.

              Even with this, you'll still need to tie this function to something that increases incremented scaling, and such.
              • 4. Re: Create Resizable Label
                ajayscript Level 1
                onDragOutside() is still not working
                • 5. Re: Create Resizable Label
                  crazyjoemilan Level 2
                  onDragOut, sorry - I can't build the thing for you, I just don't have time, but here is some code...

                  but.onPress = function() {
                  my_mc._xscale = 110;
                  my_mc._yscale = 110;
                  startDrag(this);
                  }
                  but.onRelease = function() {
                  stopDrag();
                  }

                  now instead of changing _xscale to 110, change it to a variable thats attached to the position of the button. if you're not worried about scale, use the _width / _height properties.

                  note* even with changing "110" to a changing variable, you'll still need to use setInterval to continually update until the button is released. Make sense?

                  Or, actually, you could have a class that extends the button class that has all these behaviors, then sync the mc's height/width onEnterFrame().

                  Does that help? I'm kinda wired and loopy right now, so forgive me if it doesn't make sense.
                  • 6. Re: Create Resizable Label
                    ajayscript Level 1
                    good morning guys

                    plz help me out if any bodu have the existing code for resizable movie clip on drag like resizable window in outlook express , so we can make it more stretchable on the stage.

                    Plz
                    • 7. Re: Create Resizable Label
                      crazyjoemilan Level 2
                      I'm happy to help you write your own code, but i'm not interested in doing all the work for ya! :)