hi
how to image mouse click event and next image preview...
[Bindable]
private var movies:ArrayCollection;
private function serviceHandler(event:ResultEvent):void{
movies = event.result.markers.marker;
}
[Bindable]
private var currentIndex : Number = 0;
private function nextImage(e:MouseEvent):void{
if (currentIndex < movies.length - 1){
currentIndex++;
}
else {currentIndex = 0;
}
}
private function tileList_itemClick(evt:ListEvent):void {
cnv=new VBox();
img = new Image();
altImage=new Image();
txt=new HBox();
lbl=new Label();
lbl1=new Label();
cnv.width=400;
cnv.height=370;
cnv.setStyle("modalTransparencyColor",0x000000);
cnv.setStyle("modalTransparencyDuration",750);
cnv.setStyle("modalTransparency",1);
//cnv.setStyle("verticalGap",17);
cnv.setStyle("horizontalAlign","center");
img.percentWidth =100;
img.percentHeight = 100;
img.maintainAspectRatio= false;
txt.percentWidth=100;
txt.percentHeight=10;
lbl.text=movies.length.toString();
lbl1.text="------------------------------------------------------";
lbl1.setStyle("color","#ffffff");
lbl1.setStyle("fontSize",12);
altImage.source="closelabel.gif";
altImage.addEventListener(MouseEvent.CLICK,image_click);
img.addEventListener(MouseEvent.CLICK,nextImage);
//cnv.setStyle(''
txt.setStyle("horizontalAlign","right");
txt.setStyle("backgroundColor","#ffffff");
cnv.setStyle("verticalAlign","middle");
cnv.setStyle("borderStyle","solid");
cnv.setStyle("cornerRadius",2);
cnv.setStyle("horizontalAlign","center");
cnv.setStyle("borderThickness",3);
cnv.setStyle("borderColor","#ffffff")
cnv.setStyle("backgroundColor","#ffffff")
cnv.addEventListener(Event.COMPLETE, image_complete);
cnv.addEventListener(ResizeEvent.RESIZE,
image_resize);
img.addEventListener(MouseEvent.CLICK,previousImage);
//img.setStyle("cornerRadius",20);
//cnv.addEventListener(MouseEvent.CLICK, image_click);
img.source = evt.itemRenderer.data.resim;
cnv.setStyle("addedEffect", image_addedEffect);
cnv.setStyle("removedEffect", image_removedEffect);
txt.addChild(lbl);
txt.addChild(lbl1);
txt.addChild(altImage);
cnv.addChild(img);
cnv.addChild(txt);
// service.send();
PopUpManager.addPopUp(cnv,Application.application.mapComponent,true);
}
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.