Home Technical Talk

Flash Panels/Photoshop

polycounter lvl 15
Offline / Send Message
Lamont polycounter lvl 15
I started making a panel for Photoshop using Flash and ran into a small (large) problem:

Do I HAVE to use Flash Builder to make panels for Photoshop? ExternalInterface will not work (like panels used in Flash)? If I have to use Flash Builder, will I loose all the work I did in Flash CS5? I really hope not.

Any information will be appreciated.

\\

I took a look at the sample files. Some have MXML and some do not, which makes me think that you can just use ExternalInterface.call("").

Replies

  • c.buliarca
    Options
    Offline / Send Message
    c.buliarca polycounter lvl 9
    You don't have to change the application, you just need to integrate the
    CSXSLibrary-2.0-sdk-3.4.swc into your Flash project.
    Here is a link on how to do that:
    http://v2.scriptplayground.com/tutorials/as/Creating-Flash-Panels-for-Photoshop-using-Flash-CS4/

    You can folow as well the Panels Develoepr's Guide:
    http://www.dev.bowdenweb.com/js/adobe/jsx/ps/cs5-win-panel-developers-guide/documentation/pages/index.html
    it is done for Flash Builder but the main part is Action Script so you can integrate that with Flash.

    As for the ExternalInterface.call("").I never got it to work with the Panels, I know it works with a flash inside a ScriptUI, but for the panels I've communicated with it by registering an event and using the ExternalInterface.addCallback("PhotoshopCallback", PhotoshopCallback);,

    Maybe someone that has more experience with the panels has figured a way to find the panel by scripting and send a call to it.
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    I did get CSXSLibrary-2.0-sdk-3.4.swc in the right spot and it compiles with no errors, but still I can not find any tuts that do not use Flash Builder.

    I have gotten ExternalInterface.call("") to work with Flash itself and Unity, Photoshop seems to be another beast.
  • c.buliarca
    Options
    Offline / Send Message
    c.buliarca polycounter lvl 9
    I never really tried to create panels with Flash, but I think that you can adapt the tutorials for Flash Builder to a Flash project, after all apart from the mx application UI's, witch you can change to movie clips or buttons it's the Action Script code that you need to create in both the applications.
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    curious to see how this works for you, i pretty much giveing up on doing this since i dont own flash builder, and opted to just create my ui's separate like ndo2 does.
  • Shrike
    Options
    Offline / Send Message
    Shrike interpolator
    What exactly do you want to do ? theres an amazing app from adobe that lets you create your custom photoshop panels with drag and drop. If you want to create a real plugin then this is no help however. Sorry dont know the name right now
  • c.buliarca
    Options
    Offline / Send Message
    c.buliarca polycounter lvl 9
    Yes you are actually right to use another UI, to be honest I've thought on doing that myself, the panels created for Photoshop are buggy,(at least the ones created with the free sdk version, I don't know about the Creative Suite Extension Builder) and very poor documented, and actually now they will become obsolete with the implementation of the HTML5 Panels in CC. So your panels will just be available for the versions between Cs4 and Cs6.
    I think it's a better and without too much headache solution to just create a independet UI who can stay on top of Photoshop, and communicate with it.
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    I am making a custom tool using Flash for the UI, just that I do not have builder... I see they moved everything to CC... that is not going to help me.
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    c.buliarca wrote: »
    Yes you are actually right to use another UI, to be honest I've thought on doing that myself, the panels created for Photoshop are buggy,(at least the ones created with the free sdk version, I don't know about the Creative Suite Extension Builder) and very poor documented, and actually now they will become obsolete with the implementation of the HTML5 Panels in CC. So your panels will just be available for the versions between Cs4 and Cs6.
    I think it's a better and without too much headache solution to just create a independet UI who can stay on top of Photoshop, and communicate with it.

    What i found has worked great is actually just make some tools as standalone apps. Python can talk to PS very well over the com interface, with all the same stuff available as the native JS api, than after that i can use something like pySide to use qt4.x as my UI.

    Im pretty sure the guys at quxiel do the same, where they got there standalone app in a language that can access the com interface such as c# or python, than in there case they created there own ui toolkit.

    Much more flexible UI wise, now if only i was able to do more with the API there are a lot of PS features you can access at all from code.
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
  • c.buliarca
    Options
    Offline / Send Message
    c.buliarca polycounter lvl 9
    That's a great idea passerby, I know about the com interface for Photoshop, never tried it, I have just a question, can you use Action Manager scripting with it?
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    c.buliarca wrote: »
    That's a great idea passerby, I know about the com interface for Photoshop, never tried it, I have just a question, can you use Action Manager scripting with it?

    are you referring to actions made in PS in the actions pallet? I yes, yes you can, the Application Class has a .DoAction() and .ExecuteAction() methods for this.

    here is the syntax for doing it.
    app.doAction('foo', 'bar')
    

    that would run a action named foo, in a group named bar.
  • kaptainkernals
    Options
    Offline / Send Message
    kaptainkernals polycounter lvl 12
    You shouldn't need to use flashbuilder if you don't have it, you should also be able to use flashdevelop, or flash itself:

    http://www.ps-scripts.com/bb/viewtopic.php?f=26&t=3566

    Seems like it could be the version of the CSXS you're using
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    @ haiddasalami, it is so funny. I remember those tutorials, but I thought it was YOU or Renderhjs who posted them. So I searched all the posts you two made.. :D

    Thanks everyone for the input, I will get to it again this weekend and hopefully have something worth showing.
  • c.buliarca
    Options
    Offline / Send Message
    c.buliarca polycounter lvl 9
    Originally Posted by passerby View Post
    are you referring to actions made in PS in the actions pallet? I yes, yes you can, the Application Class has a .DoAction() and .ExecuteAction() methods for this.

    here is the syntax for doing it.
    Code:
    app.doAction('foo', 'bar')
    that would run a action named foo, in a group named bar.

    Thank you passerby I've actually was thinking about the AM scripting with syntax like this "app.charIDToTypeID( "Mk " )", but I've seen that the .com interface is using the VBScripting an I know I've used this kind of scripting once with VB scripts so it's great that there are no restrictions on what you can do with Python for Photoshop.
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Lamont wrote: »
    @ haiddasalami, it is so funny. I remember those tutorials, but I thought it was YOU or Renderhjs who posted them. So I searched all the posts you two made.. :D

    Thanks everyone for the input, I will get to it again this weekend and hopefully have something worth showing.

    Haha well hopefully you get it working :)
Sign In or Register to comment.