0 Replies Latest reply on Aug 6, 2007 3:36 AM by san00001

    embeding problem

    san00001
      hw can i embed an image in the newproject node of the following code.pls help me
      [Bindable]
      [Embed(source="images/folder3.png")]
      public var iconSymbol1:Class;
      [Bindable]
      [Embed(source="images/folder2.png")]
      public var iconSymbol2:Class;
      [Bindable]
      [Embed(source="images/drop.png")]
      public var iconSymbol3:Class;
      private var counter:int= new int(1);
      [Bindable]
      private var project:XML =
      <list>
      <newproject title="Project" code="400" >

      </newproject>
      </list>;

      [Bindable]
      private var projectData:XMLListCollection = new XMLListCollection(project.newproject);

      private function treeLabel(item:Object):String
      {
      var node:XML = XML(item);
      if( node.localName() == "newproject" )
      return node.@title;
      else
      return node.@name;
      }


      private function addProject(i:int):void
      {
      var newNode:XML= new XML();
      var prj:XMLList= new XMLList();
      if(i==1)
      {

      newNode = <newproject ><item name="Glossary" icon="iconSymbol2" Spacer="110" /><item name="Actor List" icon="iconSymbol2"/><item name="Reqirement" icon="iconSymbol2"/></newproject>;
      newNode.@title = "New Project "+counter+" [unsaved]";
      newNode.@icon="iconSymbol3"
      counter++;
      prj =project.newproject.(@title == "Project");
      if( prj.length() > 0 )
      {
      prj[0].appendChild(newNode);

      }

      }


      }