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 October 6th, 2007, 08:58 PM
Registered User
 
Join Date: Sep 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default YouTube code

The following is my YouTube code, its vertbatem from the book. I get this error message:
Severity and Description Path Resource Location Creation Time Id
1046: Type was not found or was not a compile-time constant: ResultEvent. Chapter 6 youtubeexamp.mxml line 17 1191720037113 352

It is referencing:

public function handleResult(event:ResultEvent):void

here it is:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:local="*"
    creationComplete="src.sec()">

    <mx:Script>
        <![CDATA[

            import mx.rpc.ecents.ResultEvent;
            import mx.utils.ArrayUtil;
            import mx.collections.ArrayCollection;
            import mx.utils.ObjectUtil;

            [Bindable]
            public var videos:ArrayCollection;

            public function handleResult(event:ResultEvent):void
            {
                videos = event.result.ut_response.video_list.video;
            }
        ]]>
    </mx:Script>

    <mx:HTTPService id="srv" url="http://www.youtube.com/api2_rest?method=youtube.videos.list_feature&amp;d ev_id=x01oc-ASJRM"
        useProxy="false"
        result="handleResult(event)" />

    <mx:List width="500" height="500" dataProvider="{videos}">
        <mx:itemRenderer>
            <mx:Component>
                <mx:HBox height="105" verticalAlign="middle" verticalScrollPolicy="off" horizontalScrollPolicy="off">
                    <mx:Image source="{data.thumbnail_url}" />
                    <mx:VBox width="100" height="100" verticalScrollPolicy="off" horizontalScrollPolicy="off">
                        <mx:Label text="{data.title}" fontFamily="Arial" fontSize="12" fontWeight="bold" />
                        <mx:Text text="{data.description}" width="100%" />
                    </mx:VBox>
                </mx:HBox>
            </mx:Component>
        </mx:itemRenderer>
    </mx:List>

</mx:Application>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ajax and YouTube video angshujit ASP.NET 2.0 Basics 5 May 28th, 2008 07:39 AM
Urgent:hard disk serial code and vb code ivanlaw Pro VB 6 0 July 25th, 2007 04:05 AM
VB: .Exe file, serial code and activation code ivanlaw Pro VB 6 8 July 6th, 2007 05:44 AM
video from youtube kherrerab BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 October 17th, 2006 06:31 PM
Writing Client Side Script from Code-Behind code sajid_pk Classic ASP Databases 1 January 18th, 2005 12:53 AM





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