Skip to main content
Known Participant
January 5, 2011
Question

PlugIn Panel Size?

  • January 5, 2011
  • 1 reply
  • 893 views

Hello,

I already asked the same question in the Flex SDK Forum and they sent me here. Hopefully someone can help me...

I'm having problems with a panel for photoshop.

If I assign a minWidht and minHeight (for example 200, 300) to my WindowedApplication and import the swf into photoshop the size of my window is somehow downscaled.

Here's an example image and a snipped of my code where I'm trying to get the window to the right size:

<?xml version="1.0" encoding="utf-8"?>

<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                            xmlns:s="library://ns.adobe.com/flex/spark" 
                            xmlns:mx="library://ns.adobe.com/flex/mx"
                            xmlns:local="*"
                            creationComplete="init();"
                            minWidth="200" minHeight="200"
                            left="0" right="0" top="0" bottom="0" 
                            title="Test">


     <fx:Script>
     <![CDATA[     
          private function init():void {
               nativeWindow.height=200;
               nativeWindow.width=200;
               var p:Point = new Point(200, 200);
               nativeWindow.minSize = p;
          }
        ]]>
     </fx:Script>
     .
     .
     .
</s:WindowedApplication>    

Does anyone know why this is happening and how I can fix this?

thx in advance!

This topic has been closed for replies.

1 reply

Bartek_Kropaczewski
Inspiring
January 6, 2011

Hi Joerg

I havn't work with photoshop-flex palettes for a long long time but as far as i remember, app windows definiton looks like:

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="*" usePreloader="false"

creationComplete="Init()" resize="ResizeHandler()" >

<mx:Script>

<![CDATA[

// Init

private function Init():void {

ResizeHandler();

}

                        // Resize Handler

private function ResizeHandler():void {

}

]]>

</mx:Script>

</mx:Application>

Regards

Bartek

Known Participant
January 6, 2011

Hi and thx for your reply!

Nowadays, with Flash Builder, they look like mine, for example mx:WindowedApplication changed to s:WindowedApplication (spark).

But where must be a defined default size for a photoshop panel or something...

Edit:

I figured it out!

You just gotta set the start Height and Width exact to the same min - values!