mattyh88
Legacy Member
ik heb foto's laten inladen (ale eigenlijk thumbnails van foto's) en als ze erop klikken moet de grote versie tevoorschijn komen.
Dit heb'k al:
Mijn vraag is nu, wat schrijf ik in de functie photoClickHandler?
Kan ik eventueel werken met event.currentTarget?
thx in advance
Dit heb'k al:
Code:
private function showPhotos():void{
for(var i:int = 0; i < arrPhotoShare.length; i++){
var photoShareLoader:Loader = new Loader();
photoShareLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, showPhoto);
photoShareLoader.load(new URLRequest("assets/images/" + arrPhotoShare[i].thumb));
}
}
Code:
private function showPhoto(evt:Event):void{
var photoShareMC:MovieClip = new MovieClip();
photoShareBMP = evt.target.content as Bitmap;
photoShareBMP.smoothing = true;
//photoShareBMP.scaleX = photoShareBMP.scaleY = 0.05;
photoShareBMP.width = 110;
photoShareBMP.height = 73;
photoShareBMP.y = 0;
photoShareBMP.x = xPositiePhotoShare;
xPositiePhotoShare = photoShareBMP.x + photoShareBMP.width + 5;
photoShareMC.addEventListener(MouseEvent.CLICK, photoClickHandler);
photoShareMC.addChild(photoShareBMP);
scrollboxPhotoShare.content.addChild(photoShareMC);
}
Code:
private function photoClickHandler(event:MouseEvent):void{
}
Mijn vraag is nu, wat schrijf ik in de functie photoClickHandler?

Kan ik eventueel werken met event.currentTarget?
thx in advance