Bitmap
Hello guys !
I have an issue with Bitmap object. I have a photo gallery which I read from an XML file. Each photo has a path, id and description.
When I'm adding the picture to the screen I am doing as follows:
var content:Bitmap = Bitmap(loader.content);
var subContainer:MovieClip = new MovieClip();
subContainer.addChild(content);
My problem is that when I click the bitmap added to the container I must know what picture this is by getting an id. This way I know what gallery I am to open. A bitmap object does not have this property to be set (id and path). I have decided to create a class which extends Bitmap and then add these attributes within this class. So instead of using a bitmap I would use something like:
var content:Picture = new Picture(id,path,Bitmap(loader.content));
subContainer.addChild(content);
Where Picture would be that class with path and id attributes. So when I click image I could get by event.target.id the source and hen take a decision of what gallery to open.
However, this is not working. It returns converson type error.
Can someone help me ??
Thanks !!
