0 Replies Latest reply on Apr 21, 2008 1:40 PM by billbrasky66

    File icons via Remote Desktop

      While working on an app, I seem to have run into a problem. When you get filetype icons via File.icon when using Remote Desktop, the icons always come back blank. Below is a test program. When I run it on my box natively, it returns the icon as expected. When I connect to the box (XP Pro) via Remote Desktop, the icons always come back blank. Can someone run my program and check to see if it's just my box that's the problem?? Just type in a path to a file (e.g. C:\BOOT.INI) and see if it shows the icon both locally and remotely. Thanks!

      <?xml version="1.0" encoding="utf-8"?>
      <mx:WindowedApplication xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
      import mx.core.FlexVersion;
      import mx.core.BitmapAsset;

      public function chooseFile():void {
      var f:File = new File( fileText.text );
      existsText.text = f.exists.toString();
      if( f.icon.bitmaps.length > 0 ) {
      icoImage.load( new BitmapAsset( BitmapData(f.icon.bitmaps[0]).clone() ) );
      blankBox.text = allNull( f.icon.bitmaps[0] ).toString();
      airBox.text = FlexVersion.compatibilityVersionString + " " + Capabilities.version;

      private function allNull( bmp:BitmapData ):Boolean {
      for( var y:int=0; y<bmp.height; y++ ) {
      for( var x:int=0; x<bmp.width; x++ ) {
      if( bmp.getPixel( x, y ) != 0 ) {
      trace( "nonzero pixel at " + x + "," + y );
      return false;

      return true;


      <mx:Button x="262" y="73" label="Button" click="chooseFile()"/>
      <mx:TextInput x="94" y="73" id="fileText"/>
      <mx:TextInput x="167" y="103" id="existsText"/>
      <mx:Text x="94" y="105" text="Exists?"/>
      <mx:Text x="108" y="167" text="Icon"/>
      <mx:Image x="167" y="167" width="70" height="58" id="icoImage"/>
      <mx:Label x="102" y="131" text="isBlank?"/>
      <mx:TextInput x="167" y="129" id="blankBox"/>
      <mx:Label x="102" y="235" text="Air Version"/>
      <mx:TextInput x="167" y="233" id="airBox"/>