Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 312
  • Last Modified:

MovieClip Resize Handles

Hi

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
Regards
Nick
0
nixianick
Asked:
nixianick
  • 2
1 Solution
 
Aneesh ChopraCommented:
can you upload and post the SAMPLE FLA

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

Rgds
Aneesh
0
 
Aneesh ChopraCommented:
Hi,

I have sent the update to your mail

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

Rgds
Aneesh
0
 
nixianickAuthor Commented:
Thanks alot

This is great

Regards
Nick
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now