i was wondering why u made this code\r\r        vel = (dest-pos)/7 + vel*0.7 ;\r        this._x += vel ;\r        this._x += vel ;\r}\r\rthis is the function of making an elastic movement…, can u explain me the logic behind this ?\r\rand why did u post this._x += vel ; twice??\r\r-- chris\r\rhere’s hoping for your kind response
My mistake ! That code shoud appear only once of course.\rIf you want to understand the idea behind elastic motion (I wanted to make a short tutorial on that…) just take an example. When you pull an elastic, the harder you pull (hence the farther you go), the faster it comes back when you let it go.\r\rSo here vel is the velocity. Imagine that you let the elastic go with dest-position =50. vel = 0 when you do that.\rNext frame : vel = 50/7 = 7 ; dest-pos = 50-7=43\rNext frame : vel = 43/7+47*0.7=9 ; dest-pos=34\r(going faster)\rNext frame and so on and so on until dest-pos=0, with a certain speed. Then dest-pos becomes negative, and the speed decreases.\r\rI don’t think I can explain it better than that !!\r\rpom 0] \r\rAt least that shows that some people are trying to do my tutorial
where would that code go? on wut mc or wut frame?
Everything is written in the tutorial, isn’t it ?? Tell me exactly where it is not clear.\r\rpom 0]
lol I DIDN’T LOOK IN THE TUTORIAL! I was too dam lazy! lol fine, make me bring up that page, and wait for my snail-like network to load the content. Since winter break my T1 network is running slower than a Fat-man on a treadmill.
- So here vel is the velocity. Imagine that you let the elastic go with dest-position =50. vel = 0 when you do that.\rNext frame : vel = 50/7 = 7 ; dest-pos = 50-7=43\rNext frame : vel = 43/7+470.7=9 ; dest-pos=34\r(going faster)\r\rhmmmm… \rlet me translate… to what im getting at it here…\r1st frame : vel = 0 right ? and dest-pos= 50\r2nd frame : vel = 7??? how was dis computed??\rand. dest - pos = 43 ?? how did pos became 7 ???\r\r3rd frame… how did it go faster?\r\rim lost… sorry. i can’t relate to ur explanation. it doesn’t make sense to me…
- Imagine that you let the elastic go with dest-position =50. vel = 0 when you do that.* The moment you let the elastic go, the speed is 0, do you agree with that ?\r* Next frame : vel = 50/7 = 7 ; dest-pos = 50-7=43*\rWhat’s wrong with that ?? vel=vel0.7+(dest-pos)/7. vel=0 then vel=00.7+50/7=50/7=7. That’s the speed. And that’s the amount by which we increase the position. Therefore, the new dest-pos will be dest-(pos+7)=dest-pos-7=50-7=43.\r* Next frame : vel = 43/7+470.7=9 ; dest-pos=34 Same method, except now vel is not null. We get vel=9, we had vel=7. the speed has increased…\r
let me translate… to what im getting at it here…\r1st frame : vel = 0 right ? and dest-pos= 50\r2nd frame : vel = 7??? how was dis computed??\rand. dest - pos = 43 ?? how did pos became 7 ???
\rpos did not become 7. It became pos+7\r\rNot so easy to explain…\r\rpom 0]
HTML Comments are not allowed
No they aren’t.\r\rpom 0]
who edited my post ???\r\rwhat’s wrong with the one i posted… i didn’t use html…
Noone edited your post… It’s just my friend the Ezboard, qui fait n’importe quoi !!!\r\rpom 0]
I would like to ask Ilyaslamasse something concerning the tutorial “Springs: Elasticity, Physics, and Flash MX”.\r\rI downloaded the fla-file (elasticter.fla) and I’ve tried to add one more MovieClip to the stage.\rThis second white ball doesn’t function properly.\r\rWhat can I do to make this one work??
I don’t have MX so i can’t dl the FLA but if you just copied and pasted the same code into the fla then i don’t think it will work. YOu have to change the variables so they are not the same as the variables on the other clip
(I didn’t think of this while downloading… I use Flash 5 instead of MX, so you can dl the fla I think.)\r\rI’ve tried to change different variables inside the code, but it still doesn’t work.\rI’m probably forgetting something…\r
all right, but I don’t have the time right now to look at it, I can do it later tonight, but it won’t be until later later…someone else will probly answer the question by then. Ilyaslamasse is gone I believe he went on vacation, so there should be someone else around here to answer. I’m sorry. Good luck. if no one gives you an answer by later today i will figure it out and post