Copy link to clipboard
Copied
Implementation using jsfl,Symbol one shows the fifth frame of layer three
Copy link to clipboard
Copied
layer.frames is read-only so you can't add/remove frames to a layer. you can insert and remove frames from a timeline.
Copy link to clipboard
Copied
The third layer is the symbol,Can you control it to display the fifth frame of a single frame?
Copy link to clipboard
Copied
i'm not sure what you've done, but you can convert a layer to a symbol (specifically a movieclip) and then you can manipulate that (and every other) moveiclip symbol's timeline by using timeline.cutFrames() and timeline.insertFrames()
Copy link to clipboard
Copied
Hi,
If I understand your question correctly, I think that the property you looking for is called firstFrame. If you want to display frame 5 of the internal timeline of a symbol, its instance on the stage should be graphic.
Then, you can select the instance and execute the following code:
fl.getDocumentDOM().selection[0].firstFrame = 4;
This will set the displayed frame of the selected instance at the current keyframe to 5.
Copy link to clipboard
Copied
As an additional advice:
You can open your History Panel, right click on it and choose:
View > Javascript in Panel.
In this way, you'll see all the corresponding JSFL statements when you make changes via the UI.
Also, here is the complete (almost) JSFL documentation.
Copy link to clipboard
Copied
I would like to be able to specify the number of frames in the layer inside the scene control symbol
Copy link to clipboard
Copied
Copy link to clipboard
Copied
so that there is no need to go inside the symbol for control
Copy link to clipboard
Copied
@Vladin M. Mitov Can you take a look at my project file?
Copy link to clipboard
Copied
What if all layers are inside a symbol
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
see your post, https://community.adobe.com/t5/animate-discussions/how-to-choose-a-specific-layer/m-p/13238484#M3574...
or
var layerIndex = fl.getDocumentDOM().getTimeline().findLayerIndex("your_layer_name");
fl.getDocumentDOM().getTimeline().setSelectedLayers(layerIndex[0], true);
/* if you have same named layers, index 0 might not be what you want. */
Copy link to clipboard
Copied
Copy link to clipboard
Copied