import from .fla and/or .swf files?

APDamien

  • Posts: 8
I would like to see a capability to import games from other formats: .swf, .fla, and maybe FLEX.

I'm not sure which should be done (or done first).

Argument for .swf: Stencyl already knows how to create .swf files, so reading them should not be significantly harder(*)

Argument for .fla: If a game designer is going to make the "source" available to others, it's most likely going to be as a .fla file. So importing from .fla would respect the original designer's wishes: he presumably wouldn't hand off a .fla file unless he is willing for the recipient to get into the "guts" of his creation.  Whereas a designer often expects (rightly or wrongly) that a .swf file is to be used by not reverse-engineered.

Personally, I'd like to see all three formats supported.  And also to allow exporting to .fla or FLEX format.

(*) except perhaps for actionscript.  AS is represented in .swf files as a stack-based machine, not dissimilar to RPN or Forth.  So importing SWF files would involve converting back to algebraic notation.

Joe

  • *
  • Posts: 2480
What you're asking for really isn't possible. There's no way to "decompile" a SWF back into a format that StencylWorks can understand. Similarly, FLA is a format specific to the Adobe Flash authoring tool. Flash designers can reuse AS3 code from their FLA or Flex projects, but that's about the extent of the compatibility we have with them.

adriant

  • Posts: 6
But can an swf or swc be imported to be used as an asset?

Merry xmas!

coleislazy

  • *
  • Posts: 2607
But can an swf or swc be imported to be used as an asset?

Merry xmas!

SWC's can be imported right now by clicking "Libraries" in the Game Center. You can import a SWF via AS3 code as you normally would, but there is currently no built-in support for it.

adriant

  • Posts: 6
that means that you have to include the imported swf in your deployment files, right? I would like to create animated backgrounds with some randomized elements like lightning
 bolts and fog, smoke, etc. and at the same time keep the file size low.

Happy 2112!

coleislazy

  • *
  • Posts: 2607
If you embed a SWF in another SWF, you only need the resulting file, not both.

I would not recommend using another SWF for this. With the way Flixel renders the screen, it would not work correctly. It draws all objects to a buffer, then displays the buffer in the screen. An external SWF would not be included in this and would overlay the top, or be hidden underneath.

Syauqi

  • Posts: 10
Hi, i dont know where to post my question but the title seems correct.

I have 2 question need to solved.

1. import sprite into stencyl
I have a project using flash (fla). and now i want to make the sequel in stencyl. normally, since i'am a newbie in stencyl, i would open the movie clip to the desired sprite, block all the object, and then export as png. then i open stencyl, create actor, import the png into it.

the problem is, I have 7 character, each character have 24 animations, and every animation has around 5-7 sprite each. So after I do the math, i got a headache. It's a long way to go. not to mention i want to add new character on the sequel. Probably someone could gave me a clue how to make it easier. I would be thankful.

2. import and export actor on stencyl
when i export an actor on stencyl, it creates a png of all the sprite alltogether. but i dont know how to import it into an actor in other project, or i just become a noob. or probably the export feature only supposed for outside stencyl?

Thank you guys. I appreciate it.

coleislazy

  • *
  • Posts: 2607
I'm not very familiar with Flash Pro, but I don't think there is a way to export an animation in a format compatible with Stencyl. If it can export an animated GIF, that may work, but depending on how it is saved, it may not import correctly.

To import a resource previously exported, you simply drag the image file back into the StencylWorks window. You may need to have the appropriate resource type selected in the Game Center (e.g. actors, scene behaviors, etc).