|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Registered User
Join Date: Jan 2002
Posts: 505
|
way off topic (anyone know how to let a user resize movieclips?)
I'm making a simple Flash app that allows users to drag movieclips from a tool box onto a work area. I want them to be able to select a movieclip (with visible indicators like "handles") and then resize and rotate them as well. Like this,
http://www.ferryhalim.com/orisinal/flowers/index.htm When you click on one of the flowers they get "handles" that indicate it is selected and that allow the sizing and rotation. Also, the handles themselves do NOT resize or change...just the movieclip underneath. I'm sure I can figure this out (might take a day!) but if anyone knows of a simple way to accomplish it or an online example somewhere that would be great (I could finish this morning and spend the afternoon at the pub!) Thanks in advance for any ideas. |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Jun 2002
Location: Ottawa
Posts: 4,368
|
I've done this, in a different way. In the example you've given, the flower is an mc in an mc. The main mc contains code that reacts to the onPress on the pic mc and displays the handles (contained in the main mc). The handles have onPress code as well to perform the functionality. The resizing is done by scaling the pic mc, not the main mc. This way all you're doing is moving the handles, rather than resizing them.
I've attached an FLA with a component I made for testing for the upcoming V3 joystick component. It's not terribly complex, and doesn't have rotation support, but that's probably not too hard to add. It resizes a background mc (the box), which could just be substituted for another mc. The handles are visible in the IDE and are only visible in the SWF when you hover over the top-left corner (drag) or bottom-right corner (resize). Hopefully it's a start anyhow. mbd |
|
|
|
|
|
#3 |
|
Administrator
Join Date: Jun 2002
Location: Ottawa
Posts: 4,368
|
Here's the SWF in case you just want to have a look first.
mbd |
|
|
|
|
|
#4 |
|
Registered User
Join Date: Jan 2002
Posts: 505
|
Thanks Derek. I've started working on one kinda like you described (mc in an mc). I'll have a look at your code to see if I can shortcut this thing! Ultimately my goal is to have an mc I can just drop other mcs onto to inherit this behavior with no additional work on my part.
Thanks again. (BTW, your SWF link did not work for me but the FLA is fine.) |
|
|
|
|
|
#5 |
|
Administrator
Join Date: Jun 2002
Location: Ottawa
Posts: 4,368
|
Yeah, I think the server doesn't have the MIME-type setup for SWFs so they can just play. I can download it fine, but that's it.
mbd |
|
|
|
|
|
#6 |
|
more time please
Join Date: Apr 2003
Location: Scotland
Posts: 69
|
There is quite a good prototype at layer51 for this written by senocular. http://proto.layer51.com/
Actually after looking at the example you gave, I think that this is probably what they are using. Sorry this is a bit late to let you get off down the pub. Hope this helps. Cheers, Douglas |
|
|
|
|
|
#7 | |
|
Registered User
Join Date: Jan 2002
Posts: 505
|
Quote:
Thanks ever so much for this link. It is EXACTLY what I need!!!!! As it turns out, I had ended up delaying this project (and not because of the pub!) Now I can get it back on track; you've saved me a lot of work. Thanks again! |
|
|
|
|
|
|
#8 |
|
more time please
Join Date: Apr 2003
Location: Scotland
Posts: 69
|
No problem
![]() |
|
|
|