ForumsProgramming ForumHow do I put images in my swf?

2 6033
ricvail
offline
ricvail
12 posts
Shepherd

I am using FlashDevelop.
I need to "import" images in my project. How do I do that?
I mean, I know how to use the "Loader" class, and as long as the whole project (compiled swf + images) is in one folder on my HDD everything works fine.
But when it comes to uploading the game (on AG, for example), I am only asked for the swf directory, and there's no way to attach the "external resources" I need. (as far as I have seen, at least)
So, should I just embed everything in the swf? But then it would become way heavy, and I see most of the games actually DO have a loading screen, wich would not be there if the resouces were already completely loaded with the swf (I think)
Or should I upload the files I need on my own website and refer to them through an url?
So, can anyone tell me how do I include images (and sounds etc) in my project and use them and how to upload the whole thing on AG?

  • 2 Replies
pirateplatypusgames
offline
pirateplatypusgames
37 posts
Nomad

I embed images in Actionscript like this:


[Embed(source="assets/pic.png&quot]
private var picClass:Class;


Then you can make a new bitmap object using that picture with:

public var picBMP:Bitmap = new picClass();

winmaster1
offline
winmaster1
637 posts
Peasant

I have no idea, but you should ask a know-it-all dude rather than create a whole about it.

Showing 1-2 of 2