Author Topic: [SOLVED] Best way to [Embed] a boatload of files?  (Read 905 times)

cld

  • Member
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
    • hellocld.com
Hi all, quick question. I'm trying to figure out the best way to embed a bunch of .CSVs containing the tilemap info for a lot of stages (each stage uses 3 CSVs, looking at about twenty stages, so around 60 CSV files). Is there an easy way just run a for loop or something to embed all the files, or do I need to do it manually? Thanks!
« Last Edit: Fri, Dec 30, 2011 by cld »

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Best way to [Embed] a boatload of files?
« Reply #1 on: Fri, Dec 30, 2011 »
I'd just create a class that has nothing but the embed calls in and just get it over with - sit there for 30mins, use "generate embed code" in FlashDevelop, and just embed the lot.

You can't use a for loop as it's a compile-time embed, not run-time. You could possibly stick all CSVs together into one single large text file and delimit them, but it's more hassle than it's worth imho. I'd just bite the bullet and get it done.
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

cld

  • Member
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
    • hellocld.com
Re: Best way to [Embed] a boatload of files?
« Reply #2 on: Fri, Dec 30, 2011 »
Ahh, that's what I was starting to figure. Oh well, no problem. Thanks!

pixelomatic

  • Active Member
  • ***
  • Posts: 131
  • Karma: +0/-0
    • View Profile
Re: [SOLVED] Best way to [Embed] a boatload of files?
« Reply #3 on: Fri, Dec 30, 2011 »
You can write a lua/python/whatever script for generating a resource class file with all the embedded resources you want. (by scanning the files/folder's names)