tags:

views:

29

answers:

0

Hi,

Working on importing some XML into my app. Been following the Flex in a week Video tutorial. But have hit an error. The error is : "Type was not found or was not a compile-time constant : Videoinfo."

The line it is complaining about in the debugger is line 36

var video:Videoinfo;

My code is as follows...

videoList.mxml

<fx:Script>
    <![CDATA[
        import mx.collections.ArrayCollection;
        import mx.messaging.Channel;
        import mx.rpc.events.FaultEvent;
        import mx.rpc.events.ResultEvent;

        import spark.skins.spark.DefaultComplexItemRenderer;
        import spark.skins.spark.DefaultItemRenderer;

        import videoObjects.Videoinfo;

        var videos:ArrayCollection = new ArrayCollection();


        // Event Handlers

        protected function videoRetrieval_resultHandler(event:ResultEvent):void {

            var videoData:ArrayCollection = event.result.videos.video;

            var video:Videoinfo;

             for each (var vid:Object in videoData)
             {
                 video = new Video();

                 video.id = vid.id;
                 video.title = vid.title;
                 video.thumbnail = vid.thumbnail;
                 videos.addItem(video);
             }
        }


    ]]>
</fx:Script>

and the imported videoObjects.VideoInfo is as follows :

package videoObjects 
    {
public class Videoinfo
{
    public var id:String;
    public var title:String;
    public var thumbnail:String;
}
    }

How do I clear this error, have I just missed a var out or something similar?

Thanks