can I cut SWF files?

Mr Errorz

Member
I am starting a new project using vector graphics, and it's a first for me.
The artist I am working with prefers to export ALL of a character's animations
in one SWF file. Problem is, when I import it into GM, I can't see the different frames,
and than "cut" the SWF to a few multiple sprites, like a sprite per action.

I wanted to ask, does anyone know of a way to "cut" SWFs into multiple SWFs or multiple sprites, where you can decide which frames will be included?
Maybe it can be done not through GM, but some other app?

Thanks!
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Why not just tell your artist to stop exporting all the character animations together and instead export them on a "per action" basis?
 

Mr Errorz

Member
Why not just tell your artist to stop exporting all the character animations together and instead export them on a "per action" basis?
Because he is being fussy, and claims it's very inconvenient to export in that way from flash..
So I am checking for alternatives.
 
E

Ephemeral

Guest
I am looking for a solution to help me cut one SWF to multiple SWFs
It really isn't your responsibility to do your artist's job for them. It is quite unprofessional to accidentally turn in art assets in an incorrect or incompatible format. Doing it on purpose, just because they don't feel like doing it right, is the kind of thing that can get an artist blacklisted. You might want to explain that to your artist.
 

Dupletor

Member
Excuse me, but what is the problem with putting all the frames for all the animations in a single file? Undertale had it like that with no problem.
In GM you can get sprites from nth position to n+mth position with no problem for an animation, so putting them all together in a single file shouldn't bother that much.
Is the problem related to some property specific to SWF?
 

Mr Errorz

Member
It really isn't your responsibility to do your artist's job for them. It is quite unprofessional to accidentally turn in art assets in an incorrect or incompatible format. Doing it on purpose, just because they don't feel like doing it right, is the kind of thing that can get an artist blacklisted. You might want to explain that to your artist.
Yes, I agree with all the comments about my / his responsibility.
But let's put that a side for a moment, because that is not the question I am asking, ok?

For example,
If I was working w/ a pixel artist who would give me all the frames in a single file,
and would tell me that the idle animation is in frames 0-9, walk animation in frames 10-22, jump animation is in 23-36 and so on,
I would have no problem to create multiple sprites out of that file using GM's sprite editor.
And what I am trying to figure out is whether I can or cannot do that
while working with SWF files in GM instead of bitmap files.
(could be with with an extension, or an external program / editor, if not directly in GM's sprite editor.)

Whether I decide to work with that artist is or not is besides the point.
 

Dupletor

Member
This is why I posted. It is easily done by importing PNG and BMP files to GMS. I just don't know if you can on SWF or why you would not, so the converter someone brought can solve your problem. :p
 
Last edited:

rIKmAN

Member
Yes, I agree with all the comments about my / his responsibility.
But let's put that a side for a moment, because that is not the question I am asking, ok?

For example,
If I was working w/ a pixel artist who would give me all the frames in a single file,
and would tell me that the idle animation is in frames 0-9, walk animation in frames 10-22, jump animation is in 23-36 and so on,
I would have no problem to create multiple sprites out of that file using GM's sprite editor.
And what I am trying to figure out is whether I can or cannot do that
while working with SWF files in GM instead of bitmap files.
(could be with with an extension, or an external program / editor, if not directly in GM's sprite editor.)

Whether I decide to work with that artist is or not is besides the point.
Gamemaker doesn't support this no, so you would looking at preparing the swf files in the correct manner before importing them - the easiest way to do this is of course using Flash / Animate / whatever vector program you use at the point of creation (ie. your artist).

You can find the list of caveats when using SWF files here: http://docs2.yoyogames.com/source/_...information/importing_non_bitmap_sprites.html

As much as you don't want to hear it, you are going to busy enough coding, to have to take on the work of converting files and prepping artwork into a usable state because the artist is too lazy or can't be bothered to do it himself would be a massive red flag for me.

Good luck.
 

Mr Errorz

Member
Gamemaker doesn't support this no, so you would looking at preparing the swf files in the correct manner before importing them - the easiest way to do this is of course using Flash / Animate / whatever vector program you use at the point of creation (ie. your artist).

You can find the list of caveats when using SWF files here: http://docs2.yoyogames.com/source/_...information/importing_non_bitmap_sprites.html

As much as you don't want to hear it, you are going to busy enough coding, to have to take on the work of converting files and prepping artwork into a usable state because the artist is too lazy or can't be bothered to do it himself would be a massive red flag for me.

Good luck.
No dude it's fine,
it's not that I don't want to hear it, it's just that I feel the same way about this specific situation with the artist, so it is a bit redundant to turn this thread into that.
I just wanted to find out if there is a way to do it or not, since it is so easy to do the same thing with bitmap graphics.

So I guess I got my answer.
 
E

Ephemeral

Guest
Well, in theory, vector sprites support and respond to the subimage variable image_index, apparently? I have a hard time imagining how that works, but unless the manual's wrong you could do that and trial-and-error it until you found the right values? I suspect that won't work, though, since with vector sprites there's no reason to assume the image_index matches up with the keyframes in the animation?

Maybe you could test that. Set up an object with your SWF file, not animating, and set up some key press events to manually increment image_index by 1 and 0.25 and 0.1 while drawing that variable to the screen so you can see if the SWF's keyframes reliably fall on integer values. Or if that works at all.
 
J

jb skaggs

Guest
you could use a swf to gif coverter then just load the gif and have all the images separate.
 

Bingdom

Googledom
I think I might be wrong, but I think the way how the artist is doing it is the way that works for a flash game.

I have no experience in flash, but I remember seeing somewhere that a lot of the assets were grouped into one file (E.g. All character animations). It might be just flash compiling all the assets into one file. My memory could be wrong though.

Gamemaker doesn't have a .swf editor or any code to help with editing it (afaik). I think your best bet would be to use a vector editor to split the vector images. This, however, should be the artist's job.

But would it still be vector that way or will it convert to bitmap?
No, it would be converted into a raster image.
 
Last edited:

Mr Errorz

Member
I think I might be wrong, but I think the way how the artist is doing it is the way that works for a flash game.

I have no experience in flash, but I remember seeing somewhere that a lot of the assets were grouped into one file (E.g. All character animations). It might be just flash compiling all the assets into one file. My memory could be wrong though.

Gamemaker doesn't have a .swf editor or any code to help with editing it (afaik). I think your best bet would be to use a vector editor to split the vector images. This, however, should be the artist's job.


No, it would be converted into a raster image.
cool,
can you give me a name of an editor or two?
 

Bingdom

Googledom
Adobe Illustrator
Adobe Animate
Inkscape (I think you might need a plugin to support .swf)

There might be a few more.
 

sylvain_l

Member
my memories of flash are most gone, but even with the .fla in CS5-6 it was a hassle of dumb work to split animation, as I remember if you have your anim in movieclip(not sure name of component :p) well you couldn't export the anim seprately with a single select->export to swf. (depending also how you build your animation into components)... ( even worse, to merge)

If I'm not wrong Animate has replaced flash, hope they made a lot of progress for handling that, else wouldn't say the artist is plain fussy if you didn't bother to ask as a constraint for splitted animations in the first place. (^^ well as you didn't work with .swf before not the thing you would as know :p; and I suspect your artist never worked for a GMS dev so he doesn't have a clue neither of the limitation from your side )

if you want to make the job yourself you should ask for the source file (.fla or whatever your artist used) not the output .swf

only tried static .swf with GMS2 (as I only have corelDRAW at hand that is able to export .swf and it can't make animation) so I don't know how it works for animated one.
But I guess for an animation you should at least get a screenshot of the timeline keyframe for each animation from your artist.
 

Mr Errorz

Member
my memories of flash are most gone, but even with the .fla in CS5-6 it was a hassle of dumb work to split animation, as I remember if you have your anim in movieclip(not sure name of component :p) well you couldn't export the anim seprately with a single select->export to swf. (depending also how you build your animation into components)... ( even worse, to merge)

If I'm not wrong Animate has replaced flash, hope they made a lot of progress for handling that, else wouldn't say the artist is plain fussy if you didn't bother to ask as a constraint for splitted animations in the first place. (^^ well as you didn't work with .swf before not the thing you would as know :p; and I suspect your artist never worked for a GMS dev so he doesn't have a clue neither of the limitation from your side )

if you want to make the job yourself you should ask for the source file (.fla or whatever your artist used) not the output .swf

only tried static .swf with GMS2 (as I only have corelDRAW at hand that is able to export .swf and it can't make animation) so I don't know how it works for animated one.
But I guess for an animation you should at least get a screenshot of the timeline keyframe for each animation from your artist.
Cool, thank you for your answer.
 
Top