Hiding files in FlashLite

FlashLite can only handle SWF files no bigger than 300KB generally. It’s very common that big files are broken into smaller pieces so that FlashLite can handle it, but that makes the folder very messy. The user will get confused not knowing which file to start with. If you put all the files into one folder you’ll also face two problems.

One, the file path is confusing for the developer. Even if all the files are from the same folder, you still need to load them in the path of “/small_parts/file.swf” because the master file is located one level up. You can’t unload the main file or the master file to “correct” the path because FlashLite doesn’t allow so (I’m not sure why).

Two, the user can browse through the sub SWF folder and you may not want that happen.

Some time ago, there were some rumors about how you can hide files with some Symbian packaging function. I didn’t follow up with the thread but I think it’s kinda troublesome. Here’s my way of hiding files.

It’s well known that Flash doesn’t really care about file extensions when loading external files. You can name MP3 files with “.jpg” yet you can play it perfectly with Sound.play(). Same applies to loading external SWF files. Even if a SWF file is renamed into “.dat” or “.anything”, MovieClip.loadMovie() works just the same.

So, to hide files in a FlashLite application/game, simply change your small files’ extension to something that is not “.swf”, and the mobile phone won’t list them.

You can try it out with my example >>here<<.

Leave a Reply

For spam filtering purposes, please copy the number 7385 to the field below: