Run the function of the stadium of as a file

Hello guys,.

I make a game in action script.

I have the regular scene (stage) with functions of ActionScript, game initialization etc.,

and external AS files with (assigned to some clip) works

Can I perform the function which is on the stage of this folder?

I tried this:

var host: MovieClip = MovieClip (this.parent.parent);
main.increaseScore ();

this.parent.removeChild (this);

It workes inside a movieclip, but not in the external file (CLASS)...

Thank you very much!

use that newly created class as a class Document (you can set it by clicking on the empty stage and passage to the properties pane, there are small field with a pen top, put the name of your class without the .as endpoint and your file should work.

Tags: Adobe Animate

Similar Questions

  • I can't run the exe to my computer files.

    I can't run the exe to my computer files. The exe extension does not appear in the options of folder of my c: drive so I tried to add, but it will not save I tried to do a system restore, and even that won't work. I think it's a virus, but I can't seem to run to anthing that might help to get rid of it. Very frustrating... Help!

    I am running Windows XP with service pack 2 on a Dell computer

    Have you tried restoring system from a command prompt?

    Otherwise, restart the computer and start typing the key F8, select Safe mode with command option. If you are prompted to select an operating system, use the arrow keys to select the right pair and press ENTER. Log in as administrator or with an account that has administrator credentials.

    At the command prompt, type % systemroot%\system32\restore\rstrui.exe, and then press ENTER. Follow the prompts to restore your computer to an earlier date.

  • Apex 4. Run the procedure to recover my files

    Dear all,

    I experience a problem moving my apex application (sss) to a new server.
    I export demand for 3.2 APEX to APEX 4.0 new
    + transfer of data using a simple DB dump (export).

    Everything will work perfectly except our main application functionality, sitting on the workspace of "HR_PRD" that we have a few problems.

    In our DB schema called "HR_REP" I have a table that stores BLOBs for download a document attached to a record of the employee.
    So I created a package that contains the custom procedure to download the files stored in the table "wr_docs".

    URL = http://sphfrapex01.hopfr.net.fr.ch:8080/apex/HR_PROD.wr_apputil.download_my_file?p_file=3655106341169143


    I can download the file whithout any problems and it appears correctly in the report showing all my files.
    BUT when it tries to download... Unfortunately, access to the file does not work on the new APEX 4.0 platform!

    As this sounds like a simple question 'rights', I did several tests...

    I tried to create a simple procedure on my 'old' server called 'TEST' which simply print a simple text:
    HTP. ("test to print something");

    Here, I granted AUDIENCE to perform this procedure.
    It works well on the APEX 3.2 platform when on the new APEX 4.0, refusal to execute the procedure.

    Can you help me please?
    I'm certainly missing something obvious thanks to the GRANT run the TEST at?

    I granted AUDIENCE, so the appeal should work...


    I have to admit, I'm a bit lost here.

    Thanks in advance for your help.
    Philippe Kilchoer

    Hi Philippe,.

    using EPG to APEX? You may have forgotten to update WWV_FLOW_EPG_INCLUDE_MOD_LOCAL to include your procedure. Take a look on

    http://download.Oracle.com/docs/CD/E14373_01/AppDev.32/e13363/up_dn_files.htm#CJACBEHG

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins

  • Can not run the .exe (not all exe) file

    Hello

    Have a problem when running the .exe file in windows 7.

    When I tried to open a 32-bit in my 64 bit OS setup.exe file, nothing happens at all. But when I tried the first time, a pop-up message displays this "want to re install using recommended settings. But after that, nothing happens. (the problem with only this file). But it works well in the other 32-bit OS. What should I do?

    Hello

    You can check this link troubleshooting steps:

    https://support.Microsoft.com/kb/2688326?WA=wsignin1.0

    Registry warning

    To do: Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    322756 (http://support.microsoft.com/kb/322756/ )

    How to back up and restore the registry in Windows

    I hope this helps.

  • How to run the script to EEM/TCL file

    Hello world

    I need to run the EEM script found in this link

    https://supportforums.Cisco.com/document/75806/interface-input-queue-Mon...

    Can you please point me to a HOWTO to download the file and run it under an interface?

    Thank you

    Federico

    Here is the manual how to run scripts tcl file - http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ios_tcl/configuration/1...

    In short - you download the script to switch via tftp and the tcl implementation with command tclsh interpreter. Then run the command source source

  • Run the PLSQL Script from Batch file

    I am trying to run a PL/SQL script in a batch file in sp1 Windows 7 Prof

    N ° 1) I wrote a simple PL/SQL script:

    --

    -The scope of variables

    --

    DECLARE

    v_sal number (7.2): = 50000;

    v_comm number (7.2): = v_sal *. 20;

    v_message varchar2 (100): = 'eligible for the commission;

    BEGIN

    declare

    v_sal number (7.2): = 50000;

    v_comm number (7.2): = 0;

    v_total_comp number (7.2): = v_sal + v_comm;

    Start

    v_message: = "not committed not" | v_message;

    dbms_output.put_line (' message of sub-block is ' | v_message);

    dbms_output.put_line (' subblock v_comm is ' | v_comm);

    end;

    v_message: = 'seller '. v_message;

    -dbms_output.put_line ('Main block v_total_comp' | v_total_comp); -Error: not visible in the main block

    dbms_output.put_line ('Main block v_comm' | v_comm);

    dbms_output.put_line (' main block message is ' | v_message);

    END;

    /

    Step 2) then I wrote a simple batch TstBatch.bat file

    sqlplus scott/tiger@orcl < PLSqlVarInputTst1.sql > > TstBatch.log

    Step 3) in the BACK of cmd, I tried to run TstBatch.bat

    C: > TstBatch.bat

    The log file tells me that I have connected to Oracle Database 11 g Enterprise Edition Release...

    Then a lot of SQL > SQL > SQL >... 26 times

    Procedue of PL/SQL completed successfully.

    Disconnected from Oracle database

    I also tried running the PLSQL script in SQLPlus:

    SQL: > @PLSqlVarInputTst1.sql

    Tell me the procedure completed successfully.

    QUESTION: So, where is the output of the PL/SQL script?

    Hello

    You must activate the output: Add the following line at the beginning of your PL/SQL script:

    SET SERVEROUT ON

    ...

  • Error PPBM5 when you run the vbscript - old hurt return file

    Hello

    After following all the instructions of PPBM5 to the letter, I received this error message when you finally run the Script of "statistics":

    Line: 121

    Char: 1

    Error: Overflow: ' [number: 1 + 99]'.

    Code: 800A 0006

    Source: Microsoft VBScript runtime error

    I spent a lot of time digging in the old, even markets found some about this same problem with PPBM4 (http://forums.adobe.com/message/2819090#2819090) but nothing works.

    Anyboby have any idea?

    Very appreciated

    I received your data and I suggest that you rerun the test rendering of the timeline with MPE material on. Your current score is not properly may be damaged due to deleting all the files preview. The rest of the scores are perfectly acceptable, so no need to revive that once again.

  • Is there an easy way to group the labview run the engine with an exe file?

    I have a LV exe file I want to run on different computers in our lab test at different times. I know one way to do is to download the runtime engine and instrument drivers I need. My question is can I somehow package the file exe, engine performance and drivers so that they could easily be loaded on any PC with windows 7.

    Thank you.

    In the project window, click with the right button on "Peculiarities of building" and select new > Installer.

  • I have an interactive PDF form with buttons that run the Script - Action - Up mouse - file &gt; save as.

    Works fine on the desktop. Customer now has this on their website and the buttons save as now do not work in different browsers... IE 8, Chrome, etc. Any suggestions?

    Hello Cara,

    Please refer to this link Why doesn't the submit button work on my PDF form?.

    Kind regards

    Nicos

  • Run the script in photoshop indesign plugin

    Hello

    first of all, sorry for my English, second I am new in indesign plugins creation (before I made some scripts)...

    I would like to know if it is possible to create a kind of indesign plugin which can run the script on specific psd file photoshop.

    If it isn't, you can create the program that allows you to control the indesign and photoshop?

    I don't know where to start...

    Thank you.

    ExtendScript has a path called "BridgeTalk" to call scripts in applications.

    Your C++ plugin, you should first invoke a script in InDesign and then using BridgeTalk remotely invoke other applications.

    There are some documents on BridgeTalk in the Guide of the JavaScript tools available in the Help menu of ESTK.

    There was also some related discussions and examples in the forum script.

  • ASP - function Remote - error: cannot run the trigger

    Hello

    I tried to get my macros being run by a remote server.

    It's my function file remote named "remote_test_pc.asp":

    framework integrated; then

    conf t

    interface $INTERFACE

    Description macro $TRIGGER

    PC-VoIP-Port Description

    switchport access vlan $ACCESS_VLAN

    switchport mode access

    switchport vlan voice $VOICE_VLAN

    broadcast storm control level 1 k pps

    multicast storm-control level 2 k pps

    Storm-control action trap

    no event log status link

    bandwidth share SRR-queue 10 10 5 75

    form of bandwidth SRR-queue 10 0 0 0

    priority queue

    MLS qos trust dscp

    no link-status of snmp trap

    spanning tree portfast

    spanning tree enable bpduguard

    service-policy input PO_TRUST-PHONE

    output

    end

    FI

    framework integrated; then

    conf t

    interface $INTERFACE

    No description of macro

    Description by DEFAULT-CONFIG

    switchport mode access

    switchport access vlan 999

    broadcast storm control level 1 k pps

    multicast storm-control level 2 k pps

    Storm-control action trap

    spanning tree portfast

    No switchport voice vlan $VOICE_VLAN

    bandwidth share SRR-queue 10 10 5 75

    form of bandwidth SRR-queue 10 0 0 0

    priority queue

    MLS qos trust dscp

    no service-policy input PO_TRUST-PHONE

    FI

    output

    end

    FI

    And this is my config on the switch to mac-group and the macro:

    !

    macro auto Test group address-mac-PC

    Mac 0019.9990.5509 address list

    !

    comprehensive treatment of the auto macro

    macro auto control global detection mac address

    !

    automatic macro execution Test-PC remote ftp://192.168.1.11/remote_test_pc.asp ACCESS_VLAN = 123 VOICE_VLAN = 127

    !

    When I plug this workstation for the following syslog messages:

    Switch #.

    Remote_test_pc.asp loading!

    [OK - 1702/4096 bytes]

    Enter configuration commands, one per line.  End with CNTL/Z.

    Switch con0 is now available

    Press RETURN to get started.

    Error: Cannot run the trigger Test-PC, please check trigger exists and corresponds to the valid function

    26 September 11:45:37.755: % SYS-5-CONFIG_I: configured from console by console

    26 September 11:45:37.772: % AUTOSMARTPORT-5-INSERT: tty0(user id:): dispositif avec adresse mac 0019.9990.5509 détectées sur l'interface FastEthernet0/3, exécuté le Test-PC) Message

    Switch #.

    The port works as it should, but I wonder about the error message.

    The switch is 2960 with IOS 12.2 (58) SE2.

    Can someone explain what this means?

    Thank you very much!

    Sven

    Hi Sven,

    I think that you are not constantly getting this message... Ignore it for now... That have no functional impact... This has been supported in 15.0 (1) SE.

    Thank you

    Ankur-

  • Check if the layer is visible and run a function according to the answer

    Hey guys,.

    I have a question that has been racking my brain these days.

    If I want to run a script when I press a button that will check if a specific layer is visible. If so, it performs another function that shows additional layers. If the specific layer is not visible, it checks the next layer to see if it is visible. This continues until it checks all the necessary layers and is a visible layer.

    Here's the script in question:

    #target photoshop

    //

    clthTopTt.jsx

    //

    cTID = function (s) {return app.charIDToTypeID (s) ;};}

    sTID = function (s) {return app.stringIDToTypeID (s) ;};}

    //

    //==================== actnStd ==============

    //

    function checkactnStd() {}

    Select

    function step 1 (enabled, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "actnStd");

    DESC1.putReference (cTID ('null'), ref1);

    DESC1.putBoolean (cTID ('MkVs'), false);

    var list1 = new ActionList();

    List1.putInteger (17011);

    DESC1.putList (list1, cTID ('LyrI'));

    executeAction (desc1 cTID ('slct'), dialogMode);

    };

    If

    step2 function (activated, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    DESC1.putEnumerated (cTID ('null'), ('Cndt') cTID, cTID ('Ahsvs'));

    var ref1 = new ActionReference();

    Ref1.putName (cTID ('Actn'), 'select actnStd');     <-if the actnStd layer is visible, rather than performing this action, it runs the function selectactnStd().

    Ref1.putName (cTID ('ASet'), 'clthTopTt');

    DESC1.putReference (cTID ('then'), ref1);

    ref2 var = new ActionReference();

    ref2.putName (cTID ('Actn'), "check actnWlk");  <-if the actnStd layer is NOT visible, it executes the next layer checks (via the function checkactnWlk(). )

    ref2.putName (cTID ('ASet'), 'clthTopTt');

    DESC1.putReference (cTID ('else'), ref2);

    executeAction (desc1 sTID ('conditional'), dialogMode);

    };

    Step1();      Select

    Step2();      If

    };

    function selectactnStd() {}

    Show

    function step 1 (enabled, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var list1 = new ActionList();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "topStdTt");

    Ref1.putName (cTID ("'Lyr"), "topMskStd");

    List1.putReference (Ref1);

    DESC1.putList (list1, cTID ('null'));

    executeAction (cTID ("'Shw"), desc1, dialogMode);

    };

    Hide

    step2 function (activated, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var list1 = new ActionList();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "topWlkTt");

    Ref1.putName (cTID ("'Lyr"), "topMskWlk");

    Ref1.putName (cTID ("'Lyr"), "topRunTt");

    Ref1.putName (cTID ("'Lyr"), "topMskRun");

    List1.putReference (Ref1);

    DESC1.putList (list1, cTID ('null'));

    executeAction (desc1 cTID ("Hd"), dialogMode);

    };

    Step1();      Show

    Step2();      Hide

    };

    //

    //==================== actnWlk ==============

    //

    function checkactnWlk() {}

    Select

    function step 1 (enabled, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "actnWlk");

    DESC1.putReference (cTID ('null'), ref1);

    DESC1.putBoolean (cTID ('MkVs'), false);

    var list1 = new ActionList();

    List1.putInteger (17012);

    DESC1.putList (list1, cTID ('LyrI'));

    executeAction (desc1 cTID ('slct'), dialogMode);

    };

    If

    step2 function (activated, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    DESC1.putEnumerated (cTID ('null'), ('Cndt') cTID, cTID ('Ahsvs'));

    var ref1 = new ActionReference();

    Ref1.putName (cTID ('Actn'), 'select actnWlk');

    Ref1.putName (cTID ('ASet'), 'clthTopTt');

    DESC1.putReference (cTID ('then'), ref1);

    ref2 var = new ActionReference();

    ref2.putName (cTID ('Actn'), "check actnRun");

    ref2.putName (cTID ('ASet'), 'clthTopTt');

    DESC1.putReference (cTID ('else'), ref2);

    executeAction (desc1 sTID ('conditional'), dialogMode);

    };

    Step1();      Select

    Step2();      If

    };

    function selectactnWlk() {}

    Show

    function step 1 (enabled, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var list1 = new ActionList();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "topWlkTt");

    Ref1.putName (cTID ("'Lyr"), "topMskWlk");

    List1.putReference (Ref1);

    DESC1.putList (list1, cTID ('null'));

    executeAction (cTID ("'Shw"), desc1, dialogMode);

    };

    Hide

    step2 function (activated, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var list1 = new ActionList();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "topStdTt");

    Ref1.putName (cTID ("'Lyr"), "topMskStd");

    Ref1.putName (cTID ("'Lyr"), "topRunTt");

    Ref1.putName (cTID ("'Lyr"), "topMskRun");

    List1.putReference (Ref1);

    DESC1.putList (list1, cTID ('null'));

    executeAction (desc1 cTID ("Hd"), dialogMode);

    };

    Step1();      Show

    Step2();      Hide

    };

    //

    //==================== actnRun ==============

    //

    function checkactnRun() {}

    Select

    function step 1 (enabled, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "actnRun");

    DESC1.putReference (cTID ('null'), ref1);

    DESC1.putBoolean (cTID ('MkVs'), false);

    var list1 = new ActionList();

    List1.putInteger (17013);

    DESC1.putList (list1, cTID ('LyrI'));

    executeAction (desc1 cTID ('slct'), dialogMode);

    };

    If

    step2 function (activated, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    DESC1.putEnumerated (cTID ('null'), ('Cndt') cTID, cTID ('Ahsvs'));

    var ref1 = new ActionReference();

    Ref1.putName (cTID ('Actn'), 'select actnRun');

    Ref1.putName (cTID ('ASet'), 'clthTopTt');

    DESC1.putReference (cTID ('then'), ref1);

    ref2 var = new ActionReference();

    ref2.putName (cTID ('Actn'), "check actnAc");

    ref2.putName (cTID ('ASet'), 'clthTopTt');

    DESC1.putReference (cTID ('else'), ref2);

    executeAction (desc1 sTID ('conditional'), dialogMode);

    };

    Step1();      Select

    Step2();      If

    };

    function selectactnRun() {}

    Show

    function step 1 (enabled, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var list1 = new ActionList();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "topRunTt");

    Ref1.putName (cTID ("'Lyr"), "topMskRun");

    List1.putReference (Ref1);

    DESC1.putList (list1, cTID ('null'));

    executeAction (cTID ("'Shw"), desc1, dialogMode);

    };

    Hide

    step2 function (activated, withDialog) {}

    If (enabled! = undefined & &! activated)

    return;

    var dialogMode = (withDialog? DialogModes.ALL: DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var list1 = new ActionList();

    var ref1 = new ActionReference();

    Ref1.putName (cTID ("'Lyr"), "topStdTt");

    Ref1.putName (cTID ("'Lyr"), "topMskStd");

    Ref1.putName (cTID ("'Lyr"), "topWlkTt");

    Ref1.putName (cTID ("'Lyr"), "topMskWlk");

    List1.putReference (Ref1);

    DESC1.putList (list1, cTID ('null'));

    executeAction (desc1 cTID ("Hd"), dialogMode);

    };

    Step1();      Show

    Step2();      Hide

    };

    After he checks the last layer, then end the script.

    'clthTopTtLoop.jsx '.

    EXPRESSIONS OF FOLKLORE

    Any help is appreciated seriously. Thank you guys!

    Hey guys, I promised that I would update this post to help others if I got the answer, so here:

    Firstly, the developer has created a function to automatically get the layer. I had problems to find ways to select layers, especially because the layers were nested in groups inside groups. This helped solve that. The function was this:

    function selectLayer(name) {
      var desc = new ActionDescriptor();
      var ref = new ActionReference();
      ref.putName( charIDToTypeID('Lyr '), name );
      desc.putReference( charIDToTypeID('null'), ref );
      desc.putBoolean( charIDToTypeID('MkVs'), false );
      executeAction( charIDToTypeID('slct'), desc, DialogModes.NO );
      return
    };
    

    Then call the layer using layer real name (assuming that your layer names are unique. If they aren't, you'll find yourself only to select the first layer with the same specific name) throughout your script file.

    IE. In my case, selectLayer ("actnStd"); or selectLayer ("actnWlk");

    You then set the visibility by using the following code:

    // show
    app.activeDocument.activeLayer.visible = true;
    // hide
    app.activeDocument.activeLayer.visible = false;
    

    Then use a function to check whether a layer is visible. If the layer is visible, you run the function show/hide layers respective:

    function CheckactnWlk() {
      selectLayer("actnWlk");
      if  (app.activeDocument.activeLayer.visible == true) {
      SelectactnWlk()
      }
      else  {
      CheckactnRun();
      }
    };
    

    So in the end, the final script looks like this:

    #target photoshop
    
    app.bringToFront();
    CheckactnStd();
    
    function CheckactnStd() {
      selectLayer("actnStd");
      if  (app.activeDocument.activeLayer.visible == true) {
      SelectactnStd()
      }
      else  {
      CheckactnWlk();
      }
    };
    
    function SelectactnStd() {
      selectLayer("topMskStd");
      app.activeDocument.activeLayer.visible = true;
    
      selectLayer("topStdTt");
      app.activeDocument.activeLayer.visible = true;
    
      selectLayer("topWlkTt");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topMskWlk");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topRunTt");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topMskRun");
      app.activeDocument.activeLayer.visible = false;
    }; 
    
    function CheckactnWlk() {
      selectLayer("actnWlk");
      if  (app.activeDocument.activeLayer.visible == true) {
      SelectactnWlk()
      }
      else  {
      CheckactnRun();
      }
    };   
    
    function SelectactnWlk() {
      selectLayer("topMskStd");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topStdTt");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topWlkTt");
      app.activeDocument.activeLayer.visible = true;
    
      selectLayer("topMskWlk");
      app.activeDocument.activeLayer.visible = true;
    
      selectLayer("topRunTt");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topMskRun");
      app.activeDocument.activeLayer.visible = false;
    
    };
    
    function CheckactnRun() {
      selectLayer("actnRun");
      if  (app.activeDocument.activeLayer.visible == true) {
      SelectactnRun()
      }
      else  {
      alert ('There is no Selected Layer', 'Please select a layer', 0);
      }
    };
    
    function SelectactnRun() {
      selectLayer("topMskStd");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topStdTt");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topWlkTt");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topMskWlk");
      app.activeDocument.activeLayer.visible = false;
    
      selectLayer("topRunTt");
      app.activeDocument.activeLayer.visible = true;
    
      selectLayer("topMskRun");
      app.activeDocument.activeLayer.visible = true;
    
    };
    
    function selectLayer(name) {
            var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putName( charIDToTypeID('Lyr '), name );
           desc.putReference( charIDToTypeID('null'), ref );
           desc.putBoolean( charIDToTypeID('MkVs'), false );
           executeAction( charIDToTypeID('slct'), desc, DialogModes.NO );
           return
    };
    
    app.preferences.rulerUnits = rUnit;
    app.preferences.typeUnits = tUnit;
    
    selectLayer("actnStd");
    

    Guys good luck! Now to find how to select random layers via the script.

  • run the Idoc function in the data file returned by the service of GET_FILE

    Hello

    I'm new to this forum, so thank you in advance for any help and forgive me of any error with the post.

    I'm trying to force the execution of a custom Idoc function in a data file Complutense University of MADRID, when this data file is requested from the University Complutense of MADRID through service GET_FILE.

    The custom Idoc function is implemented as a filter of the computeFunction type. One of the datafile has appealed to my custom Idoc function:
    * < name wcm:element = "MainText" > [! - $myIdocFunction ()-] < / wcm:element > *.

    The data file is then downloaded with CRMI via service GET_FILE, but the Idoc function is not called.

    I tried to implement another filter Idoc type sendDataForServerResponse or sendDataForServerResponseBytes, that store objects cached responseString and responseBytes, personalized in order to look for any call to my function in the response object Idoc, eventually run the Idoc function and replace the output of the Idoc in the response. But this kind of filter will never run.

    The Idoc function myIdocFunction is executed correctly when I use WCM_PLACEHOLDER service to get a RegionTemplate (file .hcsp) associated with the data file. In this case, the fact RegionTemplate refers to the element of "MainText" data file with <!-$wcmElement ("MainText")->. But I need to make it work also with service GET_FILE.

    I use version 11.1.1.3.0 UCM.

    Any suggestion?
    Thank you very much
    Francesco

    Hello

    Thank you very much for your help and sorry for this late reply.

    Your trick to activate the complete detailed follow-up was helpful, because I found out I could somehow use the filter prepareForFileResponse for my purpose and I could also have related to the implementation of the native filter pdfwatermark. PdfwFileFilter .

    I managed to set up a filter whose purpose is to force the Idoc assessment of a predefined list of functions Idoc on the output returned by the service GET_FILE. Then I paste the code I have written, in which case it may be useful for other people. In any case, know that this filter can cause performance problems, which must be considered carefully in your own use cases.

    First set the filter in the set of filters in file .hda from your device:

    Filters @ResultSet

    4

    type

    location

    parameter

    loadOrder

    prepareForFileResponse

    mysamplecomponent. ForceIdocEvaluationFilter

    null

    1

    @end

    Here is a simplified version of the implementation of the filter:

    / public class ForceIdocEvaluationFilter implements FilterImplementor {}

    public int doFilter (workspace ws, linking DataBinder, ExecutionContext ctx) survey DataException, ServiceException {}

    Service string = binder.getLocal ("IdcService");

    String dDocName = binder.getLocal ("dDocName");

    Boolean isInternalCall = Boolean.parseBoolean (binder.getLocal ("isInternalCall"));

    If ((ctx instanceof FileService) & service.equals ("GET_FILE") &! isInternalCall) {}

    FileService fileService = ctx (FileService);

    checkToForceIdocEvaluation (dDocName, fileService);

    }

    continue with other filters

    Back to CONTINUE;

    }

    ' Private Sub checkToForceIdocEvaluation (String dDocName, FileService fileService) throws DataException, ServiceException {}

    PrimaryFile file = IOUtils.getContentPrimaryFile (dDocName);

    Ext = FileUtils.getExtension (primaryFile.getPath ());

    If (ext.equalsIgnoreCase ("xml")) {}

    forceIdocEvaluation (primaryFile, fileService);

    }

    }

    forceIdocEvaluation Private Sub (file primaryFile FileService fileService) throws ServiceException {}

    String multiplesContent = IOUtils.readStringFromFile (primaryFile);

    Replacement ForceIdocEvaluationPatternReplacer = new ForceIdocEvaluationPatternReplacer (fileService);

    String replacedContent = replacer.replace (fileContent);

    If (replacer.isMatchFound ()) {}

    setNewOutputOfService (fileService, replacedContent);

    }

    }

    ' Private Sub setNewOutputOfService (FileService fileService, String newOutput) throws ServiceException {}

    File newOutputFile = IOUtils.createTemporaryFile ("xml");

    IOUtils.saveFile (newOutput, newOutputFile);

    fileService.setFile (newOutputFile.getPath ());

    }

    }

    public class IOUtils {}

    public static getContentPrimaryFile (String dDocName) survey DataException, ServiceException {queue

    DataBinder serviceBinder = new DataBinder();

    serviceBinder.m_isExternalRequest = false;

    serviceBinder.putLocal ("IdcService", "GET_FILE");

    serviceBinder.putLocal ("dDocName", dDocName);

    serviceBinder.putLocal ("RevisionSelectionMethod", "Latest");

    serviceBinder.putLocal ("isInternalCall", "true");

    ServiceUtils.executeService (serviceBinder);

    String vaultFileName = DirectoryLocator.computeVaultFileName (serviceBinder);

    String vaultFilePath = DirectoryLocator.computeVaultPath (vaultFileName, serviceBinder);

    return new File (vaultFilePath);

    }

    public static String readStringFromFile (File sourceFile) throws ServiceException {}

    try {}

    return FileUtils.loadFile (sourceFile.getPath (), null, new String [] {"UTF - 8"});

    } catch (IOException e) {}

    throw new ServiceException (e);

    }

    }

    Public Shared Sub saveFile (String source, destination of the file) throws ServiceException {}

    FileUtils.writeFile (source, destination, "UTF - 8", 0, "is not save file" + destination);

    }

    public static getTemporaryFilesDir() leader throws ServiceException {}

    String idcDir = SharedObjects.getEnvironmentValue ("IntradocDir");

    String tmpDir = idcDir + "custom/MySampleComponent";

    FileUtils.checkOrCreateDirectory (tmpDir, 1);

    return new File (tmpDir);

    }

    public static createTemporaryFile (String fileExtension) leader throws ServiceException {}

    try {}

    The file TmpFile = File.createTempFile ("tmp", "." + fileExtension, IOUtils.getTemporaryFilesDir ());

    tmpFile.deleteOnExit ();

    return tmpFile;

    } catch (IOException e) {}

    throw new ServiceException (e);

    }

    }

    }

    Public MustInherit class PatternReplacer {}

    Private boolean matchFound = false;

    public string replace (CharSequence sourceString) throws ServiceException {}

    Matcher m = expand () .matcher (sourceString);

    StringBuffer sb = new StringBuffer (sourceString.length ());

    matchFound = false;

    While (m.find ()) {}

    matchFound = true;

    String matchedText = m.group (0);

    String replacement = doReplace (matchedText);

    m.appendReplacement (sb, Matcher.quoteReplacement (replacement));

    }

    m.appendTail (sb);

    Return sb.toString ();

    }

    protected abstract String doReplace(String textToReplace) throws ServiceException;

    public abstract Pattern getPattern() throws ServiceException;

    public boolean isMatchFound() {}

    Return matchFound;

    }

    }

    SerializableAttribute public class ForceIdocEvaluationPatternReplacer extends PatternReplacer {}

    private ExecutionContext ctx;

    idocPattern private model;

    public ForceIdocEvaluationPatternReplacer (ExecutionContext ctx) {}

    This.ctx = ctx;

    }

    @Override

    public getPattern() model throws ServiceException {}

    If (idocPattern == null) {}

    List of the functions = SharedObjects.getEnvValueAsList ("forceidocevaluation.functionlist");

    idocPattern = IdocUtils.createIdocPattern (functions);

    }

    Return idocPattern;

    }

    @Override

    protected String doReplace(String idocFunction) throws ServiceException {}

    Return IdocUtils.executeIdocFunction (ctx, idocFunction);

    }

    }

    public class IdocUtils {}

    public static String executeIdocFunction (ExecutionContext ctx, String idocFunction) throws ServiceException {}

    idocFunction = convertIdocStyle (idocFunction, IdocStyle.ANGULAR_BRACKETS);

    PageMerger activeMerger = (PageMerger) ctx.getCachedObject("PageMerger");

    try {}

    String output = activeMerger.evaluateScript (idocFunction);

    return output;

    } catch (Exception e) {}

    throw the new ServiceException ("cannot run the Idoc function" + idocFunction, e);

    }

    }

    public enum IdocStyle {}

    ANGULAR_BRACKETS,

    SQUARE_BRACKETS

    }

    public static String convertIdocStyle (String idocFunction, IdocStyle destinationStyle) {}

    String result = null;

    Switch (destinationStyle) {}

    case ANGULAR_BRACKETS:

    result = idocFunction.replace ("[!-$","<$").replace("--]", "$="">" "]");

    break;

    case SQUARE_BRACKETS:

    result = idocFunction.replace ("<$", "[!--$").replace("$="">", "-] '");

    break;

    }

    return the result;

    }

    public static model createIdocPattern ( list idocFunctions) throws ServiceException {}

    If (idocFunctions.isEmpty ()) throw new ServiceException ("list of Idoc functions to create a template for is empty");

    StringBuffer patternBuffer = new StringBuffer();

    model prefix

    patternBuffer.append ("(\\ [\\!--|)")<>

    Features GOLD - ed list

    for (int i = 0; i)

    patternBuffer.append (idocFunctions.get (i));

    If (i

    }

    model suffix

    patternBuffer.append ("") (. +?) (--\\]|\\$>)");

    String pattern = patternBuffer.toString ();

    log.trace ("Functions return Idoc model", model);

    Return Pattern.compile (pattern);

    }

    }

    public class ServiceUtils {}

    Private Shared Workspace getSystemWorkspace()}

    Workspace workspace = null;

    WsProvider provider = Providers.getProvider ("SystemDatabase");

    If (null! = wsProvider) {}

    workspace = wsProvider.getProvider ((workspace));

    }

    Returns the workspace;

    }

    getFullUserData private static UserData (String userName, cxt ExecutionContext, workspace ws) throws DataException, ServiceException {}

    If (null == ws) {}

    WS = getSystemWorkspace();

    }

    UserData userData is UserStorage.retrieveUserDatabaseProfileDataFull (name of user, ws, null, cxt, true, true);.

    ws.releaseConnection ();

    return userData;

    }

    public static executeService (DataBinder binder) Sub survey DataException, ServiceException {}

    get a connection to the database

    Workspace workspace = getSystemWorkspace();

    Look for a value of IdcService

    String cmd = binder.getLocal ("IdcService");

    If (null == cmd) {}

    throw new DataException("!csIdcServiceMissing");

    }

    get the service definition

    ServiceData serviceData = ServiceManager.getFullService (cmd);

    If (null == serviceData) {}

    throw new DataException (LocaleUtils.encodeMessage ("!")) csNoServiceDefined", null, cmd));

    }

    create the object for this service

    The service = ServiceManager.createService (serviceData.m_classID, workspace, null, Binder, serviceData);

    String userName = 'sysadmin ';

    UserData fullUserData = getFullUserData (username, service, workspace);

    service.setUserData (fullUserData);

    Binder.m_environment.put ("REMOTE_USER", username);

    try {}

    init service do not return HTML

    service.setSendFlags (true, true);

    create the ServiceHandlers and producers

    service.initDelegatedObjects ();

    do a safety check

    service.globalSecurityCheck ();

    prepare for service

    service.preActions ();

    run the service

    service.doActions ();

    } catch (ServiceException e) {}

    } {Finally

    service.cleanUp (true);

    If (null! = workspace) {}

    workspace.releaseConnection ();

    }

    }

    }

    }

  • Problem running the function mouseup

    Hi all... I try to get something very simple to work

    I draw a rewctangle and then "On mouseUp", I run the code "test()"

    Then, in the scene/creationComplete, this function I

    function test(){}

    Alert ("Hello");

    }

    Nothing seems to happen, im trying to do something a little more complex then, but for now all I want to do is be able to perform functions from Adobe Edge.

    My understanding is that creationComplete is where I put functions that can be accessed from anywhere in my composition...

    Thanks for the research!...

    Justin.


    OK Justin. Try the attached example.

    Thank you

    Soline

  • Cannot run the following statement in the main function of the constructor

    Hello

    I have a scipt main.as where I put the following in the main function of the constructor.

    L1: LoginScreen.enterBtn.addEventListener (MouseEvent.MOUSE_DOWN, checkLogin);

    L2: map.visible = true;

    It will perform the function checkLogin but blocked in line 1. How can I run the line 2?

    unless there is an error, line2 is running.

Maybe you are looking for

  • Unable to connect to the account "icloudmail".

    I recently started to get this message when I try to send or check mail from my account iCloud on my Macbook Pro. I'm asked my password, but I get the error message "Unable to verify the account name or password". My iPhone has no problem with the sa

  • error 646

    For the last month every time I try to use windows update get an error code 646 and it says that windows has encounter an error unknown. and sound while downloading kb969682.

  • slow Outlook express 2000

    My Outlook Express 2000 became very slow.  I deleted the old emails (deleted and sent) - but there is no change. Often, I have to restart the computer just to look at email, one at a time. I am running Windows XP 2002

  • My battery gauge ceased to show

    My battery meter in my system tray/notification area ceased to show. My permissions are set to administrator (I'm the only person who uses this laptop) and I still cannot choose the option to 'power' in the properties of the notification area. Any ad

  • Relocation of Adobe

    Nice day.We bought all new MAC PC. How to reinstall Adobe CS5.1?Thank you.Mark