Hello,
Is there any way to change component parameter at runtime ? by using code ?
I want to change the Frames parameter of fuse component using code.
also I want to change SegmentAngle of Toroid_segment component using code.
Thanks
Changing Component Parameters At Runtime
Started by swzone, May 05 2012 06:26 AM
8 replies to this topic
#1
Posted 05 May 2012 - 06:26 AM
#3
Posted 05 May 2012 - 05:13 PM
Hi glsmall,
Thanks for your code,
Where can I find detail info about component methodes,events and parameters ?
Regards.
Thanks for your code,
Where can I find detail info about component methodes,events and parameters ?
Regards.
#4
Posted 05 May 2012 - 05:25 PM
If there is no direct way to change component parameter at runtime ,
is it possiple to create component at runtime with intilazied paramters ?
is it possiple to create component at runtime with intilazied paramters ?
#5
Posted 06 May 2012 - 12:19 AM
I guess I don't understand because the example I posted set the Frames parameter at run time. So I guess the simple answer is yes but it may require some scripting. Please explain and give some detail as to what you are trying to achieve.
Also, it would be good if you could post your swi so whomever may work on your request desn't have to create something from scratch.
Also, it would be good if you could post your swi so whomever may work on your request desn't have to create something from scratch.
#6
Posted 06 May 2012 - 12:28 AM
Oh, and as far as learning about components...
- Using Components - This screencast demonstrates how to place and use components.
- Building Components - Building components is easy. Watch this quick screencast to get you going.
- Scripting with Components - This screencast demonstrates how to setup component parameters and script with
#7
Posted 07 May 2012 - 04:49 AM
Thanks for links and tutorials ,
I can access and read the Frames parameter using fuse.parameters.Frames
But changing Frames value does not refelect to internal script ,
Yes your code is working well, but how about other compenet like SegmentAngle of Toroid_segment ? or any other compenet parameters ?
I dont want to go inside the creating script.
Regards
I can access and read the Frames parameter using fuse.parameters.Frames
But changing Frames value does not refelect to internal script ,
Yes your code is working well, but how about other compenet like SegmentAngle of Toroid_segment ? or any other compenet parameters ?
I dont want to go inside the creating script.
Regards
#8
Posted 07 May 2012 - 04:59 AM
If the component doesn't have the functionality you need and you don't want to go in and modify the script then it may not be possible. I tend to think of the included components as a good starting point and if I need some functionality that the component isn't designed for I either modify it or design my own. I don't know what else to say. I guess I don't understand why you would not want to modify the script if it would get it to do what you want.
#9
Posted 07 May 2012 - 06:37 AM
Parameters are basicly just initial values,.. and values can be changed.
The problem here is that some components refer directly to the hardcoded parameters like ie:
instead of storing the parameters value in a var first, like ie:
using the last scenario,
changing value of "myvar" will overwrite the value from the parameters panel.
The problem here is that some components refer directly to the hardcoded parameters like ie:
if (!parameters.Repeat){...
instead of storing the parameters value in a var first, like ie:
myvar = parameters.Repeat;
if (!myvar){...
using the last scenario,
changing value of "myvar" will overwrite the value from the parameters panel.
Viva la variables!!
Percensus.com__Swishresource.com__FlashContentManager.com__OC_Tween__Sign my GuestMap
Percensus.com__Swishresource.com__FlashContentManager.com__OC_Tween__Sign my GuestMap
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users














