Create Sprite with Script?

Is there a way to create sprites programmatically using JavaScript (or Lingo)? I know that you can replace the cast member a sprite on the fly, but I would like to create the actual sprite in the code. Any thoughts?

Yes. You can use the commands puppetSprite() or makeScriptedSprite()

Tags: Director

Similar Questions

  • Create hyperlinks with script, without increase of large size and treatment of the BP reqs resulting?

    Quick Summary: I have a script as part of a process involving a lengthy document of data merge base that creates hyperlinks by using doc.hyperlinkURLDestinations.add (). The script is simply extracted from text into clickable hyperlinks.

    The problem is, the final PDF files that emerge from this process are 300% the size of a PDF file without the running script and are very slow to deal with. Most of that extra weight from an increase of 740 000% crazy (!) in the amount of data used for "info-Structure" (and that's after you run the version with hyperlinks through the Acrobat PDF Optimizer).

    The amount of the data structure in the PDF files with hyperlinks ends up being more than twice the size of the entire file PDF files without hyperlinks added. There is also a substantial increase in the size of the "the cross reference Table.

    This sharp increase in weight becomes a quick and simple process which takes a few minutes in a slow winding which takes hours, to the creation of files with a very slow pace inflated in a process that is prone to crashing and not.

    I hope for another way to create hyperlinks that adds all this weight.

    --------------------------------

    Details: Here is my current process. It works fine except step 2 causes the final size of the PDF file and the time required for the execution of other processes to increase massively. I know there are different ways to implement hyperlinks in a PDF document - I hope that there is a different approach, that I can use to step 2 which avoids this massive expansion.

    The goal is to create 600 2 PDF pages from an indesign template using the fusion of data, with each PDF with a file name that reflects reviews and live hyperlinks which vary from one record to the next. Here is my current process (for analysis comparative, the machine is a Mac Pro, Lion, CS6, with RAM 6gbs, and all files are on a disk HARD space, no transfer of data on all networks):

    1. Implement an INDD 2 pages with placeholders for merging data and spreadsheet.
    2. Create merged INDD, import hypertext links and other content as text, then run this script in InDesign that makes hyperlinks using live doc.hyperlinkURLDestinations.add ()
    3. Export a PDF to 1 200 PDF page - file > export if step 2 was made, or the merger of data tool if it wasn't.
      • Without step 2: the PDF file is about 110mbs and takes a few minutes to create.
      • Step 2: the PDF file is about 170mbs and takes over an hour and a half to create - I do not know exactly how long I ended up leaving running from one day to the next, but he had already run 1: 20 p.m. when I left and doesn't look close to finishing.
    4. Run this script in Acrobat to chop the PDF into segments of 2 pages with names based on worksheet data.
      • Without step 2: the process takes about quarter of an hour, slightly faster than a secondcreation of PDF files, and PDF files are 700kbs.
      • Step 2: the process crashes after about 10 PDF files and takes minutes to produce each one. Even if it did not freeze, it should be about 25 hours to do all of them.
      • In step 2 and then reducing the PDF to 45mbs through optimizer PDF Acrobat and 'save in reduced format' to cut, backward, compatibility, the process takes about 4 hours, producing a PDF every 20-30 seconds, and PDF files are around 3 MB each. Through to watch the process, almost all of the extra time taken comes from step "backup PDF... "for each of them.

    Each PDF 2 pages has 14 or 15 of the hyperlinks. I do not understand how the 14 and 15 of the hyperlinks can translate into an additional 2mbs of "" and something like the processing time of more than 3500% to create each PDF file.

    Can someone suggest modifications to the script in step three, which could avoid all this overhead? Here's the complete script for convenience:

    app.findGrepPreferences = app.changeGrepPreferences = null;

    var doc = app.activeDocument;

    app.findGrepPreferences.findWhat = '(http://.*$|https://.*$)';

    var objs = doc.findGrep();

     

    for (var i = 0; i < objs.length; i++) {

        var currTarget  = objs[i];

        var lnkDest = doc.hyperlinkURLDestinations.add(currTarget.texts[0].contents);

        var lnkSrc = doc.hyperlinkTextSources.add(currTarget);

        var lnk = doc.hyperlinks.add(lnkSrc, lnkDest);

    }

    alert('Processed '+objs.length+' hyperlinks');

    Edit - Here is a side-by-side comparison of the "Use of space Audit" tool optimizer based on CSSTidy Acrobat PDF, showing where the hyperlinks add volume. I scored two sharp increases in red...

    acrobat-audit.png

    .. .so there is a massive increase going crazy in the size of the info "Structure", a tiny mbs 0.000238 to 1.76 MB - two and a half times the size of the original file, just on 'info Structure. It's a 740 000% increase...

    There is also a strong increase in fat in the cross reference table, 0,0046 mbs to 0.427 mbs - table of cross-references in the PDF with hyperlinks is more than half the size of the original file.

    The only differences between two files PDF's, we have 14 clickable hyperlinks attached to existing excerpts of the text (the "hyperlinks" are from a PDF file that comes with living aggressive optimization PDF and images are so much smaller).

    So it turns out the source of the problem was the document tags.

    Make sure that the PDF file is not created as a PDF by InDesign Tagged, and it behaves. I don't know what is it about hyperlinks and marking that makes it swell massively, but it does.

  • Create lable with script

    I'm new to Flex and I want to create a form that has a number of XML entries. When the application is launched, it would create a label for each input XML and fill out the label with the name of the XML input.

    I work where I call on each regardless of the label with only a test of 4 input XML, but I would do it without manually place each label with a greater number.

    In pseudocode, I would do that in html by:
    for every XML element
    Create the new label (or text box)
    assign the lable with the content of the XML element
    the order of the day XML

    Is there an equivalent to that in Flex2?

    I think I found my answer. MX:Repeater is what I needed. Thanks anyway.

  • I created a Javascript script that adds a watermark on the document action "paper print".  This works in Acrobat Pro, but does not work in the drive.

    I created a Javascript script that adds a watermark on the document action "paper print".  This works in Acrobat Pro, but does not work in the drive.  I am a novice using Javascript, so what am I doing wrong?

    Cannot use either addWatermarkFromFile or addWatermarkFromText methods of document with player as shown in the documentation. You can hide/display the form fields and the existing layers, so consider this approach.

  • How to create an installation script to support objects

    Guys please help with this I have been through Google all day but with no luck, I moved that the workspace to the production environment and application as well, but the thing is the tables using the app has not been moved with the application. On the assumption of the objects in the application page, I selected Yes in the include supporting objects option. Does anyone know how I could create an installation script to create the tables as well. ?

    rhisingh,

    Read documentation Application Deployment

    See also related book ORACLE APPLICATION EXPRESS SUPPORTING OBJECTS

  • We use Flash Pro CC creating animations with legends and export to html 5.  We must translate the captions in other languages. How can we download translation of texts in our flash animations so we can use them in html5 using CreateJS?

    We use Flash Pro CC creating animations with legends and export to html 5.  We must translate the captions in other languages. How can we download translation of texts in our flash animations so we can use them in html5 using CreateJS?  I use the Flash on a Mac OSX 10.10.3

    Are you familiar with JavaScript?

    It does not completely answer your question, but the text displayed on the screen from any language (ActionScript/CreateJS / [insert the programming language]) generally all following the same path. Each language has a file stored in some form of key = value style, named through the language and the country of your choice, for example en_US.json

    Any language would allow the user to choose regional settings. The application would then grab the appropriate file and everywhere where the text is needed, the script must be using a (usually global or singleton) variable/service that can get the text of the requested key.

    for example if I wanted a user to have a confirmation of dialogue who said 'are you sure?"with buttons for 'Yes' and 'No', I would have (for me), an Englishman, USA base file en_US.json with these values, for example:

    en_US. JSON example:

    {

    'CONFIRM_YES_NO': ' are you sure?

    'YES': '' Yes. ''

    'NO': 'no '.

    }

    Then you use simply JS/AJAX to read this file. You analyze, or simply JSON decode in an object, or manually, depending on what suits your needs. When you want to display any text, you use the object (variable, maintenance, etc.) you have stored these values.

    for example calling to display function confirm dialogue:

    Nickname... but if you understand...

    and this comes from jQuery UI (see here)

    function confirmDialog() {}

    $(«#dialog-confirmer»).dialog({)

    Title: LocalizationObject ['CONFIRM_YES_NO'],

    buttons:]

    {

    text: LocalizationObject ["YES"],

    Click: function() {/ / do something for 'yes '.

    }

    {

    text: LocalizationObject ["NO"],

    Click: function() {/ / do something to the 'no '.

    }

    ]

    });

    }

    Please consider loosely. 'LocalizationObject' is a variable object or service that returns the appropriate text for the key that you provide. In this case, he provided the key 'CONFIRM_YES_NO', 'YES' and 'NO', which must be on the right answer for this key, localized.

    Again, this is not a manual on how to do it via Flash Pro but it's the general conceptual way you could do it in any language. There are a variety of other ways to do it, but it's a very simple way, as long as you keep your key names at least wake up verbose. A key name such as LocalizationObject ["ABC123"] is not really tell you what the key can be referred. Also nest them contributes greatly, as LocalizationObject ["UI'] ['DIALOGUES'] ['CONFIRM'] ['YES_NO'] = ' are you sure? It just shows I nested the title of the dialog within the user interface, because it is the text that appears in the user interface rather than content. Then inside dialog boxes that may contain a variety of different dialog boxes. Then inside her CONFIRM type of dialogue. Finally, the type is a dialogue YES_NO type (as opposed to OK_CANCEL or JUST_OK, etc.). Whole set makes it easy to understand what the text of reading: UI YES_NO confirm DIALOG boxes.

    I hope that from here you can see that you need to review everywhere you display text on the screen and centralize it in a sort of object (function or variable) of your choice. You must store the external language files to prevent unnecessarily load the other languages as well as an easy to modify Setup.

    The rest is just using basic JavaScript.

    Just be ready for the most difficult challenge. At least for me. The size of the text in several languages is very different, and in some cases requires the loading of special fonts. This can make layout in a very difficult dynamic environment. Always thinking all text how big or small can be in any particular and plan field on this size more and shrink so that to handle this situation correctly.

  • How to remove master page with script elements

    I want to remove items from the master page with script

    app.activeDocument. masterPageItems.remove ();

    and there are items on the master page to remove all the and I want to create a new one (rectangle frame or text)

    Try this,

    var myDoc = app.activeDocument;  
    
    for(var i=0; i< myDoc.masterSpreads.length; i++)
    {
        for(var j=myDoc.masterSpreads[i].pageItems.length-1; j>=0 ; j--)
        {
            myDoc.masterSpreads[i].pageItems[j].remove()
        }
    }
    

    Vandy

  • Added keyboard shortcuts for menu items created by the script. Is this possible?

    Hi all

    I wanted to create a custom script menu and assign (on the numeric keypad) shortcuts to the menu items so that I could run a script with small changes rather than change a few (currently seven) scripts separated and assign a shortcut to each of them. But now, I realized that the custom menus are not visible in the "Keyboard shortcuts" dialog box (What a disappointment!)

    Am I missing something here? Or is there a workaround?

    1.jpg


    My idea was to trigger the main script - floating Tables.jsx - from the Manager menu item from the menu title as an argument.

    var tableMenu = app.menus.item("$ID/Main").submenus.item("Table");
    
    // "Floating Tables" sub-menu
    try {
        var subMenu = tableMenu.submenus.item("Floating Tables");
        subMenu.title;
    }
    catch(err) {
        var subMenu = tableMenu.submenus.add("Floating Tables", LocationOptions.AT_END);
    }
    
    var topLeftAction = app.scriptMenuActions.add("Top Left");
    var topLeftListener = topLeftAction.eventListeners.add("onInvoke", FloatingTablesHandler);
    var topLeftMenuItem = subMenu.menuItems.add(topLeftAction);
    
    var topCenterAction = app.scriptMenuActions.add("Top Center");
    var topCenterListener = topCenterAction.eventListeners.add("onInvoke", FloatingTablesHandler);
    var topCenterMenuItem = subMenu.menuItems.add(topCenterAction);
    
    var topRightAction = app.scriptMenuActions.add("Top Right");
    var topRightListener = topRightAction.eventListeners.add("onInvoke", FloatingTablesHandler);
    var topRightMenuItem = subMenu.menuItems.add(topRightAction);
    
    var bottomLeftAction = app.scriptMenuActions.add("Bottom Left");
    var bottomLeftListener = bottomLeftAction.eventListeners.add("onInvoke", FloatingTablesHandler);
    var bottomLeftMenuItem = subMenu.menuItems.add(bottomLeftAction);
    
    var bottomCenterAction = app.scriptMenuActions.add("Bottom Center");
    var bottomCenterListener = bottomCenterAction.eventListeners.add("onInvoke", FloatingTablesHandler);
    var bottomCenterMenuItem = subMenu.menuItems.add(bottomCenterAction);
    
    var bottomRightAction = app.scriptMenuActions.add("Bottom Right");
    var bottomRightListener = bottomRightAction.eventListeners.add("onInvoke", FloatingTablesHandler);
    var bottomRightMenuItem = subMenu.menuItems.add(bottomRightAction);
    
    var backToTextAction = app.scriptMenuActions.add("Back to Text");
    var backToTextListener = backToTextAction.eventListeners.add("onInvoke", FloatingTablesHandler);
    var backToTextMenuItem = subMenu.menuItems.add(backToTextAction);
    
    function FloatingTablesHandler(event) {
        var args = [event.parent.title];
        app.doScript(mainScriptFile, ScriptLanguage.JAVASCRIPT, args, UndoModes.ENTIRE_SCRIPT, "\"" + scriptName + "\" Script");
    }
    
    
    
    
    
    
    
    
    
    
    


    The main script reads the argument as follows:

    alert("The argument -- " + args[0]);
    
    


    If my memory is good, of Rorohiko's APID ToolKit can create "Assignable shortcut" menus I don't know this for sure at the moment because these menus a long time ago.

    BTW, the question was asked here, but he has failed.

    Kind regards

    Kasyan

    Hi Kasyan,

    If what you're asking, is if it is possible to assign a keyboard

    shortcut in the usual way with a menu created by a script item and then

    of course, of course you can.

    Add the menu item and then assign some k.shortcut you want-

    you will find your menu items in the 'Scripts' category in the keyboard

    Shortcuts dialog box.

    Ariel

  • Change horizontal text frame (text box) with script?

    Hello

    I looking for something that might be simple but am not being able to solve... When I'm inside a document I created (or the one I opened), I want to be able to change the block of text horizontally.

    What I'm trying to do, it's exactly what I can with file > Document format > text - box width. If I reduce that number to, say 60 mm, the result is exactly what I want. But I wasn't able to find a way to do it through javascript...

    I tried the sample scripts for an answer or this forum or on the internet, but I don't know how to do it. And I have this feeling, it's pretty simple... Maybe by creating a menu script action?

    I am using InCopy CS4.

    Thank you!

    var doc = app.activeDocument;
    doc.documentPreferences.textAreaWidth = 60;
    
  • How to create objects with names being together &amp; quot;. on the fly &amp; quot;?

    Hello world

    I don't know how to create objects with different suffixes in their references "built" on the fly via loop 'for '. I mean, it's, 'typical' how to create a few sprites could be:

    var sprite1:Sprite = new Sprite();
    var sprite2:Sprite = new Sprite();
    container.addChild (sprite1);
    container.addChild (sprite2);

    and what happens if we want to create 100 these objects to aid 'for' loop so that we do not need to type:

    var sprite1:Sprite = new Sprite();
    var sprite2:Sprite = new Sprite();
    var sprite3:Sprite = new Sprite();
    var sprite4:Sprite = new Sprite();
    ...
    var sprite100:Sprite = new Sprite();

    the question is to know how to "integrate" the number name of the instance of the object during the creation of objects of mass? I remember some old "eval" and the square brackets "["objectName"+ objectId]" magic spells, but they do not seem to work in AS3

    Greetings

    :

  • The terminal on condition of some wiring time loop created by the script of LabVIEW

    Hello

    I've written a VI creating a VI scripted that contains a while loop. So far so good. The problem is that I want to connect a Boolean control to this while loop conditional Terminal. I thought I could do that is by using a property or an invoke node, but I couldn't find a way to access the machine.

    Anyone know how to access the conditional terminal using a node or have another idea to solve the problem?

    Kind regards

    Steffen.

    Hi no87,.

    attached, you will find a complete example.

    Hope that help.

    Best regards

    Mencef

  • working with scripts

    Hello

    I work with scripts of these days, I wonder if anyone can guide me through a document that explains each step and gives an example of this work.

    I already read the explicit book of the IPCC, but it gives no examples of its use.

    Thanks for your help

    IPCC express 4.0

    I also wonder if, using the scipt even editor would work for CUE.

    Nice day

    Hello

    Take a look at this link.

    It's a zip file with examples of "aef" from Cisco:

    http://www.Cisco.com/application/x-zip-compressed/en/us/guest/products/ps1846/C1028/cdccont_0900aecd80179234.zip

    Hope this helps,

    Juan Luis

  • create signatures with hyperlinks

    I'm a hotmail user and can't seem to create signatures with links to the facebooks, Web sites and adding my logo.  Please notify

    Create the signature in something like Word, including links and images, and then copy and paste it into the Hotmail signature (Outlook.com).

  • javax.management.InstanceNotFoundException: com.oracle.jps:type = JpsCredentialStore when creating credentials with credential store framework

    Hello

    I have an installation of WebLogic 11 g 1 material (on Windows Server 2012 with Oracle backend) and try to create credentials with credential store framework following steps inhttp://www.redheap.com/2013/06/secure-credentials-in-adf-application.html

    I tried to do with WLST (under Oracle\Middleware\oracle_common\common\bin) and get the following error:

    WLS: / WcsDomain/serverConfig > createCred (map = "ClayTablet.Sample", key is "TestKey", user = "TestUser", password = "blah", desc = "Test"key);

    Now to the tree of domainRuntime. It is a tree read-only with DomainMBean as the root.

    For further assistance, use the help (domainRuntime)

    COMMAND FAILED for an unknown reason, check the stack for more details trace

    Traceback (innermost last):

    Folder "system <>", line 1, in?

    File "C:\Oracle\MIDDLE~1\ORACLE~1\common\wlst\jpsWlstCmd.py", line 522 to createCred

    File "C:\Oracle\MIDDLE~1\ORACLE~1\common\wlst\jpsWlstCmd.py", line 504, createCredImpl

    at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)

    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)

    at javax.management.remote.rmi.RMIConnectionImpl_1036_WLStub.invoke (unknown Source)

    to weblogic.management.remote.common.RMIConnectionWrapper$ 16.run(ClientProviderBase.java:918)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)

    at weblogic.security.service.SecurityManager.runAs (SecurityManager.java: 146)

    at weblogic.security.Security.runAs(Security.java:61)

    at weblogic.management.remote.common.RMIConnectionWrapper.invoke(ClientProviderBase.java:916)

    to javax.management.remote.rmi.RMIConnector$ RemoteMBeanServerConnection.invoke (RMIConnector.java:993)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    javax.management.InstanceNotFoundException: javax.management.InstanceNotFoundException: com.oracle.jps:type = JpsCredentialStore

    Thank you

    Yu

    P.S. I was using the command WLST under Oracle\Middleware\wlserver_10.3\common\bin to do the same thing and got a different error NameError: createCred and posted a question about that in virtue of How to create credentials under Bank of credentials?

    After searching the same error message in the community, I tried to move to WLST under Oracle\Middleware\oracle_common\common\bin and got the error posted here.

    Having extended my domain name with JRF and JRF WebService services asynchronous, I was able to run "createCred" and "listCred" and so on.

    Yu

  • create proxy with clips in mxf and multichannel?

    'Create proxies' with audio 8 channels (4096 x 2160 MXF AVC H.264 codec XAVC, only 2 registered channel) does not work. How can I solve this problem?

    This presets you try and what exactly is a failure?

    I tried a few clips XAVC with 8 audio channels (only the first two channels actually had audio) and create Proxies worked for me using the default QuickTime ProRes and GoPro CineForm presets, so a custom preset DNxHD.

    Are - what you happened to use the H.264 preset and get an error in the events Panel? (The selected preset does not support the type of audio channel of the clip). If so, what is expected, such as H.264 export / transcode does not support 8-channel audio.

Maybe you are looking for

  • Reconfiguration of Time Capsule, a disk hard only Wi - Fi

    My Airport Time Capsule has been previously configured as my main network wireless via an ethernet connection in my router Xfinity. To my new home, there is no place for the Capsule of time beside the Xfinity router so I would use the Xfinity wireles

  • Tools/bookmarks from Firefox after a software update for Microsoft

    Toolbar and Firefox bookmarks were deleted after a software update from my computer mac--a Microsoft Update affecting the word & firefox. The restore within the section of bookmark function does not work - it shows the back ups but then says "unable

  • Windows 7 update for driver installation windows device update hp950c does not work

    I have a 959c HP printer.  He has worked in the past when I managed to get the updates, although she saud there is a problem with the driver installation.  This time however, I can't update windows to find the list of devices online and update.  I tr

  • HDX 8000 on VCS not sending Video - H.264/H.323

    Hi guys,. I need a little help to make heads or tails of a few H.241/H.245 of e-mail that seems to show the VCS rejecting the video from the HDX 8000 registered as H.323. The other device in the call (opening) is a DX70. The HDX 8000 receives audio a

  • How Lightroom handles images with a color profile in fact?

    Since the relevant help page:Lightroom simplifies color management by displaying colors using the device independent color spaces. This means that all you need to do before working in Lightroom is to calibrate your monitor. Then, when you're in Light