FLEX3 Tree Image ToolTip - Image Gallery .......
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: FLEX3 Tree Image ToolTip - Image Gallery .......

  1. #1
    Senior Member
    Join Date
    Apr 2008
    Location
    Rotorua / New Zealand
    Posts
    110

    FLEX3 Tree Image ToolTip - Image Gallery .......

    Hi there,
    Well back again and once again with something not so quiet common I believe!

    I'm working on something I would like to incorporate into an Application & this project includes a Tree component which when moving the Cursor over one of the Tree Leafs shows a Thumb-Nail Image, and when the same Tree Node is selected shows a Image in a larger a size etc. I have used this set up many times before yet always only with Thumb-Nail Images and full size Images which where on the computer or Server.

    Now I have modified this all to directly do all the same workings by addressing TH & Img's directly by a Url.

    Everything works fine, but the Thumb-Nail is (as every Image addressed is of a different large size) not resizing to the Thumb-Nail size! Both Thumb-Nail & large Image do now only address the same (Large Image) Url so if needed I could enlarge the Thumb-nail but of course the large Image never fits perfectly just only or mostly only a part of that large & by Url addressed Image!

    So my Question is now:
    How would it be possible to fit ANY of these different size Images into a pre-set say even 200x200 size type or so Thumb-Nail Image ???


    And of course like always any Ideas or help in general would be very much appreciated!

    This would be part of the hard coded Xml list I'm using:
    Code:
     var data:XML =
     <galleries>
    						
     <treeItemOne label="...." isBranch="true">
    					
     <dog label="001 - ...." imgURL="http://www....com/....jpg" thumbURL="http://www....com/....jpg"></dog>
    
    		
     <treeItemTwo label="...." isBranch="true">
    					
     <dog label="001 - ...." imgURL="http://www....com/....jpg" thumbURL="http://www....com/....jpg"></dog>
    
    .... etc.
    Original code AS IS used now with Url.
    Code:
    			private function treeChangedTwo(event:ListEvent):void {
    				
    				var targetTree:Tree = event.target as Tree;
    				var item:XML = XML(targetTree.selectedItem);
    				
    				if ( ! (item.@isBranch == "true")) {
    					
    					var url:String = "" + item.@imgURL
    					imgGalTwo.source = url;
    				}
    			}
    			
    			private function onCreateTreeToolTip(event:ToolTipEvent):void {
    				
    				var imageToolTip:ImageToolTip = new ImageToolTip();	
    				
    				imageToolTip.myImage = event.target.toolTip;
    				imageToolTip.adjustHeightFromBottom = true;
    				imageToolTip.adjustWidthFromRight = false;
    				
    				event.toolTip = imageToolTip;
    			}
    			
    			private function itemRollOver(event:ListEvent):void {
    				
    				var item:XML = event.itemRenderer.data as XML;
    				
    				event.target.toolTip = null;
    				
    				if ( item.@isBranch !=true  ) {
    					
    					var thumbURL:String = item.@thumbURL;
    					
    					if (thumbURL != "") {
    						
    						var itemX:int = event.itemRenderer.x;
    						var itemY:int = event.itemRenderer.y;
    varpoint:Point=event.currentTarget.contentToGlobal(newPoint(itemX,itemY));			    		
    						
    						event.target.toolTip = thumbURL ; 		    			
    ToolTipManager.currentToolTip.move(point.x + event.itemRenderer.width/2, point.y - ToolTipManager.currentToolTip.height);
    					}	    		    		
    				}
    			}

  2. #2
    Senior Member
    Join Date
    Apr 2008
    Location
    Rotorua / New Zealand
    Posts
    110
    Hi again,

    Well, after hours & hours of trying and testing I got it the way it is needed & even much better as well as much more accurate working! It was not quiet just only AS3 but also many changes to the Mxml code - very tedious to do the work, but now it is working!

  3. #3
    Banned
    Join Date
    Jul 2013
    Posts
    22
    Great work! Can you share some specific image gallery processing applications? For instance, image cropping, scaling, and thumbnail creation.

  4. #4
    Senior Member
    Join Date
    Apr 2008
    Location
    Rotorua / New Zealand
    Posts
    110
    Hi there,

    Thanks for your reply yet I'm not quiet sure what you have seen, and about more specifics - your Link is confusing .Net ??? - my Application is in FLEX3.

    The Application itself has everything included i.e Image sizing as the Application is sizing itself as well! Thumbnail is part of the whole and is created of the original large Image (some as large as say 1024x768 or 800x600 as example) which is on the net so this works all automatically thumb & large Image both of the Image on the Internet. There is also one item to look at and that is that the thumbnail is showing horizontal / vertical Images proportional so well balanced.
    You mite find that for FLEX3 it is quiet a good Image quality (checked in 17" & up to 22" screens as well as Laptops) as any Image targeted is for sure of different resolution and is totally out of my hands as I address only Artists original published Images!
    I have written in some enhancement qualities to address the Images I address & these are working perfectly fine as I have test loaded some of these net Images and found that there where quiet low in resolution and somehow rough at times yet their are coming up beautifully in the Application.

    I have published the Application a couple of days ago so have a look and if anybody has some ideas to improve anything please let me know - constructive criticism is always welcome! rgs aktell

    The Link is: http://www.uppercut-spottheartograph...hartistry.com/
    The start up INTRO page select Image Bookmarking and all tabs are using this FLEX3 Thumbnail Tree except the Black & White tab which I still use the component which has at times issues as mentioned on here already (Link below) so I'm still trying to fix that!

    http://board.flashkit.com/board/show...rying-to-solve


    Image to view from Application:
    UpperCut-SpotTheArtography001.jpg
    Last edited by aktell; 10-31-2013 at 01:55 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com