Javascript not working inside advanced action
Hi
I have a script (Thank u Stagprime) that works great when placed directly on the button.
When added into advanced action its not working?
Is this a bug or do I need to tweek the script?
var frameStart;
function playProject() {
if (cpInfoCurrentFrame < 40) {
// If the frame number is lower than 40, play the project as normal
cpCmndGotoFrameAndResume = cpInfoCurrentFrame;
} else {
// If the frame number is 25 or higher, play the project backwards and stop at frame 40
setTimeout(function() {
if (cpInfoCurrentFrame > 40) {
cpCmndGotoFrame = cpInfoCurrentFrame - 1;
playProject();
}
}, 30);
}
}
// Capture the starting frame
var frameStart = cpInfoCurrentFrame;
// Call the function to play the project based on the frame number
playProject();
