Problems using ActionDescriptor class on PS Flash panel

General Discussion of Scripting for Flex, Flash & CS SDK

Moderators: Tom, Kukurykus

dnaval795

Problems using ActionDescriptor class on PS Flash panel

Post by dnaval795 »

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 Unknown Flex Problem
I'm using this libs in Flash:
csawlib.swc
apedelta.swc
CSXSLibrary-2.0-sdk-3.4.swc
csaw_photoshop.swc

and this is a part of my code:

<mx:Script>
<![CDATA[
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("PhotoshopPersistent");
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();
}
}
.......
]]>
</mx:Script>

Any idea?

T.I.A.
Jeremy Knudsen

Problems using ActionDescriptor class on PS Flash panel

Post by Jeremy Knudsen »

I'm getting the same error. Everything was running smoothly at one point. Not sure what happened. Here are the errors I get...not sure how to remedy yet:

C:\Users\jknudsen\Design\Prototyping\Redlines\src\csaw_photoshop.swc(com/adobe/photoshop/ActionDescriptor)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/ActionDescriptor)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Application)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Application)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Application)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Application)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Application)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Application)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/ActionList)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/ActionList)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Notifiers)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/MeasurementLog)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Preferences)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Preferences)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Preferences)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Preferences)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/BatchOptions)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/BatchOptions)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/BatchOptions)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/BatchOptions)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Notifier)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Document)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Document)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Document)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Document)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/Document)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/ArtLayer)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/ArtLayer)
Error: Type was not found or was not a compile-time constant: File.
C:\...\src\csaw_photoshop.swc(com/adobe/photoshop/ArtLayer)
Error: Type was not found or was not a compile-time constant: File.