introducing the grapefrukt asset exporter

I’m very excited to publish this, it’s a toolkit I’ve made under the last few months to be able to get graphics and animations made in flash exported to other formats so they can be used on other platforms. The code is pure AS3 so you can run it using either Flash authoring, Flash Builder or Flash Develop. However, it exports Flash assets, so it won’t do you much good without flash authoring.

It’s not perfect yet by any stretch, but I hope it’s useful enough for people to pick up and use. The code is licensed under a simplified BSD license, so you can pretty much do whatever you please with it, if you end up using it I value any and all feedback, send me an email and tell me what you think!

The project is at https://github.com/grapefrukt/grapefrukt-export

Posted in News |

25 Responses to introducing the grapefrukt asset exporter

  1. I’m confused…. first animation is darwin… second is God scores??? Anyway very cool tool, exactly what I’ve been looking for to automate moving some animations into apps I’m making for Android. Thanks for this!

  2. Brillant and cool!

  3. Winning.

  4. Pingback: Episode 4 – Flash Special (plus WebGL and Unity3D) | The Creative Coding Podcast

  5. Hey Martin, thanks for this awesome exporter! This will come in really handy for our new project.
    One thing to note though is that when naming an instance it mustn’t have the same name as the symbol, otherwise you’ll get an error upon exporting.
    Cheers!

  6. Pingback: onebyoneblog » So Long and Thanks for all the Flash on the Beach

  7. Pingback: Flash On The Beach – 2011 | Brondbjerg Design & Development Blog

  8. Awesome toolkit! thanks!!! :)

  9. thanks for your great job.

  10. Pingback: 2d Skeletal animation implementation from flash to Cocos2d

  11. Hey,
    My team and I wrote a complete tutorial on how to use Grapefrukt exporter and achieve skeletal animations in Cocos2d.
    You can see the tutorial here:
    http://www.mechmocha.com/cocos2d-skeletal-animation-part-1/

  12. Hi, thanks for this great tool !
    However, when exporting my swf file, it always crashes.
    Here is the trace:
    Error: Error #1023: Stack overflow occurred.
    at com.grapefrukt.exporter.extractors::ChildFinder$/getClassname()
    at com.grapefrukt.exporter.extractors::ChildFinder$/getName()
    at com.grapefrukt.exporter.extractors::TextureExtractor$/extract()
    at hud_items_on_sheet/frame1()
    at flash.display::MovieClip/gotoAndStop()
    at com.grapefrukt.exporter.extractors::ChildFinder$/findMultiframe()
    at com.grapefrukt.exporter.extractors::AnimationExtractor$/extract()
    at hud_items_on_sheet/frame1()
    at flash.display::MovieClip/gotoAndStop()
    at com.grapefrukt.exporter.extractors::ChildFinder$/findMultiframe()
    at com.grapefrukt.exporter.extractors::AnimationExtractor$/extract()
    at hud_items_on_sheet/frame1()
    at flash.display::MovieClip/gotoAndStop()
    at com.grapefrukt.exporter.extractors::ChildFinder$/findMultiframe()
    at com.grapefrukt.exporter.extractors::AnimationExtractor$/extract()
    at hud_items_on_sheet/frame1()
    at flash.display::MovieClip/gotoAndStop()
    at com.grapefrukt.exporter.extractors::ChildFinder$/findMultiframe()
    at com.grapefrukt.exporter.extractors::AnimationExtractor$/extract()
    at hud_items_on_sheet/frame1()
    at flash.display::MovieClip/gotoAndStop()
    at com.grapefrukt.exporter.extractors::ChildFinder$/findMultiframe()
    at com.grapefrukt.exporter.extractors::AnimationExtractor$/extract()
    at hud_items_on_sheet/frame1()
    at flash.display::MovieClip/gotoAndStop()
    at com.grapefrukt.exporter.extractors::ChildFinder$/findMultiframe()
    at com.grapefrukt.exporter.extractors::AnimationExtractor$/extract()
    at hud_items_on_sheet/frame1()
    at flash.display::MovieClip/gotoAndStop()
    at com.grapefrukt.exporter.extractors::ChildFinder$/findMultiframe()
    at com.grapefrukt.exporter.extractors::AnimationExtractor$/extract()
    at hud_items_on_sheet/frame1()
    at flash.display::MovieClip/gotoAndStop()
    at com.grapefrukt.exporter.extractors::ChildFinder$/findMultiframe()
    at com.grapefrukt.exporter.extractors::AnimationExtractor$/extract()
    at hud_items_on_sheet/frame1()
    at flash.display::MovieClip/gotoAndStop()
    at com.grapefrukt.exporter.extractors::ChildFinder$/findMultiframe()
    at com.grapefrukt.exporter.extractors::AnimationExtractor$/extract()
    at hud_items_on_sheet/frame1()
    at flash.display::MovieClip/gotoAndStop()
    at com.grapefrukt.exporter.extractors::ChildFinder$/findMultiframe()
    at com.grapefrukt.exporter.extractors::AnimationExtractor$/extract()
    at hud_items_on_sheet/frame1()
    at flash.display::MovieClip/gotoAndStop()
    at com.grapefrukt.exporter.extractors::ChildFinder$/findMultiframe()
    at com.grapefrukt.exporter.extractors::AnimationExtractor$/extract()
    at hud_items_on_sheet/frame1()
    at flash.display::MovieClip/gotoAndStop()
    at com.grapefrukt.exporter.extractors::ChildFinder$/findMultiframe()
    at com.grapefrukt.exporter.extractors::AnimationExtractor$/extract()
    at hud_items_on_sheet/frame1()

    Could you help me with that?

    • It’s a bit hard to give a solid analysis without seeing the code and/or fla file, but judging from that stack trace I suspect you have the actual export code inside the hud_items_on_sheet symbol? As you can tell it goes to frame 1 there and then calls the animation extractor, which calls the findMultiFrame function which in turn moves the “playhead” of the symbol to frame 1 which then calls the export code again. Over and over again. Try moving the export code out to the main timeline instead.

  13. Great tool, tested it in flash cs5.5 but does this work in flash cs4?

  14. Yes. I’ve been using it with CS4 a bunch, so that works for sure. It should work with any version of flash authoring that supports flash player 9+ apis.

  15. Hi, i opened a thread here : http://gamedev.stackexchange.com/questions/30750/is-there-a-way-to-export-all-the-images-of-my-tweening-effect-in-flash , but i could not find an answer, i’ve got a problem with CS4 :
    i imported grapfrukt-export.swc, and added the few lines as in the video. I also created a movieclip “test”, and another movieClip “testSheet” as its parent, but when i launch the project, i’ve got an error 1065 : variable testSheet not defined, and Maintimeline not defined. testSheet works fine if i dynamically “addChild” it, so it does exist. Would you how to fix it? Thanks, i’m looking forward to use this great tool!

  16. Pingback: Smooth Movement | Dev Blog

  17. Hi, thanks for this great tool !
    We are trying to use it for game with lots of animations.

    And we miss some things.

    Grapefrukt does not recognize Skew transformation, and when symbol Flip horizontal/vertical.

    is it possible to add this to the grapefrukt? Could you help me with that?

  18. Pingback: Animating With Asset Sheets: An Alternative to Blitting | Gamedevtuts+

  19. Wow thanks so much for sharing, its saved so much time!
    would it be possible to ask for an example that has the commands to export the text?
    I apologise, ive tried looking through the documentation and have been looking on all forums for any kind of hint (apparently im the only person that would love to get this to work. but then there are so many other cool features that they probably havent had time to play with the text !

    (its possible i’m doing things incorrectly and looking in the wrong places too – since im pretty new to flash/programming)
    sorry !! i couldn’t understand how to do it , the rest works so well, fantastic job!

    my next challenge it to integrate with cocos2d any hints regarding how to link animations to coordinates would be very appreciated

    also this helped me get it up and running, maybe it will help another newbie too :)
    Reply #48
    http://bitcollective.ca/forums/index.php?topic=61.45

    once again many thanks!
    N

  20. Hey i wanted to know how does this tool handles masks? does the mask needs to be a movie clip names mask too?

  21. It has rudimentary support for masks, any instance with named with “mask” in the beginning of its name will be flagged as one. That means it will be flagged as such in the exported XML, the actual masking however is up to your engine to deal with.

    “Static” masks, ie. within objects exported as textures, are fully supported.

  22. i couldn’t use it , after adding
    var export:SimpleExport = new SimpleExport(this);
    it gives me an error
    ReferenceError: Error #1065: Variable leeksheet is not defined.

    ReferenceError: Error #1065: Variable MainTimeline is not defined.

    flash cs4

  23. Pingback: The Beast is Morphing (Massive Update) « Juicy Beast Studio

  24. Pingback: THE BEAST IS MORPHING: MASSIVE UPDATE |

Comments are closed.