Skip to main content
1-Visitor
July 13, 2021
Solved

Hide Buttons while Step/Sequence is playing

  • July 13, 2021
  • 1 reply
  • 1077 views

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!

 

Best answer by dsgnrClarK

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;
}

 

1 reply

16-Pearl
July 14, 2021

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;
}