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

Is it possible to call multiple functions at same time in same time in js of button ?

SOLVED
Regular Member

Is it possible to call multiple functions at same time in same time in js of button ?

 
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Is it possible to call multiple functions at same time in same time in js of button ?

instead of having 5 models in the 3d canvas, use only one model and use the BUTTON to change the source.

 

 var modelEle1 = angular.element(document.getElementById('model-1'));

 

$scope.A=function(){

$scope.view.wdg['model-1']['src'] = 'app/resources/Uploaded/A.pvz';

$timeout(function() {modelEle1.scope().playAll();},300);
};

 

AT THE EVENT OF BUTTON 1       RECALL                         A();

 

 

 

 


$scope.B=function(){


$scope.view.wdg['model-1']['src'] = 'app/resources/Uploaded/B.pvz';

$timeout(function() {modelEle1.scope().playAll();},300);

};

 

AT THE EVENT OF BUTTON 2       RECALL                         B();

 

etc......

 

I hope to be proved helpful

 

Giuseppe

 

 

 

View solution in original post

4 REPLIES 4

Re: Is it possible to call multiple functions at same time in same time in js of button ?

@M_shah Yes you can call multiple JS function at the same time. e.g. on click of button try updating value of 2 label widget text and it should work.

 

-Durgesh

Re: Is it possible to call multiple functions at same time in same time in js of button ?

Hi @dupatel

thank you for your concern..but i have one doubt mentioned below

If i have 5 model in my 3D canvas and 5 corresponding buttons to each model in 2D canvas....Then how to make experience in such a way that if i can click on particular button than only that model is visible and play it's sequence .?

Re: Is it possible to call multiple functions at same time in same time in js of button ?

instead of having 5 models in the 3d canvas, use only one model and use the BUTTON to change the source.

 

 var modelEle1 = angular.element(document.getElementById('model-1'));

 

$scope.A=function(){

$scope.view.wdg['model-1']['src'] = 'app/resources/Uploaded/A.pvz';

$timeout(function() {modelEle1.scope().playAll();},300);
};

 

AT THE EVENT OF BUTTON 1       RECALL                         A();

 

 

 

 


$scope.B=function(){


$scope.view.wdg['model-1']['src'] = 'app/resources/Uploaded/B.pvz';

$timeout(function() {modelEle1.scope().playAll();},300);

};

 

AT THE EVENT OF BUTTON 2       RECALL                         B();

 

etc......

 

I hope to be proved helpful

 

Giuseppe

 

 

 

View solution in original post

Re: Is it possible to call multiple functions at same time in same time in js of button ?

Thank you soo much @gfiore

Each and every you have been proved very helpful 

-Manthan