# Photoshop plugin with CSXS swc and Flash

**URL:** https://forum.kirupa.com/t/photoshop-plugin-with-csxs-swc-and-flash/307678
**Category:** flash
**Created:** [April 8, 2010, 6:45am UTC](https://forum.kirupa.com/t/photoshop-plugin-with-csxs-swc-and-flash/307678 "2010-04-08T06:45:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lnsiu](https://avatars.discourse-cdn.com/v4/letter/l/9fc29f/32.png) [@lnsiu](https://forum.kirupa.com/u/lnsiu)
#### Post date: [April 8, 2010, 6:45am UTC](https://forum.kirupa.com/t/photoshop-plugin-with-csxs-swc-and-flash/307678/1 "2010-04-08T06:45:23Z")

</div>

Photoshop plugin with CSXS swc and Flash

I’m trying to do a simple psd plugin with flash - following the tutorial given here, Shortcut Buttons Panel #4:  
**Photoshop Panel Developer’s Guide**  
[http://www.adobe.com/devnet/photoshop/](http://www.adobe.com/devnet/photoshop/)  
Shortcut Buttons Panel #4

My problem is:  
I don’t understand how to rewrite the flex files in the tutorial so they work with the CSXS library, but in flash? In the online documentation they hint that it should be possible in flash. but all documentation is with flex?

the .jsx is working as it should  
I tried to rewrite the flex to this but no love:

(in the stage I have a button calling on callAddDocument…)

```auto
package 
{
	import flash.display.MovieClip;
	import flash.events.*;
	import com.adobe.csxs.core.*;
	
	public class myPlugin extends MovieClip
		{
			public function callAddDocument(event:Event ):void{
				dtf.text = "clicked";
				CSXSInterface.instance.evalScript("addDocument");
			}
			public function callCloseDocument():void{
				CSXSInterface.instance.evalScript("closeDocument");
			}
			
		}
}

```

there is an error thrown:  
ReferenceError: Error #1065: Variable com.adobe.csxs.core::CSXSInterface is not defined.  
at myPlugin/callAddDocument()
