Hi!\r\rDoes anybody know how to make a Tween, where the parameters of the start and of the endfigure are variables coming from a .txt-file?\r\rFor example: a small cicle becomes a larger circle. both, the diameter of the first circle and the diameter of the second circle are written as variables in a Textfile.\r?\rTHX\r\rHartwig
yes, coz you can resize a clip using it’s _xscale and _yscale properties, so you’ll need a function which gets passed two parameters, and use these in a script loop to get x/yscale from a (1st var) to b (2nd var).\rSorry i’m not explaining in detail, but if you get the idea, try to figure it out, if not, suprabeeeeener, the as-god, shall lend you a helping hand…\rThis is scripted tweening, not done on the stage with keyframes!
That should work : in your first frame, put the frame action stop(), and place an empty clip with the code
onClipEvent (load) {\r\r        loadVariables ("variables.txt", this);\r\r}\r\ronClipEvent (data) {\r\r        _root.variable = x ;\r\r        _root.gotoAndPlay(2);\r\r}
In frame 2, put a stop action, and place the clip you want to tween. Put this script to it :
onClipEvent (load) {\r\r finalsize = _root.variable ;\r\r size = _width;\r\r diff = finalsize-size;\r\r}\r\ronClipEvent (enterFrame) {\r\r if (_width<finalsize) {\r\r _xscale += diff/50;\r\r _yscale += diff/50;\r\r }\r\r}
This only sets the final value of the radius.\rI hope that this script makes sense to you.\r\rpom 0]
Yep, this script makes sense to me. Many thanks! Now I’m trying to solve the problem, that the circle at the beginning should have an radius with a value coming from the TXT.\r\rHartwig
THX! Everything allright!\r\rHartwig
I had not read your last post… Show me please !\rpom 0]
“Show me” what? Please explain!\r\rHartwig
Your animation !\rpom 0]
Sent\r\rHartwig