Hi Jovanny,
I am trying to add a fresh new clip without cloning or pulling an asset onto the canvas. I want to fill it with assets that I create programmatically.
I’ll try what you suggest.
Thanks.
Try replacing “addClip” with “addChild,” and inside the parenthesis you want to have an object (a clip).
Take a look at this code below, it uses a clone of an object from another frame, and with the “addChild” function it adds that clip to another frame.
^ I found the addChild code by playing around with the editor, Jovanny used it to make these two functions above, and I added in the comments to make them easier to understand. You might only need to read the first function to understand how to add a clip to a frame from code.
In order to create the clip that you want to add, rather than making a clone in another frame and adding it in, you’ll need to define all properties of the clip.
To get an idea of how a clip is defined inside a wick project, I suggest trying this:
Make a new empty wick project
Create a clip that’s similar to what you want
Save the wick file
Change the wick file’s format to zip and look inside