Today I started to read some external loading images, because as3.0 does not have the loadmovie class, so as3.0 has to change its mind. However, there are a lot of confused things. I have read some stuff about containers before and cannot understand them. Maybe I haven't gotten started yet ......
Now, let's put a program that loads images externally ...... In fact, it is not a good thing, but it is not a good method. I just want to know about flash. The class in the display package is the first place to learn .. After all, too many good things are worth studying .......
Create a loader object that can be used to load files (such as SwF, JPEG, GIF, or PNG files. Callload()
Method to attach a resource to a sub-level of the loader instance. You can then add the loader object to the display list (for example, by using the displayobjectcontainer instance'saddChild()
Method ).
Code:
VaR Loader: loader = new loader (); // create a loader Class Object
Loader. contentloaderinfo. addeventlistener (event. Complete, loading );
Loader. Load (New URLRequest ("1.jpg"); // loads images externally.
Addchild (loader); // Add an object to the display list
Function loading (Event: Event ){
VaR _ content: displayobject = event.tar get. content;
}
There are still some things I don't quite understand. I will solve it slowly tomorrow ..... Who will discuss it together?
Q: Is there a good place to write this code?