Copy link to clipboard
Copied
Hola:
Estoy intentando cambiar la posición y tamaño de un Smart Shape a través de Javascript. Consigo hacerlo a través de un botón pero necesitaría conseguirlo en el evento "Al Entrar" de la diapositiva y no funciona.
El código que utilizo es:
var obj = document.getElementById( "SmartShape_105c" );
obj.style.width = (420 ) + "px";
Copy link to clipboard
Copied
obj.style.width = "420px";
Copy link to clipboard
Copied
oops I hit reply by accident when trying to add my reply... cannot hit the return key without submitting...
Copy link to clipboard
Copied
Anyway I find that Captivate is still manipulating smartshapes when it hits the OnEnter action. You need to create an interval and constantly loop through it until Captivate is finished and then your code will execute and "stick".
var myInterval = setInterval(checkSize,100);
function checkSize(){
if(SmartShape_105c.style.width=="420px"){
clearInterval(myInterval);
}else{
SmartShape_105c.style.width="420px";
}
}