Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Solved! Go to Solution.
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
@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
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 .?
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