Dynamic resizing script UI

Hello

I wrote a dialog where the user can choose beetwen one of two global options, or several standard options. When one of the 2 global options are selected, the other standard options are hidden.

When the standard options panel is hidden, the rest in the same dialog box size and it is simply an empty space. I tried dynamicaly resize the dialog box with the line "myWindow.layout.layout (true)"; which works, but then I lose orientation and alignment of the sub-panels values.

I would like to know if there is a way with the layout() method does not update the whole hierarchy.

Here is my code, you can consider and reuse it for yourself.

To check the negative effects you can uncomment the 2 lines: / / myWindow.layout.layout (true);

But then you have to replace the battery 'guidance values' by 'a line', and the alignment values "fill" with "left".

Thank you

Roman

myWindow = new window ('dialogue', "Screen Option");

var myPanelGlobal = myWindow.add ("panel", undefined, "Global Options", {borderStyle: "slurs"});

myPanelGlobal.orientation = "column";

myPanelGlobal.alignment = 'top';

var myGroupABC = myPanelGlobal.add ("panel");

myGroupABC.preferredSize = [260, -1];

myGroupABC.orientation = "stack";

myGroupABC.alignement = "fill".

var myGroup1ABC = myGroupABC.add ('group');

myGroup1ABC.orientation = "row";

myGroup1ABC.alignment = 'left ';

myGroup1ABC.add ("staticText", undefined, "Project 1");

var myGroup2ABC = myGroupABC.add ('group');

myGroup2ABC.orientation = "row";

myGroup2ABC.alignment = 'right ';

var checkboxABC = myGroup2ABC.add ("checkbox");

checkboxABC.value = false;

var myGroupXYZ = myPanelGlobal.add ("panel");

myGroupXYZ.preferredSize = [260, -1];

myGroupXYZ.orientation = "stack";

myGroupXYZ.alignement = "fill".

var myGroup1XYZ = myGroupXYZ.add ('group');

myGroup1XYZ.orientation = "row";

myGroup1XYZ.alignment = 'left ';

myGroup1XYZ.add ("staticText", undefined, "Project 2");

var myGroup2XYZ = myGroupXYZ.add ('group');

myGroup2XYZ.orientation = "row";

myGroup2XYZ.alignment = 'right ';

var checkboxXYZ = myGroup2XYZ.add ("checkbox");

checkboxXYZ.value = false;

var myPanelStandard = myWindow.add ("panel", undefined, "of the Standard options", {borderStyle: "slurs"});

myPanelStandard.orientation = "column";

myPanelStandard.alignment = 'top';

var myGroupA = myPanelStandard.add ("panel");

myGroupA.preferredSize = [260, -1];

myGroupA.orientation = "column";

myGroupA.alignment = 'top';

var mySubgroupA1 = myGroupA.add ('group');

mySubgroupA1.orientation = "row";

mySubgroupA1.alignment = 'left ';

mySubgroupA1.add ("staticText", undefined, "Option 1");

var mySubgroupA2 = myGroupA.add ('group');

mySubgroupA2.orientation = "stack";

mySubgroupA2.alignment = "fill".

var radioA1 = mySubgroupA2.add ("radiobutton", undefined, 'Yes');

radioA1.alignment = 'left ';

var radioA2 = mySubgroupA2.add ("radiobutton", undefined, 'No');

radioA2.alignment = 'right ';

radioA1.value = true;

var myGroupB = myPanelStandard.add ("panel");

myGroupB.preferredSize = [260, -1];

myGroupB.orientation = "column";

myGroupB.alignment = 'top';

var mySubgroupB1 = myGroupB.add ('group');

mySubgroupB1.orientation = "row";

mySubgroupB1.alignment = 'left ';

mySubgroupB1.add ("staticText", undefined, "Option 2");

var mySubgroupB2 = myGroupB.add ('group');

mySubgroupB2.orientation = "stack";

mySubgroupB2.alignment = "fill".

var radioB1 = mySubgroupB2.add ("radiobutton", undefined, 'Yes');

radioB1.alignment = 'left ';

var radioB2 = mySubgroupB2.add ("radiobutton", undefined, 'No');

radioB2.alignment = 'right ';

radioB1.value = true;

var myGroupC = myPanelStandard.add ("panel");

myGroupC.preferredSize = [260, -1];

myGroupC.orientation = "column";

myGroupC.alignment = 'top';

var mySubgroupC1 = myGroupC.add ('group');

mySubgroupC1.orientation = "row";

mySubgroupC1.alignment = 'left ';

mySubgroupC1.add ("staticText", undefined, "Options 3");

var mySubgroupC2 = myGroupC.add ('group');

mySubgroupC2.orientation = "stack";

mySubgroupC2.alignment = "fill".

var radioC1 = mySubgroupC2.add ("radiobutton", undefined, 'Yes');

radioC1.alignment = 'left ';

var radioC2 = mySubgroupC2.add ("radiobutton", undefined, 'No');

radioC2.alignment = 'right ';

radioC1.value = true;

var myButtonGroup = myWindow.add ('group');

myButtonGroup.orientation = "row";

myButtonGroup.alignment = 'top';

myButtonGroup.add ('button', undefined, 'OK');

myButtonGroup.add ('button', undefined, 'Cancel');

checkboxABC.onClick = function()

{

If (checkboxABC.value == true) {}

myGroupXYZ.visible = false;

checkboxXYZ.value = false;

myPanelStandard.visible = false;

} else {}

myGroupXYZ.visible = true;

myPanelStandard.visible = true;

}

If (myPanelStandard.visible == true) {}

myPanelStandard.maximumSize = [10000,10000];

} else {}

myPanelStandard.maximumSize = [0,0];

}

myWindow.layout.layout (true);

};

checkboxXYZ.onClick = function()

{

If (checkboxXYZ.value == true) {}

myGroupABC.visible = false;

checkboxABC.value = false;

myPanelStandard.visible = false;

} else {}

myGroupABC.visible = true;

myPanelStandard.visible = true;

}

If (myPanelStandard.visible == true) {}

myPanelStandard.maximumSize = [10000,10000];

} else {}

myPanelStandard.maximumSize = [0,0];

}

myWindow.layout.layout (true);

};

var myResultOptions = myWindow.show ();

Hi Roman,.

The problem is that preferredSize is a "volatile" ScriptUI widgets property, she lost on the first layout. So I think you have to play with minimumSize instead. In addition, the "stack" orientation can create problems of presentation the. Luckily, it does not seem that you really need in your user interface.

This is an approach that could help you:

var PN_SETTINGS = {borderStyle: "sunken"},
    PN_MINSIZE = [260,0],
    PN_SPACING = 12,
    PN_GLOB_NB = 3,
    PN_STD_NB = 4,
    NULL_SIZE = [0,0],
    MAX_SIZE = [1000,1000];

var u,
    w = new Window('dialog', "Option screen"),
    onCheckboxClick = function()
        {
        var v = this.value,
            idx = this.parent.parent.properties.idx,
            i = pGlobal.children.length,
            g;

        while( i-- )
            {
            g = pGlobal.children[i];

            g.visible = v ? (idx===g.properties.idx) : true;
            g.maximumSize = g.visible ? MAX_SIZE : NULL_SIZE;

            pStandard.visible = !v;
            pStandard.maximumSize = v ? NULL_SIZE : MAX_SIZE;
            }
        this.window.layout.layout(1);
        },
    pGlobal = (function(p,i)
        {
        with( p )
            {
            orientation = 'column';
            alignment = 'top';
            spacing = 0; // IMPORTANT
            }

        for( i=1 ; i <= PN_GLOB_NB ; ++i )
        with( p.add('group',u,{idx:i}).add('panel') )
            {
            // Emulate vertical spacing
            parent.margins = [0,PN_SPACING,0,0];
            minimumSize = PN_MINSIZE;
            orientation = 'row';
            alignment = ['fill','top'];
            with( add('statictext') )
                {
                text = "Project "+i;
                alignment = ['left','center'];
                }
            with( add('checkbox') )
                {
                value = false;
                alignment = ['right','center'];
                }
            children[1].onClick = onCheckboxClick;
            }
        return p;
        })(w.add('panel', u, "Global", PN_SETTINGS)),
    pStandard = (function(p,i)
        {
        with( p )
            {
            orientation = 'column';
            alignment = 'top';
            spacing = PN_SPACING;
            }

        for( i=1 ; i <= PN_STD_NB ; ++i )
        with( p.add('panel') )
            {
            minimumSize = PN_MINSIZE;
            orientation = 'column';
            alignment = ['fill','top'];
            with( add('group') )
                {
                orientation = 'row';
                alignment = ['fill','top'];
                alignChildren = ['right', 'center'];

                add('statictext', u, "Option "+i).alignment = ['left','center'];
                add('radiobutton', u, "Yes").value = true;
                add('radiobutton', u, "No").value = false;
                }
            }
        return p;
        })(w.add('panel', u, "Standard", PN_SETTINGS)),
    gButtons = (function(g)
        {
        with( g )
            {
            orientation = 'row';
            alignment = 'top';
            add('button', u, "OK");
            add('button', u, "Cancel");
            }
        })(w.add('group'));

w.show();

@+

Marc

Tags: InDesign

Similar Questions

  • dynamic resizing of columns too wide (javascript, CS5)

    Hey. I'm just starting to writing scripts for InDesign (and realize how I've been losing in recent years too much time). So far I managed to solve the minor issues myself, but this one I don't know enough to make round. I appreciate that what is needed for the solution is probably a pretty great piece of code, so I'm grateful for any advice you can give, just did he hint or nudge in the right direction.

    What I have is this little piece of code that comes if applies a style of cell for all tables in the selected block of text:

    var myTextFrame = app.selection [0];

    var myTables = myTextFrame.parentStory.tables.everyItem ();
    var myTableCells = myTextFrame.parentStory.tables.everyItem ().cells.everyItem ();

    myTableCells.appliedCellStyle = "NameOfCellStyle";

    What I have to do here is looking for one of the tables of myTables which:

    (1) are wider than myTextFrame (i.e., wider than the text block, they are in)

    (2) have exactly two columns

    (3) have a first column wider than the second column

    In these tables, the first column should be resized so that the table fits exactly inside myTextFrame.

    The best solution would be a dynamic resizing is not dependent on the specific numbers, because the size of myTextFrame may vary, but right now I'll settle for what it is, even if it means the creation of several scripts for text different widths of chassis.

    So there. After too many attempts failed, resulting in large part of me having very little evidence of what I'm doing, I'm about to give up. Any help or advice is greatly appreciated.

    Thank you

    Let's go top a step at a time.

    for (s=0; s
    

    If your tables have lines on the outer edge, zoom in! The right side of the resized table is inside the text frame, but his race is on the outside. If this is a problem, you probably have to subtract the thickness of the line of the available width as well. (I don't usually have this problem, because most of the time, my paintings is outline.)

  • Dynamically resize images on a webApp list page

    Hello world

    I used the following code to dynamically resize images for a webApp event list page:

    < img src = "{tag_image list_value}? Action = thumbnail & width = 384 & height = 253 & algorithm proportional ="/ >

    It works perfectly but when I click on the image, it is not a link to the event details page.

    Adding dynamic code I got the following only:

    list {tag_image}

    This made the image and when you click on it it went to the detail page, then is it possible to revise the dynamic code so that it renders an image which, when clicked, navigates to the page of detail?

    Would be very grateful for any advice.

    Thanks in advance.

    You encapsulate your image in an html anchor where the attribute href has the tag url for this layout in it.

  • Dynamic resize TextArea without scrollbars

    There is an example of a text box dynamic resizing without scrollbars on the link below, but it does not work with htmlText, only normal text.

    Any suggestions on what are the changes to the code to make it work with htmlText?

    It's link with the example:

    http://www.Adobe.com/cfusion/CommunityEngine/index.cfm?event=ShowDetails & postId = 13628 & Prod = 2 uctId

    Thank you.

    Maybe this:
    package components {}
    import flash.events.Event;
    Import mx.controls.TextArea;
     
    SerializableAttribute public class DynamicTextArea extends TextArea {}
    public void DynamicTextArea() {}
    Super();
    super.horizontalScrollPolicy = 'off ';
    super.verticalScrollPolicy = 'off ';
    this.addEventListener (Event.CHANGE, adjustHeightHandler);
    }
    private void adjustHeightHandler(event:Event):void {}
    trace ("textField.getLineMetrics (0) .height:" + textField.getLineMetrics (0) .height);
    If (height<= textfield.textheight="" +="">
    height = textField.textHeight;
    validateNow();
    }
    }
    override public function set htmlText(val:String):void {}
    textField.text = val;
    validateNow();
    height = textField.textHeight;
    validateNow();
    }
    override public function set height(value:Number):void {}
    if(TextField == null) {}
    If (height<=>
    Super.Height = value;
    }
    } else {}
    var currentHeight:uint = textField.textHeight + textField.getLineMetrics (0) .height;
    If (currentHeight<=>
    If (textField.textHeight! = textField.getLineMetrics (0) .height) {}
    Super.Height = currentHeight;
    }
    } else {}
    Super.Height = super.maxHeight;
    }
    }
    }
    override public function get htmlText (): String {}
    return textField.text;
    }
    override public function set maxHeight(value:Number):void {}
    super.maxHeight = value;
    }
    }
    }
  • Dynamic resizing of the cluster

    Is is possible to resize the cluster with buttons dynamically? I mean during run mode? If it's possible could you give me some suggestions?

    Kind regards

    Izabela

    Oh... Sorry... you may need to enable scripting.

    See here: http://decibel.ni.com/content/docs/DOC-4973

  • support of dynamic resizing stamp

    We use dynamic stamps on the forms within our Organization.  However, how do you define preferences on stamps - size, color, etc.

    We do not want to resize and change color whenever they are used.

    Any help will be greatly appreciated

    Thank you

    The color parameter won't do anything because a stamp is an image.  You can set the opacity by right-clicking on the stamp, select 'Properties', defining the opacity and check "make properties default '.  If want a uniform initial size, you will need to re-create the stamp to the desired size.

  • Have a layer resizing script, but need to work when the layer is great than 550px

    Hello

    Fortunately, I found a script that does a layer resizing just what he needed. Only thing is, I want the script to deploy only if the current layer is more than 550px - existing code for the script is less to:

    (function (){
        var startRulerUnits = app.preferences.rulerUnits;  
        app.preferences.rulerUnits = Units.PIXELS;
        var bounds = activeDocument.activeLayer.bounds;  
        var width = bounds[2].value - bounds[0].value;
        var newSize = (100 / width) * 550;  
        activeDocument.activeLayer.resize(newSize, newSize, AnchorPosition.BOTTOMLEFT);
        app.preferences.rulerUnits = startRulerUnits;  
    })();
    

    If anyone can explain how I can use an If works, would be much appreciated!

    Thank you very much in anticipation.

    (function () {}
        var startRulerUnits = app.preferences.rulerUnits;
        app.preferences.rulerUnits = Units.PIXELS;
        var limit = activeDocument.activeLayer.bounds;
        var width = limits [2] .value - limits [0] .value;
        If {(width > 550)
        newSize = var (100 / width) * 550;
        activeDocument.activeLayer.resize (newSize, newSize, AnchorPosition.BOTTOMLEFT);
        }
        app.preferences.rulerUnits = startRulerUnits;
    })();
  • Dynamically load Scripts

    I have not found a way to dynamically load JS or JSX scripts. I understand that the principal can not be loaded dynamically, but I would think that other scripts, because they are not compiled, should be loaded dynamically. If it helps, I'm debugging using Sublime text mode.
    Is there a way?

    Thank you
    Alex

    http://www.davidebarranca.com/2014/01/HTML-panels-tips-2-including-multiple-jsx/

  • Dynamically resize the Panel

    Hello

    How can I resize the extension Panel?

    the CSInterface.prototype.getWindowGeometry method does not exist :-(

    Thank you :-)

    Hello

    Cannot be done yet, please see: Re: resize a panel of the script extension

    Davide Barranca

    ---

    www.davidebarranca.com

    www.cs-extensions.com

  • random resizing script and styling

    I try to reproduce children playing "Spot on" for students in my class. http://www.blueorangegames.com/SpotIt/ I would use it for things such as vocabulary. There will be objects 440 or 220 pairs of words.

    I would like to automate as much as possible with the fusion of data and scripts. I need 3 scripts:

    1. to resize the block of text or images.

    2. to turn random frames

    3 randomly apply paragraph styles or object.

    I found this to turn. http://www.Adobe.com/cfusion/exchange/index.cfm?event=extensionDetail & extid = 1234019 I guess that it will work on CS5.

    Now I just need than the other 2. Any help will be appreciated.

    Thank you

    Eliezer

    Hello Eliezer,

    Here is the script to the point 3.

    var  doc = app.activeDocument, ol, pl, tfl,
            myObjects = doc.splineItems.everyItem().getElements();
    var   myParas = doc.stories.everyItem().paragraphs.everyItem().getElements();
    var   myTexFrames = doc.textFrames.everyItem().getElements(); // I don't know if you want this
    ol = myObjects.length;
    pl = myParas.length;
    tfl = myTexFrames.length;
    while (ol--) myObjects[ol].appliedObjectStyle = doc.objectStyles.anyItem ();
    while (pl--) myParas[pl].appliedParagraphStyle = doc.paragraphStyles.anyItem ();
    while (tfl--) myTexFrames[tfl].appliedObjectStyle = doc.objectStyles.anyItem ();
    

    If you want the script to the point 1) I'll do it for $10 (paypal) if some want else of do it for 10 points if it is not then be in touch if it's worth.

    Trevor cordially

  • Simple graphic block resizing Script

    Hi, I have an ex-Pagemaker publication I look in Indesign, and I need to resize and move the three images on each page.  Rather than make the 125 pages manually, I'm sure it's easy to script, but vbs and scripts javascript is completely new to me (I'm on Windows) and the samples, I have watched all look too complex for what I want.

    The most basic level, if someone could give me an example script showing how to define new coordinates Y, W and H (for example 27, 107 and 107mm respectively) for a selected graphic block and then adjust the content proportionally, it would speed up my day immensely :)

    If I could get more automation that would be even better of course :) There are basically two blocks graphics and shading of text on each page.

    The graphic block with an initial value of 32,877 mm Y must be given new values, O and H 27 mm, 107 and 107 mm;

    The text block with an initial value of 129,783 mm Y should be given to a new value Y of 136mm, and the second graphic block, with an initial value of 145,287 mm Y must be given new values of, W and H 146 mm, 100mm and 19mm.

    Normally, I have a macro in a program of external macro Tasker script or AutoHotKey, but for some reason, I can't seem to work reliably with InDesign, so trying to learn the "correct" way

    Thank you

    Kaka

    Well, I say it was not tested, but I think that would be a mistake

    occur if g1 was not defined, i.e. He never found an image matching

    your first graphic image.

    The thing to do is run the ESTK, and when there is an error,

    Check the values of variables, either in the data browser, or by

    typing the expressions in the JavaScript Console.

  • Dynamically resize Flex Layout

    I use flex inside a coldfusion page and would like to know how dynamically my swf in height to fit my request.

    I have a search application and the details text to cut. now, I could scroll but would like to be able to extend the height of the swf to my page of browser can scroll. Is this possible?

    I thought about Application.application.height but nothing. I don't know that the code is up to the page that resizes, but if I put this at 100% can not I put the variable within my application?

    Help, please!

    LinkMc,
    If you use the standard model it has css which says:
    Body {margin: 0px;} { overflow: hidden }<- take="" out="" the="" overflow:hidden.="" that="" is="" the="" first="" step.="" there="" is="" also="" a="">". I pulled the scrolling = 'no' just to be sure. I found myself by wrapping javascript code in the page in a

    . Then I put the height to the size of the app. When the application is shrinking and develop, I adjust the height so the footer is not all simply sit at the end of a lot of scrolling.
    AS3--> flash.external.ExternalInterface.call ("adjustDivHeight", "950");

    Also, a few issues I've seen with IE. The list never ends.

    If we've detected an acceptable version
    embed the Flash content SWF when all tests are passed
    AC_FL_RunContent)
    'src', 'acuminderFX ',.
    "width", "762."
    "height", "100%."
    "align", "middle",
    'id', 'acuminderFX ',.
    'quality', 'high ',.
    'bgcolor', '#ffffff ',.
    'name', 'acuminderFX ',.
    "flashvars", "base = https://www.jnjvision.com/',"
    "allowScriptAccess", "sameDomain",.
    'type', "application/x-shockwave-flash"
    "pluginspage", "https://www.adobe.com/go/getflashplayer."
    "wmode", "transparent".<-- get="" rid="" of="" ie="" black="">
    );

    In IE the swf appears as a black square until de on it with the mouse.
    This emphasizes the swf so that IE will take control.
    var acuFxObj = document.getElementById ("acuminderFX");
    If (acuFxObj! = null) {}
    acuFxObj.focus ();
    }

    If you look at https://www.acuminder.com/ you can see what I did to make it work. Also because obviously I had to make a few changes to the history.js. IE does not load if you does not solve the history.js

    This should be a good start.

  • Dynamic resizing of a sprite (image hotspot)

    Hello

    I have a question about scale dynamically a sprite. I have an application that displays a picture on the screen, and on top of that image, I draw dynamically semi-transparent sprite who act as hot spots for the image under.

    I can't understand how to evolve hotspots in proportion to the part of the image that the scales located below. Hotspots extend UIComponent (so I can communicate with them) and they contain a sprite that is the Visual hotspot on the screen (which is good).

    The image below is a simple Image. When I resize the image (resizing the window), I would like for the hotspots to stay where they are related to the image.

    I tried to create another component, which extends the class Image that attracts all the hot spots and then tried to put it on the top of the image (understand I could put the content of true as the image scale), but had the same results (hot spots were fired, but did not react to the resizing whatsoever).

    Should I use the Bitmap class to draw hotspots instead? I have no idea at this point. I'm puzzled. Any guidance would be appreciated. May I approach the evil of all this, I don't know at this point. I hope I explained the problem well enough to get some kind of feedback.

    Thank you very much for your time.

    Hi Amy,

    I thought about it. I kept pounding on your idea of using a canvas on the scale the UIComponents as a group, but it did not work because I have been scaling the canvas based on the properties of the image (the under Layer) that were not resolved (I tried to recover after Event.ADDED_TO_STAGE).

    The solution was to wait for the Event.RENDER shot and then get the dimensions of the image loaded, to understand what is the percentage of the size that the resized image of the original image and then just scale the canvas above this one session to match. Sprinkle in a listener for Event.RESIZE and boom, it works like a champ.

    This method works better than I expected because now it doesn't matter what size of the original image is relative to its container (larger or smaller), it will scale itself and all its layers (layer of canvas) together.

    It seems that several times I'm looking for the right place for my solution (in the API), just at the wrong time (usually too early, before the properties I'm looking are defined).

    Thank you very much for putting me on the right track.

    The f

  • Make dynamic PHP Script file

    I tried to work on a scenario where I want to create a folder for a user that I choose. So far, the script works if it is static, but I want to make it dynamic. Let me show you what I have.

    Here is my MySQL for registered users, it is simple for demonstration purposes.
    CREATE TABLE 'register')
    "regID' int (11) NOT NULL auto_increment,
    'username' varchar (50) NOT NULL,
    'password' varchar (50) NOT NULL,
    'email' varchar (50) NOT NULL,
    PRIMARY KEY ('regID")
    ) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 1;

    Now what I did was to make a list of all my registered users and a named button create folder. When I click on that I am able to create a folder for this user.

    That's what I have.
    --------------------------
    Start insert file
    $makedir = "$row_rsRegGet ["regID'] ";
    $targetpath = $_SERVER ['DOCUMENT_ROOT']. "/ Register/userFile / $makedir / ';
    $target = $targetpath. baseName ($_FILES ['uploadedfile'] ['name']);
    mkdir($TargetPath.$vName,0700);
    End insert file

    I get an error message and does not know where is my mistake.

    Wednesday, April 18, 2007 17:12:20 + 0000 (UTC), "AdonaiEchad".
    wrote:

    > I really don't know what $vName means. I saw this script on a site and it
    > work when it is static, it is when I use the dynamic attributes that it gives me a
    > error.
    >
    > So if $makedir = "$row_rsRegGet ["regID'] "; a $makedir = "addFolder"; It will be
    > make a folder in the/register/userFile/addFolder. The problem is when
    > placing the dynamci I can't seem to make it work.

    You don't always tell what is the error message. It could be permissions
    issue. However, I don't see an error in your code:

    $makedir = "$row_rsRegGet ["regID'] ";

    You cannot use single quotes on a key of the array inside double quotes.
    Change the above to:

    $makedir = $row_rsRegGet ["regID"];

    If you change your code thusly, it should either work and, if it fails,.
    at least tell you what directory is he's trying to create:

    $row_rsRegGet ["regID'] = 101;
    Start insert file
    $makedir = $row_rsRegGet ["regID"];
    $targetdir = "/ register/userFile / $makedir";
    $targetpath = $_SERVER ['DOCUMENT_ROOT']. $targetdir;
    {if (mkdir($TargetPath,0700))}
    Print "creating directory $targetdir;
    } else {}
    Print "failed to create $targetdir";
    }
    End insert file

    If it fails, provide the error message.

    Gary

  • Dynamic resizing of Textfield with HTML5 Canvas?

    Hello

    If my company is currently using Flash CS4 because all our AS2 code. I really want to move from the dark ages to Adobe animate CC. One of the main drivers is HTML5 Canvas and be able to support all mobile devices.

    So that this transition to work, I need to be able to do 2 things from the start:

    1. I need to get the variables passed in the ColdFusion page that is generated flash animation.

    2. I need to manipulate the data (like the formatting of phone number)

    3. I need to be able to keep the text fields in a defined width and mitigate the text to fit without distortion.

    EX: If I didn't do this in AS2 it would work. Did not understand how to do the same thing to animate:

    If (this ._width > 200) {}

    This ._width = 200;

    }

    This stuff is possible with Adobe animate CC? It is possible with HTML5 Canvas or should I publish with air?

    Is there a site that shows all the animated objects and properties that can be manipulated with Javascript for use with the Web?

    If possible, I'd love to be able to save an image to preview at run time and possibly make web-to-print

    In canvas mode, all audiovisual operations are managed by the library of CreateJS. There is a lot of documentation and examples for that flow. Very little of it is explicitly linked to the Flanimate IDE.

    You cannot directly set the width and height on the CreateJS objects. You can set the scaling factors X and Y, which should be sufficient if you are willing to do a little math.

    Width and height of determining dynamic objects can be difficult, because CreateJS is limited by what supports the HTML5 canvas API. There is a blog post, discuss the issue here:

    http://blog.createjs.com/update-width-height-in-Easeljs/

Maybe you are looking for