Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
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!
Solved! Go to Solution.
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;
}
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;
}