Skip to main content
Multoman
Inspiring
March 21, 2023
Answered

Is it possible to save vector drawing data of any shape using JSFL?

  • March 21, 2023
  • 2 replies
  • 423 views

For example, I have a vector drawing:

 


Is it possible to write its data (vector points, contour color, line color, contour thickness) in a string or XML format, or any other to simply save data about this figure and build the same after a long time based on previously saved data.

I need to transfer a vector shape to a SWF file for my plugin

This topic has been closed for replies.
Correct answer Charlie Bickett

Hi! It's technically possible, but for anything more than simple shapes I wouldn't go the shape > data route. Instead, export symbols as seperate .SWF/.SWC files, and dynamically load those into your SWF panel, this is how Keyframe Caddy does it.
Here's a page showing how this works using both AS2 & AS3, should be a handy place to start!

2 replies

Charlie Bickett
Charlie BickettCorrect answer
Inspiring
March 22, 2023

Hi! It's technically possible, but for anything more than simple shapes I wouldn't go the shape > data route. Instead, export symbols as seperate .SWF/.SWC files, and dynamically load those into your SWF panel, this is how Keyframe Caddy does it.
Here's a page showing how this works using both AS2 & AS3, should be a handy place to start!

kglad
Community Expert
March 21, 2023

open your history panel and check the steps used to create those shapes.  do you see any red x's?  (ie, that polystar/pentagon is likely problematic.)

Multoman
MultomanAuthor
Inspiring
March 21, 2023

This is similar to what KeyframeCaddy does. It loads drawings into itself. My plugin should do the same. I'm not trying to recreate KeyframeCaddy, I just need to understand how it works

kglad
Community Expert
March 21, 2023

your first post seemed clear enough, but your 2nd, i do not understand.