Hi,
As I was trying to understand the “Menu with Slider” code, I have few questions:
a) Code(action script –general) :this._x += (xMove1-this._x)/easeSpeed;
a. I could not find “xMove1” variable anywhere?! Who this variable belongs to?
b. As I read in the flash dictionary “this” refer to slider_mc instance “slider” (that have a script). Would that mean that I could have changed the code to: slider._x += (xMove1-slider._x)/easeSpeed? I would have tried this myself, but remarking out that line of code (see a.), seems to have no effect on the performance, therefore I could not see any difference anyway.
b) Code (slider instance): _x += (xMove-_x)/easeSpeed;
a. Again consulting with the dictionary, I have came to the conclusion that: the line above equals to: x = x + (xb-x)/a, where:
i. Stating Movie case
- x = _x (which in this case is the X coordinate of the slider instance on the stage)
- xb = xMove (which in this case is the variable that holds the X coordinate of the slider instance on the stage or the button we roll over)
- a = easeSpeed (which in this case is a constant holding 5)
a. If my equation assumption is correct then:
i. x = xb i.e. we have not roll over any button
ii. ?x = x + (xb -x)/a ? y=y , we will not move
ii. Roll over button 2 - xb = 182.9 (button 2 x location)
- x= 98.2
- ?x = 98.2 + (182.9-98.2)/5 = 115.14
Now I get confused, what that means? Where is the new coordinate? It is not the xb location of button 2?
Please help
Thanks in advance
Iko Ben-Giat
:h: :h: