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

How can I add popup after the last step of sequence is finished?

  • July 5, 2021
  • 2 replies
  • 2382 views

I want a popup displaying some text and a button after the last step of sequence is finished. 

Thank You in advance.

Best answer by dsgnrClarK

Try adding this function to play button.

$scope.finishedNote = function(){
 if ($scope.view.wdg['model'].currentStep == $scope.view.wdg['model'].steps){
 $scope.$on('stepstarted', function(){
 $scope.$on('stepcompleted', function(){
 $scope.view.wdg['popup'].visible = true;
 $scope.view.wdg['button'].visible = true;
 })
 })
 }
}

 

2 replies

16-Pearl
July 5, 2021

You can hide/ show popup by javascript after last step

$scope.view.wdg['Popup']['visible'] = true;

1-Visitor
July 5, 2021

I have different figures for which I have created sequences. I can choose the figure I want to view its sequence and I have bind the next buttons to play of the model so how can I use this javascript? 

How can the experience know if the it is the last step for that particular figure?  

16-Pearl
July 5, 2021

https://community.ptc.com/t5/Vuforia-Studio/Step-instruction-by-javascript/m-p/649425

u can refer this for clarification 

in this above user has used switch case for displaying the instruction of each step, by using this in last step u can hide/ show the popup window

16-Pearl
July 7, 2021

Try adding this function to play button.

$scope.finishedNote = function(){
 if ($scope.view.wdg['model'].currentStep == $scope.view.wdg['model'].steps){
 $scope.$on('stepstarted', function(){
 $scope.$on('stepcompleted', function(){
 $scope.view.wdg['popup'].visible = true;
 $scope.view.wdg['button'].visible = true;
 })
 })
 }
}