PDA

View Full Version : How can I refresh a variable continousely?


qbart
02-22-2002, 02:21 AM
Hi again!

I tried to find out how to refresh a veriable (that is displayed in my animation) continuesly.
I mean, I have a voltage display (var.: Volt) in my animation with is a result of a function with a parameter x ( f(x) = Volt ).
But my the parameter changes during the whole animation, so should the variable Volt do.

How can I realise this?

thx ahead! (once again)

zoomfreddy
02-22-2002, 04:07 AM
you have to give more clues in this!!

one way ...put in a movieclip:

onclipEvent(enterFrame){
_pathToyourUpdated.volt=_pathToyourSource.volt
}

another...
in your function at the end put:

return volt;

it will return the value of volt to the caller of the function



:cool:

qbart
02-22-2002, 01:14 PM
Hi!

I don't know if it is a complete another way, but your replays helped me to find the right way.

The Volt_display is an symbol of the type Movie Clip, it includes just the Dynamic Text with the code for the algorithm. I realised that I haven't set the path of the input variables (eg.: '_root.water_level._height'), that's why it hasn't work before.

anyway thx :D

zoomfreddy
02-22-2002, 05:47 PM
isn't funny that almost all the time, gets as simple as that?...

your welcome!!!
:cool: