Spinner control

Ferst question
***********************************************************
In scene precent $Box01 and $Camera01 I want to control position of $Box01, by SPINNER
In MAXScript reference is example Spinner UI Control
-----------------------------------------------------------------
utility foo "foo"
(
local myController=bezier_float()
spinner ball_radius "Ball radius" range:[0,1000,1] \
controller:myController
button apply "Apply Radius Controller"
on apply pressed do (
animate off at time 0 $ball.radius=myController.value
$ball.radius.controller=myController )
)
--------------------------------------
I rewrite it for my case
------------------------------------------------
utility foo "foo"
(
local myController=bezier_float()
spinner box_position "box_position" range:[0,1000,1] \
controller:myController
button apply "Apply box_position Controller"
on apply pressed do (
animate off at time 0 $Box01.pos.Controller.x_position=myController.value
$Box01.pos.Controller.x_position=myController
)
)
------------------------------------------
System massege: Unable to convert: Controller:Bezier_Float to type: Float
WHY???

Second question
*****************************************************

I want to change $Box01 position by the SPINNER in coordsys $Camera01
I try to write: in coordsys $Camera01 $Box01.pos.Controller.x_position
But this way unsuccessfully

Please HELP ME

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pixamoon's picture

`

try to change this line:

 
$Box01.pos.Controller.x_position=myController

to:

 
$Box01.pos.Controller.x_position=myController.value 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.