Hey Fellas,
When I got into Flash, one of my goals was to create resizable/draggable content. I had problems achieving this because resizing an mc would give distortion. As well, images in mc’s wouldn’t work, because there would be gaps inbetween the images. I just remembered this goal, and now know how to do it. Maybe someone else could use this, whether to see how, use, or take a short cut, and improve it. It’s only for Flash Player 8 and higher, but maybe with some changes from BitmapData to masks, it could be used for Flash Player 7.
Example:
*- Click and hold red header to move.
- Click and hold diamond in corner to resize.*
** Source**:
v0.3: [COLOR=Blue]Attached[/COLOR] (70KB)
** To-Do:**
- Change resizer graphic.
- Add ability to have a title.
- Add ability to have resizing content.
- Add custom specifications for child mc’s (eg. noScale).
- Allow for custom types (positions not being left/right/top/bottom/etc).
- Impliment resizing penner easing.
- Add ‘resize from center’ option.
- Attempt workaround to link draggABLE and resizABLE bounds.
- Load “skins” via xml.
- Add custom functions.
- Add ability to not require “parts” (eg. default clickable bot-right corner)
- Lots more.
If you use it, make sure to check back every so often. This is one of various classes I plan on integrating into my personal sites.
Resizable content goes well when called to resize if the browser resizes (http://www.actionscript.org/tutorials/intermediate/Dynamic_Layout_Control/index.shtml).
I included the copyrights, because the graphics are from Blizzard’s site.
ETA on next version: 1-2 weeks.