The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 5 of 5

Thread: Question on compiling swf file on FlashDevelop

  1. #1

    Question on compiling swf file on FlashDevelop

    I am new to flashdevelop and I noticed there are several users so I thought I should ask...

    If you think I will have better luck elsewhere (like flashdvelop forum) let me know.

    Anyway, I created a game with mp3s and png files in 'resource/' sub directory.

    After compiling it and running the swf, everything is honkydory... but if I move the swf file, I realize flash fails to load.

    I am guessing the swf file does not embed the necessary resources: thus the reason for such a small size.

    Now, is there any way to embed all these into a single large swf file for ease of distribution?

    or do I need to maintain this on a server with proper path?


  2. #2
    Okay... so I figured out how to embed the asset. I was so used to Flex builder that took care of everything that I didn't realize Flashdevelop doesn't do the same.

    Using the embed tag, I can already see the increase in the file size though it seems everyone here already knew.

    My next question is how I can tie this with TextureManager code from Ssirian (sp?)...

    Such code loads based on the url. In my code, I have a relative path...

    so I put a code

    [Embed(source = '../resource/graphic/confirm.mp3')]
    public static const GRAPHIC_CONFIRM:Class;

    Then can I simply do the following?

    public var tm:TextureManager = new TextureManager("../resource/graphics/");


    assuming the Embed tag already included the asset with relative path...

    Or do I need to declare the variable?


  3. #3
    Alright.. so figured out the difference between embed and using Ssirian's TextureManager.

    New question (sorry, it never ends) is... why use TextureManager?

    I like the idea of runtime loading but if you are distributing it... wouldn't you rather have the whole thing in one single, albeit large, swf file?

    Or is there some way to distribute while still using TextureManager that will not show resource files (png, mp3) to the user?


  4. #4
    My texture manager was made specifically for people who didn't want to embed the textures in the swf. When you say distributing do you mean sending people an swf? I use my web server so I just give people a link to it.

    So yes there is a way to distribute it to the user. Put it on a webserver and give them a link to it. However you are right that anyone can type in the URL of the asset and access it and that can be stopped with methods like accessing the files from a PHP page which XOR's the data then have flash unXOR it. That stops most people since it requires someone to decompile the swf then set up a program to decrypt the downloaded asset. I digress. But yeah I wouldn't use my texture manager for something like already embedded files. It won't even work.

  5. #5
    Thanks for the clarification. It makes perfect sense now.

    I think I will go see if there are any ways to add in security settings or, as you said, some masking of resource reference url from the code...

    or.. use private/public key concept... hmm.. haha.. probably going overboard.

    I think I will work on my game for now and worry about embed later since I know how to do it now.

    If anyone else already gone through this phase, you are more than welcome to enlighten me with your methods.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012