Wrox Programmer Forums
|
BOOK: Professional Adobe Flex 2 ISBN: 978-0-470-10267-1
This is the forum to discuss the Wrox book Professional Adobe Flex 2 by Rich Tretola, Simon Barber, Renaun Erickson; ISBN: 9780470102671
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Adobe Flex 2 ISBN: 978-0-470-10267-1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 12th, 2007, 01:42 AM
Registered User
 
Join Date: Jun 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chap5, pg66 - flickr code doesn't work

the code example doesn't work:
has anyone gotten it to work or am i brain dead?
--------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        verticalAlign="middle"
        horizontalAlign="center"
        xmlns="*">

    <mx:Script>
        <![CDATA[

            [Bindable]
            public var flickrURL:String = "http://api.flickr.com/services/rest/?method=flickr.photos.getRecent&api_key=8709b73b4e d150ca12cf33a8d4c0e2a4";
        ]]>
    </mx:Script>

    <mx:HTTPService id="srv" url="{flickrURL}" useProxy="false" />
    <mx:Button label="Get Recent" click="srv.send()" />

    <mx:TileList id="myList" dataProvider="{srv.lastResult.rsp.photos.photo}" width="450" height="300" top="100" left="100">
        <mx:itemRenderer>
            <mx:Component>
                <mx:VBox width="80" height="80">
                    <mx:Image source="http://static.flickr.com/{data.server}/{data.id}_{data.secret}_s.jpg" />
                </mx:VBox>
            </mx:Component>
        </mx:itemRenderer>
    </mx:TileList>

</mx:Application>
 
Old July 15th, 2007, 05:56 AM
Registered User
 
Join Date: Jun 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The code is fine, but you need to enter your own API key in place of the one in the flickrURL variable:
http://api.flickr.com/services/rest/...ecent&api_key=

Rich

 
Old July 22nd, 2007, 10:36 AM
Registered User
 
Join Date: Jul 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I used my own flickr api key and the code worked fine.

You can get a flickr api key here:

http://www.flickr.com/services/api/






Similar Threads
Thread Thread Starter Forum Replies Last Post
Photo Scrolling/ carousel similar as Flickr (ajax/ kumiko Ajax 1 May 12th, 2008 09:30 AM
Chap5 collections clarification taternuggets BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 0 March 26th, 2008 12:22 PM
code clinic - Why wont example asp code work? jardbf Classic ASP Basics 3 April 27th, 2006 06:22 PM
php5 - chap5 iris_see BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 March 30th, 2005 09:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.