actionscript 3 - Embed images using FlashDevelop - AS3 -
I can not find much documentation about embedding images in .as files. In fact, I want to do some theory on this. What have I got from reading this further here:
I placed an image in the Assets folder inside SRC. Then right-click the image and click on "generate embed code", then this code line appears where the cursor was [embed (source = "fluffybunny.png")]
what is now ? How can I specify it for a variable or something ... I did not really get there.
Instead of using the given object. Graphic Aribbots I want to use an image
In addition, should it be an SWF?
There are quite a few resources on it (when you search for "as3 Usage Tag Embed Tag" ) Some of them are really useful:
The most fundamental thing is that you declare a variable of some sort. And you use the [embed]
tag before variable declaration. This is something weird association is like:
[embed (source = "image.jpg")] Public Priority Image Class: bitmap; // You can instantiate and use it later: addChild (new imageClass ()); // creates a new image
It's just a sample - there are so many types and ways to do this - give Adobe Reference a lot, there are plenty of samples.
Comments
Post a Comment