bennyxqg / bulk-loader

Automatically exported from code.google.com/p/bulk-loader
0 stars 0 forks source link

Probel whit getting same image 2 times #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Loading one image
2. Using getBitmap("bg"); 2 times

What is the expected output? What do you see instead?
- I want to use one image into 2 place on the same time when I do the 
folowing the first image will not show
var button1:Bitmap = app.DataLoad.getBitmap("button");
var button2:Bitmap = app.DataLoad.getBitmap("button");

What version of the product are you using? On what operating system?
- FlashDevelop 3.0.0 beta 9
- Windows XP Pro
- Flash debug player 10

Please provide any additional information below.

Original issue reported on code.google.com by cliff.od...@gmail.com on 8 Dec 2008 at 1:41

GoogleCodeExporter commented 9 years ago
Hi Cliff

The issue here is that getBitmap gets the loader.content as a Bitmap object.  
This means that it returns a 
reference to a Bitmap object. The second call "steals" the reference, and it so 
the first one becomes null.

This is not a BulkLoader issue at all, but how pointers work in AS3.

The mailing list has a lot of threads on this subject:
http://groups.google.com/group/bulkloader-users/search?group=bulkloader-
users&q=clone&qt_g=Search+this+group

Cheers
Arthur

Original comment by debert on 8 Dec 2008 at 1:46