actionscript 3 - Duplicating an imported graphic in Flash -


I am loading a graphic through the loader class, now let me see it as both the original image and a thumbnail of that image Need to use in Hi, there is no "duplicate movie clip" or anything like that in AS3

If I add it to the normal view and then only the thumbnail appears on the thumbnail and vice versa.

I found Google and many solutions online for this, but they all just work with images from the library and do not load from a server.

So, how can I do this without loading the image twice?

If talking about just a bitmap image, the simplest thing is to just share the bitmap data Another bitmap example is See below:

  var current bitmap: bitmap; // which you have with the loader var thumbnail: bitmap = new bitmap (existing bitmap. Bitmap data); ThumbNail.witdth = 64; ThumbNail.height = 64; AddChild;  

Since you are using a loader, you can access the bitmap image that you have explicitly loaded from the content property.

  var current bitmap: bitmap = myLoader.content;  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -