2 separate onClick function

2 separate onClick function

Postby MvanDijk » Sun Sep 12, 2021 9:53 pm

Hi,

In the attached skp file are 4 panels which are folding and sliding type.
On 1 click , the first set will fold and the 2nd set follows by sliding.
Now I need the 2nd set to fold as well once I click again.
Tried to create a double click function by semicolon separation, but this results in the 2 foldings just at the same time instead of on each separate click.
Is there any way to solve this.

in short:
1st click : open 1&2 + slide 3+4 (as in attachment)
2nd click : open 3&4 right next to 1&2
3rd click : close 3&4 again
4th click : close 1&2 + slide 3&4
0

MvanDijk 
 

Re: 2 separate onClick function

Postby pcmoor » Sun Sep 12, 2021 11:37 pm

folding example

if you nest the sections into one another, then change the driven attribute value to effect each part. Note axis change on part 3
0

pcmoor 
 

Re: 2 separate onClick function

Postby MvanDijk » Mon Sep 13, 2021 7:53 am

Thank you pcmoor,

Thank you for taking the time to look into this.

The end result is correct, all 4 panels next to each other in a vertical stand.
However the action in between is suppose to be different.

taking your example:
at 1st click mat 1 and 2 should only fold , mat 3 and 4 must follow sliding (no fold).
at 2nd click mat 3 and 4 should fold next to 1 and 2.

So instead of 2 actions at 1 click (actually 4 in your case), I need 1 action at each different click.

Then from there on I can reverse for closing again.
0

MvanDijk 
 

Re: 2 separate onClick function

Postby pcmoor » Sat Sep 18, 2021 11:06 pm

Bed with two folds that have independent onclicks, with a test to check position of the first.
the move is tied to the second fold.

It may be enough or give you some ideas

You could consider a Set function for conditions, required if are placing the animate in the parent
0

pcmoor 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Dynamic Components

Who is online

Users browsing this forum: No registered users and 9 guests