PDA

View Full Version : How would I make depth illusion?



AssafBez
11-28-2006, 09:09 PM
Hello everyone,

I was hoping somebody here could tell me
how would I make a mc that resize it self as you drag it on the y axis?
As if he moves far back when you drag him up
and close in as you drag it down?

the x axis is free to drag left and right with out any size effect on the mc.

The only thing I must add, is that the mc have more mc's in it.

I use flash 8 with actionscript 2 assist on.

I would really appreciate your help, please I am lost!
Thank you,
Bez

BLiZZaRD
11-28-2006, 09:57 PM
Drag and drop? Wouldn't it be smoother and easier to use key controls? You can contain the animation of "growing" and control it much better that way.

Do you have an example of what you want? There might be other better ways to accomplish it. :)

AssafBez
11-28-2006, 10:57 PM
Hi,
I am afraid that wont help because it's not what I need.

The problem is that it's rather a complex flash movie that I did a while back
to get to the scene where I need the help is hard to explain.

but here is the link:http://www.bezbox.com/projects/interactive/bto/bto.html

Now if you would find your way and get to the right scene
you will arrive to a party in a room where the people can be dragged
around, the thing is that they stay the same size.

I want them to scale down as I drag them up as if they go to the
back of the room.

Somebody have an answer to that?

BLiZZaRD
11-28-2006, 11:09 PM
Gotcha. I did enjoy breaking the bottles, LOL.

Let me see what I can come up with a little later today. :)

AssafBez
11-28-2006, 11:16 PM
Thanks BLiZZaRD,
Much appreciated.

BLiZZaRD
11-29-2006, 04:33 AM
Okay, I have accomplished this little demon!

It is not pretty, and you will have to change the settings, of course, but with this you will see the idea and that it does, in fact work!

(I am rather proud of it myself, LMAO!! )

There is one frame, one MC (named drag_me) and all the action script is on the MC itself.

I have fully commented on the AS so you can see where and why I did what.

You will have to change the amount of _xscale and _yscale (currently set at +/- 2) and you may have to envoke some sort of max _y position to stop the scaling.

Any questions, just ask :D

AssafBez
11-29-2006, 01:56 PM
Hello again BLiZZaRD,

I appreciate your help ALLOT and I don't want to sound ungrateful,
because I am very grateful!

However I was trying to play with your script to get my desired effect
and I must say I am lost, even with your comment in the script.

In your mc the size change while I am pressing the mouse regardless to
the mc position.

What I am trying to do is some thing as follow:
On mc position y=0 mc size=10%
On mc position y=400 mc size=100%

So the size of the mc is relative to it's position only,
with no connection to any other parameter!

Again I am a total n00b when it come to those things,
but I would Imagen that it would be better to make the
drag function independent from the size relative to position script,
no?


you can download my basic mc_drag.fla file
and you would see a mc that inside of it is a button that drag the whole mc.
now when the mc change position on the y axis I need it to change it's size.

the lower the Y position is, the smaller the mc become
and the higher the Y position is, the larger the mc become.
Of course it should not resize it self no matter what,
as long as the position is not changing.

Any idea of how to achieve this effect?

Again thank you for your help no matter what,
I appreciate you taking the time to help me.

If you can not find a solution I hope somebody else might know.
Thank's a million
Bez.

BLiZZaRD
11-29-2006, 02:59 PM
Simple enough. Just move the scale codes to the on(release){ area, instead of the on(press){

Then instead of having it grow/shrink +/-2 set the scale based on position, almost like you have above.

When I get back to my computer with Flash installed I will draw something up, unless you have figured it out by then :)