dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Thumbnails.name property

  1. #1
    Junior Member
    Join Date
    Jun 2009
    Posts
    6

    Post Thumbnails.name property

    When I rollover my thumbnails I want it to load the corresponding version of a bigger picture, which is stored in the name property of each thumbnail. This works but the problem is i also want to, when clicked, goto a URL adress. But now the name property already have the path to the big version so I cant put the URL-path there.

    So how do I make each thumbnail find the "big version" and the url-path?

    Code:
    //thumbnail picture
    thumb_Loader.load(new URLRequest(xmlList[i].attribute("thumb")));
    //thumbnail BIG picture
    thumb_Loader.name=xmlList[i].attribute("source");

  2. #2
    Senior Member
    Join Date
    Aug 2007
    Posts
    291
    You could have a second xmlList (or just add a "targetURL" property to the first one) and then search the xmlList for the "name" property and pull out the corresponding targetURL.

  3. #3
    Junior Member
    Join Date
    Jun 2009
    Posts
    6
    Thanks, I did what you said and created a second xmlList and it works perfectly.

    I just couldn't figure out how to do it but now it seems so simple, hehe .

    Solution:
    Code:
    function click(e:MouseEvent):void {
    
    	for (var j = 0; j<xmlList2.length(); j++) {
    		if (xmlList2[j].attribute("source")==e.target.name) {
    			var targetURL:URLRequest=new URLRequest(xmlList2[j]);
    			navigateToURL(targetURL);
    		}
    	}
    
    }

  4. #4
    Senior Member
    Join Date
    Aug 2007
    Posts
    291
    No problem.

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