Non Rendering Layers

Making a flash website, and since I'm a lazy guy I grabbed a
template (seen here
http://www.templatesbox.com/free-flash-templates/003.htm),
obivously it need to be changed from a corporate one to something
different, so I changed the "slogan" layer to read something else,
but when I publish it, not only does it not show up, but neither
does the section in the header (seen to say "we develop the future"
on that link).
At first I assumed the culprit was just the method it uses to
flicker the text was somehow interfering with publishing, so I made
a whole new layer and animated alpha transparency instead, but even
my brand new layer didn't render. I really don't understand it.
Most confusing (or perhaps the best clue), is even if I make
no alterations and just stick the template into flash and just
publish it, it wont show those 2 text layers still. The top text
layer uses a mask to transition the text in, but I haven't
succeeded in getting that one to work yet either. Again I could
redo the layer using alpha, but my previous attempts would suggest
that it'll be equally futile.
I recently upgraded from MX to Pro 8, and wonder if that is
somehow a factor, but even using older versions of flash player
doesn't help.
I'm just over looking something obvious and stupid, aren't
I?

the "name" layer, is actually right below the slogan layer
that I'm having issues with, and I already did in fact change that
to a PNG of what I wanted successfully.
I appreciate the suggestion to scrap the template, but I'm a
fighter and want to make this one work. For the incompletes, I'm
just going to modify the "home.fla" and rename the published file,
which'll be an easy way to complete it (and possibly what the
template author had in mind).
The link seems to have moved on me, I think it's here now
http://www.templatesbox.com/free-flash-templates/003.htm

Similar Messages

  • Pe10: opening a previously saved and rendered project, the work area indicates non-rendered sections

    Pe10: when I open a previously saved and rendered project, the work area indicates a majority of non-rendered sections.
    When I open a previously saved and rendered project, the work area indicates non-rendered sections. My project is approximately 59 minutes and 27 seconds.
    What must be done to have a saved and rendered project, when open again, be rendered?

    TRUE_SEEKER wrote:
    The price tag of $245 for the Prodad's Mercalli  video software is too steep for me right now.
    Corel's Avid VideoStudio Pro X4 Ultimate (what a mouthful) includes Mercalli SE. It was on sale at half-price on Amazon Black Friday and I missed it - mostly because I was trying to find out what the 'SE' part of it meant.
    Annoyingly (very much so) it seems that Mercalli SE is pretty much the whole deal - a YouTube review of the Mercalli feature in VideoStudio by ProDAD (the Mercalli authors) included all the features I would expect to use.
    So it seems that the $80 VideoStudio product includes the $150 Mercalli plug-in. Thus a workflow starting with Mercalli stabilisation in VideoStudio and then switching to PRE is viable. I can't really afford the full price VideoStudio product so I'm hoping for a similar 50% reduction after Christmas.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children

  • Help!  Pdf losing all non-visible layers

    Pdf losing all non-visible layers when saving for first time in Illustrator 2014 (Creative Cloud). The next time I try to open the document it was flat and the only remaining information was (from the visible layers) was locked into a clipping mask. It is like the document was overwrited with a print(flat) pdf. The document also suddenly became 11 pages long (with 10 empty pages).
    Anyone knows how/if I can get the information back?

    But the editing capabilities box was checked so that probebly wasn't the thing.
    Yes I have definitly learned that by now...

  • Recent InDesign change suppresses non-printing layers when exporting to EPUB

    I hate it when development teams quiety "fix" features I've come to rely on.
    I am using InDesign CC 9.2.
    Until a recent update, when I exported a book to EPUB from InDesign, layers which were set to show but not print were included in the export. I relied on this because my documents include a non-printed Table of Contents block on the first page of each piece included in the anthology. This block causes the correct page to be set when generating the TOC (notice that it's on the page facing the title, not the title page itself) and is used to print the correct title on the title page of each story and running headers throughout the body.
    (An example document - Click for full size)
    Up to at least January 2014, when I exported to EPUB, that visible-but-not-printed block was included in the XHTML output. I could then modify CSS to optimize for e-reader display and the title and author names would appear at the top of each piece. Sometime within the past couple of months, that has changed: layers that are not printed also do not export to EPUB. This wouldn't be so big a problem except that the printed title in the image above also is not output to the EPUB file, because it's a text variable in the underlying master page.
    If you like reading and messing with markup, as I do, the next two images illustrate the problem.
    (The old output - Click for full size)
    The new output:
    (The new output - Click for full size)
    I have five volumes of the anthology so far (comprising roughly 30 stories each) with a new one coming out every three months. Now that this change has been thrown at me, I need to get it resolved or come up with a good workaround while I only have a couple hundred documents to update, instead of double that a year from now.
    Thank you for any help or suggestions you can provide!

    Going back through every document to override Master Page objects just to get the elements to export is not a realistic workaround.
    The change that suppresses visible but non-printing objects is annoying, but at least it's a documented change in 9.2. The change that suppresses all Master Page elements as well is not documented (or at least not documented in an obvious way) and so to me it's a bug.
    Ideally, if these new changes are required by some users, the old behavior could at least become an option: the export to EPUB dialog could add checkboxes for "Include non-printing objects" and/or "Include Master Page elements" so that users like me are not left with no way to continue to use existing functionality.

  • How can I hide non visible layers during test movie ?

    Flash CS5
    I have a layer I am using for construction purposes, it shows though in test movie. If I go to publish settings and untick include hidden layers on the flash tab, when I test movie, my cars don’t appear along the guide lines at all and just pop into view as movie ends.
    How does one hide turned off visibility layers during test movie without affecting hidden guide lines ?
    Envirographics

    If I have a layer that is only acting as a guide for laying things out or whatever, what I do is right click that layer's name and select "Guide" from the menu that appears.  It will not appear in when I use Test Movie

  • Showing non rendered adf components

    Hi,
    When I set my ADF table to rendered=false at design time (to enable it conditionally at runtime), it disappears from design view too. I find this to be strange and annoying behaviour as that makes it difficult to design, I have to keep changing the attribute from false to true between design time and runtime. Surely this should only affect the display during runtime?
    Is there any way to have it not hide the component during design time?
    R

    Since you're rendering it conditionally at runtime, you can enter the EL condition into the rendered attribute. The designer evaluates it to true so it still shows up on the page. Of course, you'll have to put in the EL into the source directly since the attribute editor doesn't initially allow you to use the EL editor.

  • Non-rendered .DV files lagging playback in the viewer

    I'm working with footage that was imported a bit ago through imovie. It seems the data rate on the audio or video is higher than if the footage had been imported through Final Cut. I believe I've worked with imovie captured footage in Final Cut before and have never experienced this issue. The files play choppy in the preview window like a crappy streaming internet clip but once brought into a timeline and the audio finishes rendering, everything is fine. Is there any setting in Final Cut I can tweak to get rid of the lag in the preview window? My boss has told me re-importing is not an option!
    Any ideas?
    Thanks,
    ag

    Convert all your footage to DV/NTSC with QT PRO before you import into FCP.
    #20 Using iMovie to Capture for FCP edit
    Shane's Stock Answer #20:
    iMovie handles the media differently from FCP, specifically where audio is concerned. So it is not a recommended workflow. Here's why...
    iMovie captures using DV Stream (.dv) standard which does not use timecode. That is a big disadvantage over the way that FCP captures in that you can't go back and recapture the material at a later date if you need to revisit a project.
    The DV/NTSC specification (the one FCP uses) also calls for seperate tracks for audio and video, even if you capture it as one clip. iMovie' DV stream format is muxed audio and video, which means that they are tied together (I can't get into specifics because I ain't no engineer or programmer). FCP is a bit more demanding and captures the seperate audio/video tracks, either in a single media file or as seperate video and audio files. With FCP you could capture video only or audio only because each is defined by the DV specs. while with iMovie you can't.
    Also, if you drop the iMovie footage into the timeline, your will get the RED render bar forcing you to render the footage in order to see it...
    Shane

  • Using Transform or Selection tools makes my non-background layers or whole document invisible.

    I recently started having this problem in Photoshop CS6 where using the transform or selection tools makes all the layers other than my background layer disappear so I can't see what I'm selection or transforming. This happens randomly out of nowhere. I can be using those tools all day with no problem, and then out of nowhere it starts making things invisible. There doesn't seem to be any other programs running that would cause it (not that that should be an issue, my computer could easily run all my Adobe programs at once if I wanted it to), and the only thing that seems to fix it so far is restarting Photoshop. But that gets old really fast when I have to do it over and over again. I tried calling Adobe, but somehow they're always closed, even during their supposed hours of operation.

    You can also try to disable the GPU accleration (hardware acceleration) completely. Usually it is the drivers to blame, but on some PC's I have noticed that disabling it completely provides better performance and a better experience than having it enabled. In my case, I lose some features that I do not use so it is not an issue for me.

  • Using Transform or Selection tools makes my non-background layers invisible.

    I recently started having this problem in Photoshop CS6 where using the transform or selection tools makes all the layers other than my background layer disappear so I can't see what I'm selection or transforming. This happens randomly out of nowhere. I can be using those tools all day with no problem, and then out of nowhere it starts making things invisible. There doesn't seem to be any other programs running that would cause it (not that that should be an issue, my computer could easily run all my Adobe programs at once if I wanted it to), and the only thing that seems to fix it so far is restarting Photoshop. But that gets old really fast when I have to do it over and over again. I tried calling Adobe, but somehow they're always closed, even during their supposed hours of operation.

    Hi there,
    I'm sorry you're having problems with your software. The first step is to be sure you have all applicable updates. Secondly, you may need to reset your preferences.
    This link has a number of steps that may help you deal with your issue:
    http://forums.adobe.com/thread/375776
    I hope that following the instructions solve your problem, but if not, please don't hesitate to check in.

  • How do I disable the timeline feature for non-video layers?

    I know there is new feature in Photoshop CS6-timeline that allow to edit vid in Photoshop.
    But this make file get bigger and bigger even this feature convert image layers to video layers.
    I don't need this, but I can't find how to disable timeline and discard frame animation.

    All you can do is hide the timeline. Windows>Animation or Windows>Timeline (Not sure which it is on CS6)

  • CS6 2D layers disappear when 3D layer added

    Doesn't seem to matter if it's classic or raytrace renderer. All non 3d layers become invisible. If I make them 3D, they appear. Strangely, if I nest the comp into another comp, everything shows up only when viewing through the new comp.
    I've tried purging cache and memory with no luck. Restarting AE doesn't help.
    I'm on a Macbook Pro running OSX 10.6.8
      Model Name:          MacBook Pro
      Model Identifier:          MacBookPro6,1
      Processor Name:          Intel Core i7
      Processor Speed:          2.66 GHz
      Number Of Processors:          1
      Total Number Of Cores:          2
      L2 Cache (per core):          256 KB
      L3 Cache:          4 MB
      Memory:          8 GB
    NVIDIA GeForce GT 330M:
      Chipset Model:          NVIDIA GeForce GT 330M
      Type:          GPU
      Bus:          PCIe
      PCIe Lane Width:          x16
      VRAM (Total):          512 MB
      Vendor:          NVIDIA (0x10de)
      Device ID:          0x0a29
      Revision ID:          0x00a2
      ROM Revision:          3560
      gMux Version:          1.9.22
      Displays:
    Color LCD:
      Resolution:          1920 x 1200
      Pixel Depth:          32-Bit Color (ARGB8888)
      Mirror:          Off
      Online:          Yes
      Built-In:          Yes
    BenQ 241W:
      Resolution:          1920 x 1200 @ 60 Hz
      Pixel Depth:          32-Bit Color (ARGB8888)
      Main Display:          Yes
      Mirror:          Off
      Online:          Yes
      Rotation:          Supported

    File it under the "one more of those CS6 bugs" category. Though you might try to check, whether the issue actualyl occurs when only running with the internal display. You could simply be running out of resources for all that hardware acceleration crap they threw into the program.
    Mylenium

  • How batch export layers to files png in cc

    I am having trouble with an export layers to files script i am wanting to batch export layer to png and this script i have seems to be the one i want although every time i run the script i get this error message "could not complete the action  since the destination folder doesn't exist" the script required me to hard code my destination path the path i require is "C:/Users/Tim/Desktop/Backdrops/png/" I am not completely sure why its stating it does not exist any help would be greatly appreciated. i have tried to contact the creator but the post it was on was very old.
    // enable double clicking from the Macintosh Finder or the Windows Explorer
    #target photoshop
    //=================================================================
    // Globals
    //=================================================================
    var exportPath = "/Users/pedr/Documents/Work/Clients/Pathways/Learning_Hub/Source/Comics/export";
    exportPath = exportPath + '/layers';
    // UI strings to be localized
    var strTitle = localize("$$$/JavaScripts/X2L/Title=X2L");
    var strButtonRun = localize("$$$/JavaScripts/X2L/Run=Run");
    var strButtonCancel = localize("$$$/JavaScripts/X2L/Cancel=Cancel");
    var strHelpText = localize("$$$/JavaScripts/X2L/Help=Please specify the format and location for saving each layer as a file.");
    var strLabelDestination = localize("$$$/JavaScripts/X2L/Destination=Destination:");
    var strButtonBrowse = localize("$$$/JavaScripts/X2L/Browse=&Browse...");
    var strLabelFileNamePrefix = localize("$$$/JavaScripts/X2L/FileNamePrefix=File Name Prefix:");
    var strCheckboxVisibleOnly = localize("$$$/JavaScripts/X2L/VisibleOnly=&Visible Layers Only");
    var strLabelFileType = localize("$$$/JavaScripts/X2L/FileType=File Type:");
    var strCheckboxIncludeICCProfile = localize("$$$/JavaScripts/X2L/IncludeICC=&Include ICC Profile");
    var strJPEGOptions = localize("$$$/JavaScripts/X2L/JPEGOptions=JPEG Options:");
    var strLabelQuality = localize("$$$/JavaScripts/X2L/Quality=Quality:");
    var strCheckboxMaximizeCompatibility = localize("$$$/JavaScripts/X2L/Maximize=&Maximize Compatibility");
    var strTIFFOptions = localize("$$$/JavaScripts/X2L/TIFFOptions=TIFF Options:");
    var strLabelImageCompression = localize("$$$/JavaScripts/X2L/ImageCompression=Image Compression:");
    var strNone = localize("$$$/JavaScripts/X2L/None=None");
    var strPDFOptions = localize("$$$/JavaScripts/X2L/PDFOptions=PDF Options:");
    var strLabelEncoding = localize("$$$/JavaScripts/X2L/Encoding=Encoding:");
    var strTargaOptions = localize("$$$/JavaScripts/X2L/TargaOptions=Targa Options:");
    var strLabelDepth = localize("$$$/JavaScripts/X2L/Depth=Depth:");
    var strRadiobutton16bit = localize("$$$/JavaScripts/X2L/Bit16=16bit");
    var strRadiobutton24bit = localize("$$$/JavaScripts/X2L/Bit24=24bit");
    var strRadiobutton32bit = localize("$$$/JavaScripts/X2L/Bit32=32bit");
    var strBMPOptions = localize("$$$/JavaScripts/X2L/BMPOptions=BMP Options:");
    var strAlertSpecifyDestination = localize("$$$/JavaScripts/X2L/SpecifyDestination=Please specify destination.");
    var strAlertDestinationNotExist = localize("$$$/JavaScripts/X2L/DestionationDoesNotExist=Destination does not exist.");
    var strTitleSelectDestination = localize("$$$/JavaScripts/X2L/SelectDestination=Select Destination");
    var strAlertDocumentMustBeOpened = localize("$$$/JavaScripts/X2L/OneDocument=You must have a document open to export!");
    var strAlertNeedMultipleLayers = localize("$$$/JavaScripts/X2L/NoLayers=You need a document with multiple layers to export!");
    var strAlertWasSuccessful = localize("$$$/JavaScripts/X2L/Success= was successful.");
    var strUnexpectedError = localize("$$$/JavaScripts/X2L/Unexpected=Unexpected error");
    var strMessage = localize("$$$/JavaScripts/X2L/Message=X2L");
    var stretQuality = localize( "$$$/locale_specific/JavaScripts/X2L/ETQualityLength=30" );
    var stretDestination = localize( "$$$/locale_specific/JavaScripts/X2L/ETDestinationLength=160" );
    var strddFileType = localize( "$$$/locale_specific/JavaScripts/X2L/DDFileType=100" );
    var strpnlOptions = localize( "$$$/locale_specific/JavaScripts/X2L/PNLOptions=100" );
    var strPNG8Options = localize("$$$/JavaScripts/X2L/PNG8Options=PNG-8 Options:");
    var strCheckboxPNGTransparency = localize("$$$/JavaScripts/X2L/Transparency=Transparency");
    var strCheckboxPNGInterlaced = localize("$$$/JavaScripts/X2L/Interlaced=Interlaced");
    var strCheckboxPNGTrm = localize("$$$/JavaScripts/X2L/Trim=Trim Layers");
    var strPNG24Options = localize("$$$/JavaScripts/X2L/PNG24Options=PNG-24 Options:");
    // the drop down list indexes for file type
    var png24Index = 7;
    main();
    // Functions
    // Function: main
    // Usage: the core routine for this script
    // Input: <none>
    // Return: <none>
    function main() {
        if ( app.documents.length <= 0 ) {
            if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                alert( strAlertDocumentMustBeOpened );
            return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
        var exportInfo = new Object();
        initExportInfo(exportInfo);
        // look for last used params via Photoshop registry, getCustomOptions will throw if none exist
        try {
        catch(e) {
            // it's ok if we don't have any options, continue with defaults
        try {
            var docName = app.activeDocument.name;  // save the app.activeDocument name before duplicate.
            var layerCount = app.documents[docName].layers.length;
            var layerSetsCount = app.documents[docName].layerSets.length;
            if ((layerCount <= 1)&&(layerSetsCount <= 0)) {
                if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                    alert( strAlertNeedMultipleLayers );
                return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
            } else {
                var rememberMaximize;
                var needMaximize = exportInfo.psdMaxComp ? QueryStateType.ALWAYS : QueryStateType.NEVER;
                app.activeDocument = app.documents[docName];
                var duppedDocument = app.activeDocument.duplicate();
                duppedDocument.activeLayer = duppedDocument.layers[duppedDocument.layers.length-1]; // for removing
                setInvisibleAllArtLayers(duppedDocument);
                exportChildren(duppedDocument, app.documents[docName], exportInfo, duppedDocument, exportInfo.fileNamePrefix);
                duppedDocument.close( SaveOptions.DONOTSAVECHANGES );
                if ( rememberMaximize != undefined ) {
                    app.preferences.maximizeCompatibility = rememberMaximize;
                if ( DialogModes.ALL == app.playbackDisplayDialogs ) {
                    //alert(strTitle + strAlertWasSuccessful);
                app.playbackDisplayDialogs = DialogModes.ALL;
        } catch (e) {
            if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                alert(e);
            return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
    // Function: settingDialog
    // Usage: pop the ui and get user settings
    // Input: exportInfo object containing our parameters
    // Return: on ok, the dialog info is set to the exportInfo object
    function settingDialog(exportInfo) {
      return;
    // Function: hideAllFileTypePanel
    // Usage: hide all the panels in the common actions
    // Input: <none>, dlgMain is a global for this script
    // Return: <none>, all panels are now hidden
    function hideAllFileTypePanel() {
    // Function: initExportInfo
    // Usage: create our default parameters
    // Input: a new Object
    // Return: a new object with params set to default
    function initExportInfo(exportInfo) {
        //exportInfo.destination = new String(exportPath);
        exportInfo.fileNamePrefix = new String("untitled_");
        exportInfo.visibleOnly = false;
        exportInfo.fileType = png24Index;
        exportInfo.icc = true;
        exportInfo.png24Transparency = true;
        exportInfo.png24Interlaced = false;
        exportInfo.png24Trim = true;
        try {
            exportInfo.destination = Folder(new String(exportPath)).fsName; // destination folder
            var tmp = app.activeDocument.fullName.name;
            exportInfo.fileNamePrefix = decodeURI(tmp.substring(0, tmp.indexOf("."))); // filename body part
        } catch(someError) {
            exportInfo.destination = new String(exportPath);
            exportInfo.fileNamePrefix = app.activeDocument.name; // filename body part
    // Function: saveFile
    // Usage: the worker routine, take our params and save the file accordingly
    // Input: reference to the document, the name of the output file,
    //        export info object containing more information
    // Return: <none>, a file on disk
    function saveFile( docRef, fileNameBody, exportInfo) {
                saveFile(docRef, fileNameBody, exportInfo, false, true);
                function saveFile( docRef, fileNameBody, exportInfo, interlacedValue, transparencyValue) {
                var id6 = charIDToTypeID( "Expr" );
                    var desc3 = new ActionDescriptor();
                    var id7 = charIDToTypeID( "Usng" );
                        var desc4 = new ActionDescriptor();
                        var id8 = charIDToTypeID( "Op  " );
                        var id9 = charIDToTypeID( "SWOp" );
                        var id10 = charIDToTypeID( "OpSa" );
                        desc4.putEnumerated( id8, id9, id10 );
                        var id11 = charIDToTypeID( "Fmt " );
                        var id12 = charIDToTypeID( "IRFm" );
                        var id13 = charIDToTypeID( "PN24" );
                        desc4.putEnumerated( id11, id12, id13 );
                        var id14 = charIDToTypeID( "Intr" );
                        desc4.putBoolean( id14, interlacedValue );
                        var id15 = charIDToTypeID( "Trns" );
                        desc4.putBoolean( id15, transparencyValue );
                        var id16 = charIDToTypeID( "Mtt " );
                        desc4.putBoolean( id16, true );
                        var id17 = charIDToTypeID( "MttR" );
                        desc4.putInteger( id17, 255 );
                        var id18 = charIDToTypeID( "MttG" );
                        desc4.putInteger( id18, 255 );
                        var id19 = charIDToTypeID( "MttB" );
                        desc4.putInteger( id19, 255 );
                        var id20 = charIDToTypeID( "SHTM" );
                        desc4.putBoolean( id20, false );
                        var id21 = charIDToTypeID( "SImg" );
                        desc4.putBoolean( id21, true );
                        var id22 = charIDToTypeID( "SSSO" );
                        desc4.putBoolean( id22, false );
                        var id23 = charIDToTypeID( "SSLt" );
                            var list1 = new ActionList();
                        desc4.putList( id23, list1 );
                        var id24 = charIDToTypeID( "DIDr" );
                        desc4.putBoolean( id24, false );
                        var id25 = charIDToTypeID( "In  " );
                        desc4.putPath( id25, new File( exportPath + "C:/Users/Tim/Desktop/Backdrops/png/"  + fileNameBody + ".png") );
                    var id26 = stringIDToTypeID( "SaveForWeb" );
                    desc3.putObject( id7, id26, desc4 );
                executeAction( id6, desc3, DialogModes.NO );
    // Function: zeroSuppress
    // Usage: return a string padded to digit(s)
    // Input: num to convert, digit count needed
    // Return: string padded to digit length
    function zeroSuppress (num, digit) {
        var tmp = num.toString();
        while (tmp.length < digit) {
            tmp = "0" + tmp;
        return tmp;
    // Function: setInvisibleAllArtLayers
    // Usage: unlock and make invisible all art layers, recursively
    // Input: document or layerset
    // Return: all art layers are unlocked and invisible
    function setInvisibleAllArtLayers(obj) {
        for( var i = 0; i < obj.artLayers.length; i++) {
            obj.artLayers[i].allLocked = false;
            obj.artLayers[i].visible = false;
        for( var i = 0; i < obj.layerSets.length; i++) {
            setInvisibleAllArtLayers(obj.layerSets[i]);
    // Function: removeAllInvisibleArtLayers
    // Usage: remove all the invisible art layers, recursively
    // Input: document or layer set
    // Return: <none>, all layers that were invisible are now gone
    function removeAllInvisibleArtLayers(obj) {
        for( var i = obj.artLayers.length-1; 0 <= i; i--) {
            try {
                if(!obj.artLayers[i].visible) {
                    obj.artLayers[i].remove();
            catch (e) {
        for( var i = obj.layerSets.length-1; 0 <= i; i--) {
            removeAllInvisibleArtLayers(obj.layerSets[i]);
    // Function: removeAllEmptyLayerSets
    // Usage: find all empty layer sets and remove them, recursively
    // Input: document or layer set
    // Return: empty layer sets are now gone
    function removeAllEmptyLayerSets(obj) {
        var foundEmpty = true;
        for( var i = obj.layerSets.length-1; 0 <= i; i--) {
            if( removeAllEmptyLayerSets(obj.layerSets[i])) {
                obj.layerSets[i].remove();
            } else {
                foundEmpty = false;
        if (obj.artLayers.length > 0) {
            foundEmpty = false;
        return foundEmpty;
    // Function: zeroSuppress
    // Usage: return a string padded to digit(s)
    // Input: num to convert, digit count needed
    // Return: string padded to digit length
    function removeAllInvisible(docRef) {
        removeAllInvisibleArtLayers(docRef);
        removeAllEmptyLayerSets(docRef);
    // Function: exportChildren
    // Usage: find all the children in this document to save
    // Input: duplicate document, original document, export info,
    //        reference to document, starting file name
    // Return: <none>, documents are saved accordingly
    function exportChildren(dupObj, orgObj, exportInfo, dupDocRef, fileNamePrefix) {
        for( var i = 0; i < dupObj.artLayers.length; i++) {
            if (exportInfo.visibleOnly) { // visible layer only
                if (!orgObj.artLayers[i].visible) {
                    continue;
            dupObj.artLayers[i].visible = true;
            var layerName = dupObj.artLayers[i].name;  // store layer name before change doc
            var duppedDocumentTmp = dupDocRef.duplicate();
            if ((png24Index == exportInfo.fileType)||(png8Index == exportInfo.fileType)) { // PSD: Keep transparency
                removeAllInvisible(duppedDocumentTmp);
                //PNGFileOptions
                        if (activeDocument.activeLayer.isBackgroundLayer == false) { //is it anything but a background layer?
                            app.activeDocument.trim(TrimType.TRANSPARENT);
            } else { // just flatten
                duppedDocumentTmp.flatten();
            // Edit
            var docName = app.activeDocument.name;
            // For some reason indexOf fails if we include the '-', so we use 'copy' and decrement the index by 1.
            docName = docName.slice(0, docName.indexOf('copy')-1);
            var fileNameBody = (docName+'_'+layerName).toLowerCase();
            fileNameBody = fileNameBody.replace(/[:\/\\*\?\"\<\>\|]/g, "_");  // '/\:*?"<>|' -> '_'
            if (fileNameBody.length > 120) {
                fileNameBody = fileNameBody.substring(0,120);
            saveFile(duppedDocumentTmp, fileNameBody, exportInfo);
            duppedDocumentTmp.close(SaveOptions.DONOTSAVECHANGES);
            dupObj.artLayers[i].visible = false;
        for( var i = 0; i < dupObj.layerSets.length; i++) {
            if (exportInfo.visibleOnly) { // visible layer only
                if (!orgObj.layerSets[i].visible) {
                    continue;
            var fileNameBody = fileNamePrefix;
            fileNameBody += "_" + zeroSuppress(i, 4) + "s";
            exportChildren(dupObj.layerSets[i], orgObj.layerSets[i], exportInfo, dupDocRef, fileNameBody);  // recursive call
    // Function: objectToDescriptor
    // Usage: create an ActionDescriptor from a JavaScript Object
    // Input: JavaScript Object (o)
    //        object unique string (s)
    //        Pre process converter (f)
    // Return: ActionDescriptor
    // NOTE: Only boolean, string, number and UnitValue are supported, use a pre processor
    //       to convert (f) other types to one of these forms.
    // REUSE: This routine is used in other scripts. Please update those if you
    //        modify. I am not using include or eval statements as I want these
    //        scripts self contained.
    function objectToDescriptor (o, s, f) {
        o = {};
        var d = new ActionDescriptor;
        var l = o.reflect.properties.length;
        d.putString( app.charIDToTypeID( 'Msge' ), s );
        for (var i = 0; i < l; i++ ) {
            var k = o.reflect.properties[i].toString();
            if (k == "__proto__" || k == "__count__" || k == "__class__" || k == "reflect")
                continue;
            var v = o[ k ];
            k = app.stringIDToTypeID(k);
            switch ( typeof(v) ) {
                case "boolean":
                    d.putBoolean(k, v);
                    break;
                case "string":
                    d.putString(k, v);
                    break;
                case "number":
                    d.putDouble(k, v);
                    break;
                default:
                    if ( v instanceof UnitValue ) {
                        var uc = new Object;
                        uc["px"] = charIDToTypeID("#Rlt"); // unitDistance
                        uc["%"] = charIDToTypeID("#Prc"); // unitPercent
                        d.putUnitDouble(k, uc[v.type], v.value);
                    } else {
                        throw( new Error("Unsupported type in objectToDescriptor " + typeof(v) ) );
        return d;
    // Function: descriptorToObject
    // Usage: update a JavaScript Object from an ActionDescriptor
    // Input: JavaScript Object (o), current object to update (output)
    //        Photoshop ActionDescriptor (d), descriptor to pull new params for object from
    //        object unique string (s)
    //        JavaScript Function (f), post process converter utility to convert
    // Return: Nothing, update is applied to passed in JavaScript Object (o)
    // NOTE: Only boolean, string, number and UnitValue are supported, use a post processor
    //       to convert (f) other types to one of these forms.
    // REUSE: This routine is used in other scripts. Please update those if you
    //        modify. I am not using include or eval statements as I want these
    //        scripts self contained.
    function descriptorToObject (o, d, s, f) {
        var l = d.count;
        if (l) {
            var keyMessage = app.charIDToTypeID( 'Msge' );
            if ( d.hasKey(keyMessage) && ( s != d.getString(keyMessage) )) return;
        for (var i = 0; i < l; i++ ) {
            var k = d.getKey(i); // i + 1 ?
            var t = d.getType(k);
            strk = app.typeIDToStringID(k);
            switch (t) {
                case DescValueType.BOOLEANTYPE:
                    o[strk] = d.getBoolean(k);
                    break;
                case DescValueType.STRINGTYPE:
                    o[strk] = d.getString(k);
                    break;
                case DescValueType.DOUBLETYPE:
                    o[strk] = d.getDouble(k);
                    break;
                case DescValueType.UNITDOUBLE:
                    var uc = new Object;
                    uc[charIDToTypeID("#Rlt")] = "px"; // unitDistance
                    uc[charIDToTypeID("#Prc")] = "%"; // unitPercent
                    uc[charIDToTypeID("#Pxl")] = "px"; // unitPixels
                    var ut = d.getUnitDoubleType(k);
                    var uv = d.getUnitDoubleValue(k);
                    o[strk] = new UnitValue( uv, uc[ut] );
                    break;
                case DescValueType.INTEGERTYPE:
                case DescValueType.ALIASTYPE:
                case DescValueType.CLASSTYPE:
                case DescValueType.ENUMERATEDTYPE:
                case DescValueType.LISTTYPE:
                case DescValueType.OBJECTTYPE:
                case DescValueType.RAWTYPE:
                case DescValueType.REFERENCETYPE:
                default:
                    throw( new Error("Unsupported type in descriptorToObject " + t ) );
        if (undefined != f) {
            o = f(o);
    // Function: preProcessExportInfo
    // Usage: convert Photoshop enums to strings for storage
    // Input: JavaScript Object of my params for this script
    // Return: JavaScript Object with objects converted for storage
    function preProcessExportInfo(o) {
        o.tiffCompression = o.tiffCompression.toString();
        o.pdfEncoding = o.pdfEncoding.toString();
        o.targaDepth = o.targaDepth.toString();
        o.bmpDepth = o.bmpDepth.toString();
        return o;
    // Function: postProcessExportInfo
    // Usage: convert strings from storage to Photoshop enums
    // Input: JavaScript Object of my params in string form
    // Return: JavaScript Object with objects in enum form
    function postProcessExportInfo(o) {
        o.tiffCompression = eval(o.tiffCompression);
        o.pdfEncoding = eval(o.pdfEncoding);
        o.targaDepth = eval(o.targaDepth);
        o.bmpDepth = eval(o.bmpDepth);
        return o;
    // Function: StrToIntWithDefault
    // Usage: convert a string to a number, first stripping all characters
    // Input: string and a default number
    // Return: a number
    function StrToIntWithDefault( s, n ) {
        var onlyNumbers = /[^0-9]/g;
        var t = s.replace( onlyNumbers, "" );
        t = parseInt( t );
        if ( ! isNaN( t ) ) {
            n = t;
        return n;
    // End X2L.jsx

    I have put the like var exportPath = "~/Desktop/Backdrops/png/";  and have removed the exportPath = exportPath + '/layers';
    but when i run the script it still comes up with the error
    could not complete action since the destination folder does not exist
    if you are using the extendedscript toolkit would be able to run the script and see if you know were the problem is coming from i cant seem to understand why its not seeing the destination.
    thanks for all your help
    // enable double clicking from the Macintosh Finder or the Windows Explorer
    #target photoshop
    //=================================================================
    // Globals
    //=================================================================
    var exportPath = "~/Desktop/Backdrops/png/";
    // UI strings to be localized
    var strTitle = localize("$$$/JavaScripts/X2L/Title=X2L");
    var strButtonRun = localize("$$$/JavaScripts/X2L/Run=Run");
    var strButtonCancel = localize("$$$/JavaScripts/X2L/Cancel=Cancel");
    var strHelpText = localize("$$$/JavaScripts/X2L/Help=Please specify the format and location for saving each layer as a file.");
    var strLabelDestination = localize("$$$/JavaScripts/X2L/Destination=Destination:");
    var strButtonBrowse = localize("$$$/JavaScripts/X2L/Browse=&Browse...");
    var strLabelFileNamePrefix = localize("$$$/JavaScripts/X2L/FileNamePrefix=File Name Prefix:");
    var strCheckboxVisibleOnly = localize("$$$/JavaScripts/X2L/VisibleOnly=&Visible Layers Only");
    var strLabelFileType = localize("$$$/JavaScripts/X2L/FileType=File Type:");
    var strCheckboxIncludeICCProfile = localize("$$$/JavaScripts/X2L/IncludeICC=&Include ICC Profile");
    var strJPEGOptions = localize("$$$/JavaScripts/X2L/JPEGOptions=JPEG Options:");
    var strLabelQuality = localize("$$$/JavaScripts/X2L/Quality=Quality:");
    var strCheckboxMaximizeCompatibility = localize("$$$/JavaScripts/X2L/Maximize=&Maximize Compatibility");
    var strTIFFOptions = localize("$$$/JavaScripts/X2L/TIFFOptions=TIFF Options:");
    var strLabelImageCompression = localize("$$$/JavaScripts/X2L/ImageCompression=Image Compression:");
    var strNone = localize("$$$/JavaScripts/X2L/None=None");
    var strPDFOptions = localize("$$$/JavaScripts/X2L/PDFOptions=PDF Options:");
    var strLabelEncoding = localize("$$$/JavaScripts/X2L/Encoding=Encoding:");
    var strTargaOptions = localize("$$$/JavaScripts/X2L/TargaOptions=Targa Options:");
    var strLabelDepth = localize("$$$/JavaScripts/X2L/Depth=Depth:");
    var strRadiobutton16bit = localize("$$$/JavaScripts/X2L/Bit16=16bit");
    var strRadiobutton24bit = localize("$$$/JavaScripts/X2L/Bit24=24bit");
    var strRadiobutton32bit = localize("$$$/JavaScripts/X2L/Bit32=32bit");
    var strBMPOptions = localize("$$$/JavaScripts/X2L/BMPOptions=BMP Options:");
    var strAlertSpecifyDestination = localize("$$$/JavaScripts/X2L/SpecifyDestination=Please specify destination.");
    var strAlertDestinationNotExist = localize("$$$/JavaScripts/X2L/DestionationDoesNotExist=Destination does not exist.");
    var strTitleSelectDestination = localize("$$$/JavaScripts/X2L/SelectDestination=Select Destination");
    var strAlertDocumentMustBeOpened = localize("$$$/JavaScripts/X2L/OneDocument=You must have a document open to export!");
    var strAlertNeedMultipleLayers = localize("$$$/JavaScripts/X2L/NoLayers=You need a document with multiple layers to export!");
    var strAlertWasSuccessful = localize("$$$/JavaScripts/X2L/Success= was successful.");
    var strUnexpectedError = localize("$$$/JavaScripts/X2L/Unexpected=Unexpected error");
    var strMessage = localize("$$$/JavaScripts/X2L/Message=X2L");
    var stretQuality = localize( "$$$/locale_specific/JavaScripts/X2L/ETQualityLength=30" );
    var stretDestination = localize( "$$$/locale_specific/JavaScripts/X2L/ETDestinationLength=160" );
    var strddFileType = localize( "$$$/locale_specific/JavaScripts/X2L/DDFileType=100" );
    var strpnlOptions = localize( "$$$/locale_specific/JavaScripts/X2L/PNLOptions=100" );
    var strPNG8Options = localize("$$$/JavaScripts/X2L/PNG8Options=PNG-8 Options:");
    var strCheckboxPNGTransparency = localize("$$$/JavaScripts/X2L/Transparency=Transparency");
    var strCheckboxPNGInterlaced = localize("$$$/JavaScripts/X2L/Interlaced=Interlaced");
    var strCheckboxPNGTrm = localize("$$$/JavaScripts/X2L/Trim=Trim Layers");
    var strPNG24Options = localize("$$$/JavaScripts/X2L/PNG24Options=PNG-24 Options:");
    // the drop down list indexes for file type
    var png24Index = 7;
    main();
    // Functions
    // Function: main
    // Usage: the core routine for this script
    // Input: <none>
    // Return: <none>
    function main() {
        if ( app.documents.length <= 0 ) {
            if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                alert( strAlertDocumentMustBeOpened );
            return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
        var exportInfo = new Object();
        initExportInfo(exportInfo);
        // look for last used params via Photoshop registry, getCustomOptions will throw if none exist
        try {
        catch(e) {
            // it's ok if we don't have any options, continue with defaults
        try {
            var docName = app.activeDocument.name;  // save the app.activeDocument name before duplicate.
            var layerCount = app.documents[docName].layers.length;
            var layerSetsCount = app.documents[docName].layerSets.length;
            if ((layerCount <= 1)&&(layerSetsCount <= 0)) {
                if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                    alert( strAlertNeedMultipleLayers );
                return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
            } else {
                var rememberMaximize;
                var needMaximize = exportInfo.psdMaxComp ? QueryStateType.ALWAYS : QueryStateType.NEVER;
                app.activeDocument = app.documents[docName];
                var duppedDocument = app.activeDocument.duplicate();
                duppedDocument.activeLayer = duppedDocument.layers[duppedDocument.layers.length-1]; // for removing
                setInvisibleAllArtLayers(duppedDocument);
                exportChildren(duppedDocument, app.documents[docName], exportInfo, duppedDocument, exportInfo.fileNamePrefix);
                duppedDocument.close( SaveOptions.DONOTSAVECHANGES );
                if ( rememberMaximize != undefined ) {
                    app.preferences.maximizeCompatibility = rememberMaximize;
                if ( DialogModes.ALL == app.playbackDisplayDialogs ) {
                    //alert(strTitle + strAlertWasSuccessful);
                app.playbackDisplayDialogs = DialogModes.ALL;
        } catch (e) {
            if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                alert(e);
            return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
    // Function: settingDialog
    // Usage: pop the ui and get user settings
    // Input: exportInfo object containing our parameters
    // Return: on ok, the dialog info is set to the exportInfo object
    function settingDialog(exportInfo) {
      return;
    // Function: hideAllFileTypePanel
    // Usage: hide all the panels in the common actions
    // Input: <none>, dlgMain is a global for this script
    // Return: <none>, all panels are now hidden
    function hideAllFileTypePanel() {
    // Function: initExportInfo
    // Usage: create our default parameters
    // Input: a new Object
    // Return: a new object with params set to default
    function initExportInfo(exportInfo) {
        //exportInfo.destination = new String(exportPath);
        exportInfo.fileNamePrefix = new String("untitled_");
        exportInfo.visibleOnly = false;
        exportInfo.fileType = png24Index;
        exportInfo.icc = true;
        exportInfo.png24Transparency = true;
        exportInfo.png24Interlaced = false;
        exportInfo.png24Trim = true;
        try {
            exportInfo.destination = Folder(new String(exportPath)).fsName; // destination folder
            var tmp = app.activeDocument.fullName.name;
            exportInfo.fileNamePrefix = decodeURI(tmp.substring(0, tmp.indexOf("."))); // filename body part
        } catch(someError) {
            exportInfo.destination = new String(exportPath);
            exportInfo.fileNamePrefix = app.activeDocument.name; // filename body part
    // Function: saveFile
    // Usage: the worker routine, take our params and save the file accordingly
    // Input: reference to the document, the name of the output file,
    //        export info object containing more information
    // Return: <none>, a file on disk
    function saveFile( docRef, fileNameBody, exportInfo) {
                saveFile(docRef, fileNameBody, exportInfo, false, true);
                function saveFile( docRef, fileNameBody, exportInfo, interlacedValue, transparencyValue) {
                var id6 = charIDToTypeID( "Expr" );
                    var desc3 = new ActionDescriptor();
                    var id7 = charIDToTypeID( "Usng" );
                        var desc4 = new ActionDescriptor();
                        var id8 = charIDToTypeID( "Op  " );
                        var id9 = charIDToTypeID( "SWOp" );
                        var id10 = charIDToTypeID( "OpSa" );
                        desc4.putEnumerated( id8, id9, id10 );
                        var id11 = charIDToTypeID( "Fmt " );
                        var id12 = charIDToTypeID( "IRFm" );
                        var id13 = charIDToTypeID( "PN24" );
                        desc4.putEnumerated( id11, id12, id13 );
                        var id14 = charIDToTypeID( "Intr" );
                        desc4.putBoolean( id14, interlacedValue );
                        var id15 = charIDToTypeID( "Trns" );
                        desc4.putBoolean( id15, transparencyValue );
                        var id16 = charIDToTypeID( "Mtt " );
                        desc4.putBoolean( id16, true );
                        var id17 = charIDToTypeID( "MttR" );
                        desc4.putInteger( id17, 255 );
                        var id18 = charIDToTypeID( "MttG" );
                        desc4.putInteger( id18, 255 );
                        var id19 = charIDToTypeID( "MttB" );
                        desc4.putInteger( id19, 255 );
                        var id20 = charIDToTypeID( "SHTM" );
                        desc4.putBoolean( id20, false );
                        var id21 = charIDToTypeID( "SImg" );
                        desc4.putBoolean( id21, true );
                        var id22 = charIDToTypeID( "SSSO" );
                        desc4.putBoolean( id22, false );
                        var id23 = charIDToTypeID( "SSLt" );
                            var list1 = new ActionList();
                        desc4.putList( id23, list1 );
                        var id24 = charIDToTypeID( "DIDr" );
                        desc4.putBoolean( id24, false );
                        var id25 = charIDToTypeID( "In  " );
                        desc4.putPath( id25, new File( exportPath + "C:/Users/Tim/Desktop/Backdrops/png/"  + fileNameBody + ".png") );
                    var id26 = stringIDToTypeID( "SaveForWeb" );
                    desc3.putObject( id7, id26, desc4 );
                executeAction( id6, desc3, DialogModes.NO );
    // Function: zeroSuppress
    // Usage: return a string padded to digit(s)
    // Input: num to convert, digit count needed
    // Return: string padded to digit length
    function zeroSuppress (num, digit) {
        var tmp = num.toString();
        while (tmp.length < digit) {
            tmp = "0" + tmp;
        return tmp;
    // Function: setInvisibleAllArtLayers
    // Usage: unlock and make invisible all art layers, recursively
    // Input: document or layerset
    // Return: all art layers are unlocked and invisible
    function setInvisibleAllArtLayers(obj) {
        for( var i = 0; i < obj.artLayers.length; i++) {
            obj.artLayers[i].allLocked = false;
            obj.artLayers[i].visible = false;
        for( var i = 0; i < obj.layerSets.length; i++) {
            setInvisibleAllArtLayers(obj.layerSets[i]);
    // Function: removeAllInvisibleArtLayers
    // Usage: remove all the invisible art layers, recursively
    // Input: document or layer set
    // Return: <none>, all layers that were invisible are now gone
    function removeAllInvisibleArtLayers(obj) {
        for( var i = obj.artLayers.length-1; 0 <= i; i--) {
            try {
                if(!obj.artLayers[i].visible) {
                    obj.artLayers[i].remove();
            catch (e) {
        for( var i = obj.layerSets.length-1; 0 <= i; i--) {
            removeAllInvisibleArtLayers(obj.layerSets[i]);
    // Function: removeAllEmptyLayerSets
    // Usage: find all empty layer sets and remove them, recursively
    // Input: document or layer set
    // Return: empty layer sets are now gone
    function removeAllEmptyLayerSets(obj) {
        var foundEmpty = true;
        for( var i = obj.layerSets.length-1; 0 <= i; i--) {
            if( removeAllEmptyLayerSets(obj.layerSets[i])) {
                obj.layerSets[i].remove();
            } else {
                foundEmpty = false;
        if (obj.artLayers.length > 0) {
            foundEmpty = false;
        return foundEmpty;
    // Function: zeroSuppress
    // Usage: return a string padded to digit(s)
    // Input: num to convert, digit count needed
    // Return: string padded to digit length
    function removeAllInvisible(docRef) {
        removeAllInvisibleArtLayers(docRef);
        removeAllEmptyLayerSets(docRef);
    // Function: exportChildren
    // Usage: find all the children in this document to save
    // Input: duplicate document, original document, export info,
    //        reference to document, starting file name
    // Return: <none>, documents are saved accordingly
    function exportChildren(dupObj, orgObj, exportInfo, dupDocRef, fileNamePrefix) {
        for( var i = 0; i < dupObj.artLayers.length; i++) {
            if (exportInfo.visibleOnly) { // visible layer only
                if (!orgObj.artLayers[i].visible) {
                    continue;
            dupObj.artLayers[i].visible = true;
            var layerName = dupObj.artLayers[i].name;  // store layer name before change doc
            var duppedDocumentTmp = dupDocRef.duplicate();
            if ((png24Index == exportInfo.fileType)||(png8Index == exportInfo.fileType)) { // PSD: Keep transparency
                removeAllInvisible(duppedDocumentTmp);
                //PNGFileOptions
                        if (activeDocument.activeLayer.isBackgroundLayer == false) { //is it anything but a background layer?
                            app.activeDocument.trim(TrimType.TRANSPARENT);
            } else { // just flatten
                duppedDocumentTmp.flatten();
            // Edit
            var docName = app.activeDocument.name;
            // For some reason indexOf fails if we include the '-', so we use 'copy' and decrement the index by 1.
            docName = docName.slice(0, docName.indexOf('copy')-1);
            var fileNameBody = (docName+'_'+layerName).toLowerCase();
            fileNameBody = fileNameBody.replace(/[:\/\\*\?\"\<\>\|]/g, "_");  // '/\:*?"<>|' -> '_'
            if (fileNameBody.length > 120) {
                fileNameBody = fileNameBody.substring(0,120);
            saveFile(duppedDocumentTmp, fileNameBody, exportInfo);
            duppedDocumentTmp.close(SaveOptions.DONOTSAVECHANGES);
            dupObj.artLayers[i].visible = false;
        for( var i = 0; i < dupObj.layerSets.length; i++) {
            if (exportInfo.visibleOnly) { // visible layer only
                if (!orgObj.layerSets[i].visible) {
                    continue;
            var fileNameBody = fileNamePrefix;
            fileNameBody += "_" + zeroSuppress(i, 4) + "s";
            exportChildren(dupObj.layerSets[i], orgObj.layerSets[i], exportInfo, dupDocRef, fileNameBody);  // recursive call
    // Function: objectToDescriptor
    // Usage: create an ActionDescriptor from a JavaScript Object
    // Input: JavaScript Object (o)
    //        object unique string (s)
    //        Pre process converter (f)
    // Return: ActionDescriptor
    // NOTE: Only boolean, string, number and UnitValue are supported, use a pre processor
    //       to convert (f) other types to one of these forms.
    // REUSE: This routine is used in other scripts. Please update those if you
    //        modify. I am not using include or eval statements as I want these
    //        scripts self contained.
    function objectToDescriptor (o, s, f) {
        o = {};
        var d = new ActionDescriptor;
        var l = o.reflect.properties.length;
        d.putString( app.charIDToTypeID( 'Msge' ), s );
        for (var i = 0; i < l; i++ ) {
            var k = o.reflect.properties[i].toString();
            if (k == "__proto__" || k == "__count__" || k == "__class__" || k == "reflect")
                continue;
            var v = o[ k ];
            k = app.stringIDToTypeID(k);
            switch ( typeof(v) ) {
                case "boolean":
                    d.putBoolean(k, v);
                    break;
                case "string":
                    d.putString(k, v);
                    break;
                case "number":
                    d.putDouble(k, v);
                    break;
                default:
                    if ( v instanceof UnitValue ) {
                        var uc = new Object;
                        uc["px"] = charIDToTypeID("#Rlt"); // unitDistance
                        uc["%"] = charIDToTypeID("#Prc"); // unitPercent
                        d.putUnitDouble(k, uc[v.type], v.value);
                    } else {
                        throw( new Error("Unsupported type in objectToDescriptor " + typeof(v) ) );
        return d;
    // Function: descriptorToObject
    // Usage: update a JavaScript Object from an ActionDescriptor
    // Input: JavaScript Object (o), current object to update (output)
    //        Photoshop ActionDescriptor (d), descriptor to pull new params for object from
    //        object unique string (s)
    //        JavaScript Function (f), post process converter utility to convert
    // Return: Nothing, update is applied to passed in JavaScript Object (o)
    // NOTE: Only boolean, string, number and UnitValue are supported, use a post processor
    //       to convert (f) other types to one of these forms.
    // REUSE: This routine is used in other scripts. Please update those if you
    //        modify. I am not using include or eval statements as I want these
    //        scripts self contained.
    function descriptorToObject (o, d, s, f) {
        var l = d.count;
        if (l) {
            var keyMessage = app.charIDToTypeID( 'Msge' );
            if ( d.hasKey(keyMessage) && ( s != d.getString(keyMessage) )) return;
        for (var i = 0; i < l; i++ ) {
            var k = d.getKey(i); // i + 1 ?
            var t = d.getType(k);
            strk = app.typeIDToStringID(k);
            switch (t) {
                case DescValueType.BOOLEANTYPE:
                    o[strk] = d.getBoolean(k);
                    break;
                case DescValueType.STRINGTYPE:
                    o[strk] = d.getString(k);
                    break;
                case DescValueType.DOUBLETYPE:
                    o[strk] = d.getDouble(k);
                    break;
                case DescValueType.UNITDOUBLE:
                    var uc = new Object;
                    uc[charIDToTypeID("#Rlt")] = "px"; // unitDistance
                    uc[charIDToTypeID("#Prc")] = "%"; // unitPercent
                    uc[charIDToTypeID("#Pxl")] = "px"; // unitPixels
                    var ut = d.getUnitDoubleType(k);
                    var uv = d.getUnitDoubleValue(k);
                    o[strk] = new UnitValue( uv, uc[ut] );
                    break;
                case DescValueType.INTEGERTYPE:
                case DescValueType.ALIASTYPE:
                case DescValueType.CLASSTYPE:
                case DescValueType.ENUMERATEDTYPE:
                case DescValueType.LISTTYPE:
                case DescValueType.OBJECTTYPE:
                case DescValueType.RAWTYPE:
                case DescValueType.REFERENCETYPE:
                default:
                    throw( new Error("Unsupported type in descriptorToObject " + t ) );
        if (undefined != f) {
            o = f(o);
    // Function: preProcessExportInfo
    // Usage: convert Photoshop enums to strings for storage
    // Input: JavaScript Object of my params for this script
    // Return: JavaScript Object with objects converted for storage
    function preProcessExportInfo(o) {
        o.tiffCompression = o.tiffCompression.toString();
        o.pdfEncoding = o.pdfEncoding.toString();
        o.targaDepth = o.targaDepth.toString();
        o.bmpDepth = o.bmpDepth.toString();
        return o;
    // Function: postProcessExportInfo
    // Usage: convert strings from storage to Photoshop enums
    // Input: JavaScript Object of my params in string form
    // Return: JavaScript Object with objects in enum form
    function postProcessExportInfo(o) {
        o.tiffCompression = eval(o.tiffCompression);
        o.pdfEncoding = eval(o.pdfEncoding);
        o.targaDepth = eval(o.targaDepth);
        o.bmpDepth = eval(o.bmpDepth);
        return o;
    // Function: StrToIntWithDefault
    // Usage: convert a string to a number, first stripping all characters
    // Input: string and a default number
    // Return: a number
    function StrToIntWithDefault( s, n ) {
        var onlyNumbers = /[^0-9]/g;
        var t = s.replace( onlyNumbers, "" );
        t = parseInt( t );
        if ( ! isNaN( t ) ) {
            n = t;
        return n;
    // End X2L.jsx

  • Making links that show/hide layers?

    Hi all,
    I created an InDesign cs4 file which is pretty much a guide for users of my liveCicle form. I have a bunch of layers in the file.
    I'm trying to make links associated with images that are in its own layers. So when i export the file to pdf and hit certain link, layer associated with that link shows up. I tryed to do this in acrobat 9 pro. I created links, but the problem is that links in non visible layers work behind the scene when i hover over.
    Is there a way to set layer visability in inDesign CS4?
    Thanks in advance

    No you can´t toggle layer visibility with buttons made in indesign. You have to finish it in Acrobat....
    Only way to make something appear or disappear in ID is to use show/hide buttons action...
    You can convert those images you want to show&hide to buttons. Then you can create another buttons to show or hide them.
    If you export as PDF, default state of a button can be hidden...

  • Need to export file with different layers selected automatically

    I have a file with a background and various text layers.
    I want to select each text layer individually and export them to a file, but I don't want to do this manually because it would take a lot of work.
    My question is, how would i tell photoshop to export X numbers of files. Where X=number of text boxes.

    I still don’t quite follow: Should the resulting files combine one of the text-layers with the lowermost layer or display only one of the layers?
    Because I thought Export Layers to Files would do the second.
    Anyway, the following might help, You would have to enter Your intended gif-settings in the Script manually though (see »Photoshop CS4 JavaScript Ref.pdf« or ExtendSctipt Toolkit’s Help > Object Model Viewer for the correct nomenclature for the various options).
    And You should adjust the naming-procedure to Your liking, I didn’t use the actual layer-names to avoid possibly overly long names.
    Paste the following text into a new file in ExtendScript Toolkit (part of Photoshop’s installation) and save it as a jsx-file into Photoshop’s Presets/Scripts-folder.
    After restarting Photoshop theScript should be available under File > Scripts and can be assigned a Keyboard Shortcut directly, recorded into an Action or (in CS4) be used in a Configurator-Panel.
    // saves gif-copies of the backgoud-layer with one of the other layers visible in the same location as the original file;
    // existing files of the same names will be replaced without callback;
    // use it at your own risk;
    #target photoshop
    if (app.documents.length > 0) {
    var myDocument = app.activeDocument;
    // get the name;
    var docName = myDocument.name;
    var basename = docName.match(/(.*)\.[^\.]+$/)[1];
    //get the location;
    var docPath = myDocument.path;
    // get all non-layerset-layers;
    var theLayers = collectLayers (myDocument);
    // gif options;
    var gifOpts = new GIFSaveOptions();
    gifOpts.colors = 256;
    gifOpts.dither = Dither.DIFFUSION;
    gifOpts.ditherAmount = 75;
    gifOpts.forced = ForcedColors.NONE;
    gifOpts.interlaced = false;
    gifOpts.matte = MatteType.WHITE;
    gifOpts.palette = Palette.LOCALSELECTIVE;
    gifOpts.preserveExactColors = true;
    gifOpts.transparency = true
    // hide all but the background layer;
    for (var m = theLayers.length - 1; m > 0; m--) {
    theLayers[m].visible = false
    // save the copies with one additional layer visible each;
    for (var n = theLayers.length - 1; n > 0; n--) {
    theLayers[n].visible = true;
    var layerName = theLayers[n].name;
    // duplicate image before saving to avoid flattening-dialog;
    var thecopy = myDocument.duplicate (thecopy, true);
    thecopy.saveAs((new File(docPath+"/"+basename+"_"+n+".gif")),gifOpts,true);
    thecopy.close(SaveOptions.DONOTSAVECHANGES);
    theLayers[n].visible = false
    ////// function collect all artlayers //////
    function collectLayers (theParent) {
    if (!allLayers) {
    var allLayers = new Array}
    else {};
    for (var m = theParent.layers.length - 1; m >= 0;m--) {
    var theLayer = theParent.layers[m];
    // apply the funtion to layersets;
    if (theLayer.typename == "ArtLayer") {
    allLayers = allLayers.concat(theLayer)
    else {
    allLayers = allLayers.concat(collectLayers(theLayer))
    return allLayers

  • Child component values submitted when parent component not rendered

    This pertains to the standard JSF components, but may carry over into Sun JSC.
    I have a column in a dataTable that contains a checkbox. The rendered attribute on that column is tied to a backing bean property. The column is/is not displayed as appropriate per the value of that property - great.
    Here's the rub: When that column is not rendered and the form is submitted the values for the checkboxes are still being submitted and my data model is being updated for those non-rendered components. Seems like this shouldn't happen, but the real problem is that the values submitted for those checkboxes are always 'false'. Seems like JSF is out of sync in this case in what it does between when the form is loaded and when it is submitted (perhaps it is not loading the values from the data model yet it is updating them on the submit - with garbage).
    To get this to work as I expected I had to set the rendered attribute on the checkbox components to match the rendered attribute on the column that contains them.
    Is there a bug here?

    This pertains to the standard JSF components, but may carry over into Sun JSC.
    I have a column in a dataTable that contains a checkbox. The rendered attribute on that column is tied to a backing bean property. The column is/is not displayed as appropriate per the value of that property - great.
    Here's the rub: When that column is not rendered and the form is submitted the values for the checkboxes are still being submitted and my data model is being updated for those non-rendered components. Seems like this shouldn't happen, but the real problem is that the values submitted for those checkboxes are always 'false'. Seems like JSF is out of sync in this case in what it does between when the form is loaded and when it is submitted (perhaps it is not loading the values from the data model yet it is updating them on the submit - with garbage).
    To get this to work as I expected I had to set the rendered attribute on the checkbox components to match the rendered attribute on the column that contains them.
    Is there a bug here?

Maybe you are looking for