2 Replies Latest reply on Sep 2, 2010 10:07 AM by david naval vendrell

    Problems using ActionDescriptor class on PS Flash panel

    david naval vendrell
      I'm making a PS CS5 panel with Flash Builder 4.


      I want to handle 'New document' event from PS in my panel.
      With   'Adobe Photoshop Panel Developer's Guide' I found all I need to  install  and handle the event..... but I receive a callback for all  classes with  'New' event.


      I known I'ts possible to get the class  of the  descID in the callback parameter using the 'ActionDescriptor'  class, but  I can't compile:
      var desc:ActionDescriptor = new ActionDescriptor();
      I have a 4 errors as:
      1046: Type was not found or was not a compile-time constant: File.     MyPanel    &nb sp;     Unknown      Flex Problem
      I'm using this libs in Flash:


      and this is a part of my code:


      import com.adobe.csawlib.photoshop.Photoshop;
      import com.adobe.csxs.core.CSXSInterface;
      import com.adobe.csxs.events.*;
      import com.adobe.csxs.types.*;
      import com.adobe.photoshop.*;
      public function init():void{
      CSXSInterface.instance.evalScript("PhotoshopRegisterEvent", charToInteger("Mk  ").toString());
      ExternalInterface.addCallback("PhotoshopCallback" + CSXSInterface.getInstance().getExtensionId(), PhotoshopCallback);
      public function PhotoshopCallback(eventID:Number, descID:Number):void{
      if(eventID == charToInteger("Mk  ")){
      var desc:ActionDescriptor = new ActionDescriptor();


      Any idea?