MovieClip Resize Handles

Posted on 2006-03-21
Last Modified: 2006-11-18

I have a moveclip which is needs to be resizable by the user

Inside the movieclip i have a resize handle that when clicked and dragged resizes’ the movieclip

The movieclip is a simple long diamond shape going from Top-Left diagonally down to Bottom-Right

What I have at the moment is the handle is currently in the Bottom-Right of the clip and resizes from there
This works fine and i am also able to limit the size of the resize box using "startDrag(this, false, 20, 20, 100, 100);"

What i need is a resize handle to work with a secondary movieclip that is the same as above but has the diamond running from Top-Right diagonally to Bottom-Left
Therefore i want the resize handle in the Bottom-Left and presumably will need to resize into negative numbers.

I just can’t figure out the code to swap it round!

This is my original code for the Resize in the Bottom-Right.

this.onPress = function() {
    startDrag(this, false, 20, 20, 100, 100);

      this.onMouseMove = function() {
            this._parent.diamond._width = this._parent.diamond._x + this._x + this._width;
            this._parent.diamond._height = this._parent.diamond._y + this._y + this._height;

Please help
Question by:nixianick
    LVL 34

    Expert Comment

    by:Aneesh Chopra
    can you upload and post the SAMPLE FLA

    or send it by email (my email is in my PROFILE)

    LVL 34

    Accepted Solution


    I have sent the update to your mail

    I have also fixed the depth issue....
    and created sample for each side resizing..


    Author Comment

    Thanks alot

    This is great


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
    While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
    In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
    The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now