
October 30th, 2004
11:51 PM
Neverside Newbie
Status: Offline!
AS: always staying a certain distance away?
Simply put, I have three rectangle movieclips on a stage. When I click the middle movieclip (2nd) it expands/enlarges. Because of this the left and right (1st and 3rd) movieclips would have to maintain an equal distance/space, so when the middle movieclip expands they slide to the left or right with it.
Granted you can understand that, my question is: how would I do this via actionscript? I've spent about 8 hours trying to figure it out (well, including a few other things), but I've had no luck. I assume it is a condition/loop using the _x, but it doesn't come out right for me. 
___________________
Nick
Pixel-Infinity

October 31st, 2004
01:23 AM
Crazy Pants
Status: Offline!
http://ericlin2.tripod.com/skew/skewt.html
that may help. Instead of skewing it, just make it get wider.
Hope it helps some
___________________
:: pop ::

November 1st, 2004
08:33 PM
Neverside Newbie
Status: Offline!
Thanks for the effort, Meg.
A fellow over at Kirupa has got me started in the right direction.
My only problem now is everything I resize dynamically resizes from the center out. I need it to transform from one corner (if you hold alt + transform a box you'll see what I mean).
Back to work 
___________________
Nick
Pixel-Infinity

November 2nd, 2004
06:25 PM
Neverside Newbie
Status: Offline!
Just in case any one in the future is wondering, I simply need to change the registration point.
The only thing is I can't do that dynamically - supposedly there is a hack, but I guess I'll just have to do it w/out AS for now.
___________________
Nick
Pixel-Infinity

November 3rd, 2004
05:54 AM
Neverside Newbie
Status: Offline!
hey, jadedchron,
check out the attached..
little trick I learned from Branden Hall in some book.. forgot which.. lol. Oh well, it works..
d.
___________________
obod | weapons of mass dysfunction

November 3rd, 2004
11:38 AM
Neverside Newbie
Status: Offline!
Devon,
Thanks for your response. I couldn't open it for some reason. Is it Flash 5?
Thanks
___________________
Nick
Pixel-Infinity

November 3rd, 2004
02:46 PM
Neverside Newbie
Status: Offline!
MX 2004. Didn't notice if you had specified or not..
___________________
obod | weapons of mass dysfunction

November 3rd, 2004
02:52 PM
Neverside Newbie
Status: Offline!
Oh, okay. I'll see what I can do to get around that. Thanks
___________________
Nick
Pixel-Infinity

November 3rd, 2004
04:59 PM
How are you expanding the middle box? And are the boxes put at any specific location or just right next to the middle box?
If you're adding to the value of the middle box's _width, move the left box to the left each time with the value you expanded with, divided by 2. Similarly, move the right box to the right with the value you expanded with divided by 2.
Or more dynamically you could do every frame if you for example wanted to have a space of 20 pixels :
leftbox._x = middlebox._x - (middlebox._width/2) - 20 - (leftbox._width/2)
and
rightbox._x = middlebox._x + (middlebox._width/2) + 20 + (rightbox._width/2)
--
Is that what you were looking for?
___________________
mWòÓh
MSN :aastalker@hotmail.com

November 4th, 2004
04:17 AM
Neverside Newbie
Status: Offline!
devonair,
That's almost exactly what I am looking for. PM me your PayPal, if you have one, and I'll try and send you a lil something in the next week or so.
Fofo,
The boxes are expanding and shrinking dynamically (originally they were mc tweens). The boxes are a set width, like 10 or so, from the boxes beside it.
I'll give that code you've provided a try. Thanks a lot!
-----
EDIT:
devonair,
Is this the book you were referring to?
___________________
Nick
Pixel-Infinity
Last edited by jadedchron, November 4th, 2004 04:21 AM (Edited 1 times)