Initial value or custom variable as animation state?

dynamiccomponents

#1

Hello,

I’ve created a dynamic component with sliding partition doors where position X and size LenX of each partition door is a formula based on the component’s overall size and user-defined number of doors.

Now, I’d like to animate the component so all the doors slide to position X=0 and back to where they were initially when calculated. Is this possible?

Door length:
length =LenX/(doors+1) //"doors" is user-defined

Door position (child):
X =COPY*parent!length

Onclick (parent):
ANIMATE("child!X",0,INITIALVALUE)

Thanks for any ideas :slight_smile:


#2

When you say “doors” is user defined,… how?
Do they choose from a list ? (They should)
… and what are the allowable choices ?


#3

slide copy door.skp (36.9 KB)


#4

Yes, user chooses from a list - 2, 3 or 4 panels.


#5

Thanks @pcmoor!