Breaking Apart Multiple Clips

It would be cool if there was a feature where you can break apart multiple clips. This could be useful when you have a lot of clips with code and you don’t want them to have code anymore. You can just break apart all the clips at once.

It is possible to break apart a clip using breakApart()

clip.breakApart();

Keep in mind that the scaleX and scaleY of the objects inside of the clip will be set to 1 when you do this (only when the project is run and they’re broken apart, once the project is paused this resets).

You can do this for every clip in the frame by doing this:

project.activeFrame._children.forEach(function(){
try{
this.breakApart();
}catch(err){
// Object is not a clip that could be broken apart
}
})

For more info on breaking clips, check out this thread:

There’s also a way to remove a script from an object without breaking it apart.
This could be done by using removeScript(“script name”)

clip.removeScript("update"); 

If you’d like to learn more about adding, removing, and running scripts, you can become a “script master” by using this tutorial:

1 Like