1 Reply Latest reply on Dec 6, 2007 1:19 PM by NathanThibert

    Embedding Image


      I am very new to Flex. Though I do have an issue already. I am trying to create an icon library which I can draw into my flex app. Though I am unable to bring in the image. I don't know why and I have seen an example done of this but it's still not working for me. The following is what I have done:

      package com
      public class ImageLibrary
      public var imgClass:Class;


      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" >

      import com.ImageLibrary;

      private var imgLib:ImageLibrary;

      <mx:Image source="{imgLib.imgClass}" />

      Ever time I run this I get run-time errors and The it says "Cannot access a property or method of a null object reference." I have no clue what that means. I hope someone out there can help me solve this issue.

      Thank you