cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Hide Buttons while Step/Sequence is playing

JD_9967989
5-Regular Member

Hide Buttons while Step/Sequence is playing

Hi, I'm looking for a way to hide buttons while a step/sequence is playing. I know that there is some kind of check I could add in Creo Illustrate but unfortunately I don't have the original files so need another way. 

 

I have 10 buttons with each triggering a seperate animation & audio file and I'd like to hide those buttons while the animations are playing. Looking forward to your code!

 

1 ACCEPTED SOLUTION

Accepted Solutions

Add to Model Events

Play Started : playStart()

Play Stopped : playStop()

 

 

Disable Buttons

$scope.playStart = function(){
  $scope.view.wdg['button-1'].disabled = true;
//...
  $scope.view.wdg['button-10'].disabled = true;
}

$scope.playStop = function(){
  $scope.view.wdg['button-1'].disabled = false;
//...
  $scope.view.wdg['button-10'].disabled = false;
}

 

Or change Visibility

$scope.playStart = function(){
  $scope.view.wdg['button-1'].visible = true;
//...
  $scope.view.wdg['button-10'].visible= true;
}

$scope.playStop = function(){
  $scope.view.wdg['button-1'].visible = false;
//...
  $scope.view.wdg['button-10'].visible = false;
}

 

View solution in original post

1 REPLY 1

Add to Model Events

Play Started : playStart()

Play Stopped : playStop()

 

 

Disable Buttons

$scope.playStart = function(){
  $scope.view.wdg['button-1'].disabled = true;
//...
  $scope.view.wdg['button-10'].disabled = true;
}

$scope.playStop = function(){
  $scope.view.wdg['button-1'].disabled = false;
//...
  $scope.view.wdg['button-10'].disabled = false;
}

 

Or change Visibility

$scope.playStart = function(){
  $scope.view.wdg['button-1'].visible = true;
//...
  $scope.view.wdg['button-10'].visible= true;
}

$scope.playStop = function(){
  $scope.view.wdg['button-1'].visible = false;
//...
  $scope.view.wdg['button-10'].visible = false;
}

 

Top Tags