Forums

ForumsProgramming Forum

How do I put images in my swf?

Posted Dec 20, '12 at 12:18pm

ricvail

ricvail

13 posts

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?

 

Posted Dec 23, '12 at 10:58am

pirateplatypusgames

pirateplatypusgames

40 posts

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();

 

Posted Dec 26, '12 at 9:26pm

winmaster1

winmaster1

649 posts

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

 
Reply to How do I put images in my swf?

You must be logged in to post a reply!