Simple dashed stroke in illustrator with javascript?

I just need to get started understanding the dashed stroke portion in path drawing in illustrator.
Any clues? Thanks in advance.

what Larry said
var idoc = app.activeDocument;
var ipath = idoc.selection[0]; // select your path
alert(ipath.strokeDashes.toSource()); // read the current dash/gap settings
ipath.strokeDashes = [2,3,2,1]; // change it to your needs

Similar Messages

  • How do i specify a dash stroke in illustrator CC?

    How do i specify a dash stroke in illustrator CC?
    (it was so easy in CS5)

    Just to illustrate:

  • Combining a Flex FileInfo panel for Illustrator with an Illustrator Javascript

    I've got an Illustrator script (Javascript) that writes XMP based on the content of the artwork, but the script has to be manually triggered. I've got a custom FileInfo panel (built with Flex/AS3) to help me edit the XMP once stored.
    I'd like to combine the two, so the Script fires whenever the FileInfo panel opens.
    I can't do the DOM scripting directly in AS3, can I? I think that Illustrator is only open to Javascript, VB, and AppleScript. Please correct me if I'm wrong.
    Does anyone have any ideas how to call the javascript in the Scripts folder from an event in the FileInfo panel's SWF, and pass arguements back and forth? I've seen it done on webpages, but only when both the SWF  and javascript are on the same HTML page.
    Thanks

    Hi Hui
    Well, sort of, although I've made a bit more progress now and the events part seems to be working.
    I originally thought that fPPLib was specifically for Flex/Flash but I now realise that it is the main PlugPlug interface (which now includes HTML5 panels - right?)
    I think what I really need is HTML5 panels 101 (for Illustrator). The exmples in this forum are InDesign specific and all the c++ libraries are different. Also nothing I've seen so far shows how to make an extension work from within Illustrator's menus (as opposed to just from Window->Extensions).
    I have a plugin which requires input parameters from the user.
    What I am trying to do is.
    1) Create an HTML5 extension panel which will collect values from the user.
    2) Attach that panel (or is it a modal dialog) to say Object->Filters in the main Illustrator menu
    3) Have that panel load previous plugin parameters (*from the current session)
    4) Validate the user values in the panel.
    5) Make the panel communicate those values to the plugin
    6) Show/Hide the panel as required (i.e. open it from a menu item, close it when done).
    Also, in the original flash panel which I am trying to adapt, there is a lot of ActionScript in the mxml file.
    Where does all that go now? Is that what ExtendScript is for (and if so are there some useful tutorials on it anywhere?)
    I know that is a lot of questions. Apologies - I'm new to this and impatient to make some real progress.
    Cheers,
    Rob

  • Illustrator Script: How can I duplicate a layer ( with sublayers ) with javascript code ?

    Dear All
    I want to duplicate a layer structure, as the "Duplicate Layer" submenu do with Javascript code, but I can't.
    I can duplicate only PageItems or selected object, but no Layers.
    Anybody knows how can I do it ?

    Thanks for your answer.
    #target illustrator 
    var docRef = app.activeDocument; 
    var ln = 'Layer 1'; 
    var ol = docRef.layers.getByName(ln); 
    var nl = docRef.layers.add(); 
    nl.name = ln+' Copy'; 
    for (var a = ol.pageItems.length-1; a >= 0; a--) { 
        ol.pageItems[a].duplicate(nl, ElementPlacement.PLACEATBEGINNING); 
    The problem with this code is, that it can't duplicate also the sublayers, and the sublayer elements.
    Sure I can write a recursive function, but I think there should exist a duplicate function somewhere ( for Photoshop script exist ! ) or a small trick, but I can't find it.
    Thanks

  • CS6 findchangebuylist with javascript error

    Running Mac OS 10.6.8
    iMac 2.93 GHz Intel Core i7
    4GB 1333 MHz DDR3
    Indesign CS6 8.0.1
    I have created an new page with nothing on it except a text box. I imported paragraph and text styles for a master page templatre created for a catalog I am creating. I created the new page to try and eliminate any issues that may have been cause by opending an document created in CS5.5. I am using the "recordfindchange" script latest version for cs3-cs5 written by Martin Fisher to export the findchange result of my test. Here is an image of the findchange quire:
    I get a java script error when I run the script I created buy copying the "findchangebylist: javascript and txt file, adding the name _SimpleTest to the file names and replaceing Line number 116 in the javascript with this:
    var myFindChangeFile = myFindFile("/FindChangeSupport/findChangeStrings_SimpleTest")
    Here is the error I get:
    I know nothing about javascript. so I am dead in the water. so can someone please help. Is there any issues with CS6 and the findchangebylist script? does "recordfindchange" no longer work with CS6? Could it be a javascript version problem (I just updated to the latest version)?

    Sorry I should have included the entire javascript so you could see exactly whats there. I am calling the correct file and I am not including the .txt extension.
    I'll include the findchange.txt file after the javascript.
    Here it is Javascript:
    //FindChangeByList.jsx
    //An InDesign CS6 JavaScript
    @@@BUILDINFO@@@ "FindChangeByList.jsx" 3.0.0 15 December 2009
    //Loads a series of tab-delimited strings from a text file, then performs a series
    //of find/change operations based on the strings read from the file.
    //The data file is tab-delimited, with carriage returns separating records.
    //The format of each record in the file is:
    //findType<tab>findProperties<tab>changeProperties<tab>findChangeOptions<tab>description
    //Where:
    //<tab> is a tab character
    //findType is "text", "grep", or "glyph" (this sets the type of find/change operation to use).
    //findProperties is a properties record (as text) of the find preferences.
    //changeProperties is a properties record (as text) of the change preferences.
    //findChangeOptions is a properties record (as text) of the find/change options.
    //description is a description of the find/change operation
    //Very simple example:
    //text    {findWhat:"--"}    {changeTo:"^_"}    {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}    Find all double dashes and replace with an em dash.
    //More complex example:
    //text    {findWhat:"^9^9.^9^9"}    {appliedCharacterStyle:"price"}    {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}    Find $10.00 to $99.99 and apply the character style "price".
    //All InDesign search metacharacters are allowed in the "findWhat" and "changeTo" properties for findTextPreferences and changeTextPreferences.
    //If you enter backslashes in the findWhat property of the findGrepPreferences object, they must be "escaped"
    //as shown in the example below:
    //{findWhat:"\\s+"}
    //For more on InDesign scripting, go to http://www.adobe.com/products/indesign/scripting/index.html
    //or visit the InDesign Scripting User to User forum at http://www.adobeforums.com
    main();
    function main(){
        var myObject;
        //Make certain that user interaction (display of dialogs, etc.) is turned on.
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
        if(app.documents.length > 0){
            if(app.selection.length > 0){
                switch(app.selection[0].constructor.name){
                    case "InsertionPoint":
                    case "Character":
                    case "Word":
                    case "TextStyleRange":
                    case "Line":
                    case "Paragraph":
                    case "TextColumn":
                    case "Text":
                    case "Cell":
                    case "Column":
                    case "Row":
                    case "Table":
                        myDisplayDialog();
                        break;
                    default:
                        //Something was selected, but it wasn't a text object, so search the document.
                        myFindChangeByList(app.documents.item(0));
            else{
                //Nothing was selected, so simply search the document.
                myFindChangeByList(app.documents.item(0));
        else{
            alert("No documents are open. Please open a document and try again.");
    function myDisplayDialog(){
        var myObject;
        var myDialog = app.dialogs.add({name:"FindChangeByList"});
        with(myDialog.dialogColumns.add()){
            with(dialogRows.add()){
                with(dialogColumns.add()){
                    staticTexts.add({staticLabel:"Search Range:"});
                var myRangeButtons = radiobuttonGroups.add();
                with(myRangeButtons){
                    radiobuttonControls.add({staticLabel:"Document", checkedState:true});
                    radiobuttonControls.add({staticLabel:"Selected Story"});
                    if(app.selection[0].contents != ""){
                        radiobuttonControls.add({staticLabel:"Selection", checkedState:true});
        var myResult = myDialog.show();
        if(myResult == true){
            switch(myRangeButtons.selectedButton){
                case 0:
                    myObject = app.documents.item(0);
                    break;
                case 1:
                    myObject = app.selection[0].parentStory;
                    break;
                case 2:
                    myObject = app.selection[0];
                    break;
            myDialog.destroy();
            myFindChangeByList(myObject);
        else{
            myDialog.destroy();
    function myFindChangeByList(myObject){
        var myScriptFileName, myFindChangeFile, myFindChangeFileName, myScriptFile, myResult;
        var myFindChangeArray, myFindPreferences, myChangePreferences, myFindLimit, myStory;
        var myStartCharacter, myEndCharacter;
        var myFindChangeFile = myFindFile("/FindChangeSupport/findChangeStrings_SimpleTest")
        if(myFindChangeFile != null){
            myFindChangeFile = File(myFindChangeFile);
            var myResult = myFindChangeFile.open("r", undefined, undefined);
            if(myResult == true){
                //Loop through the find/change operations.
                do{
                    myLine = myFindChangeFile.readln();
                    //Ignore comment lines and blank lines.
                    if((myLine.substring(0,4)=="text")||(myLine.substring(0,4)=="grep")||(myLine.substring(0, 5)=="glyph")){
                        myFindChangeArray = myLine.split("\t");
                        //The first field in the line is the findType string.
                        myFindType = myFindChangeArray[0];
                        //The second field in the line is the FindPreferences string.
                        myFindPreferences = myFindChangeArray[1];
                        //The second field in the line is the ChangePreferences string.
                        myChangePreferences = myFindChangeArray[2];
                        //The fourth field is the range--used only by text find/change.
                        myFindChangeOptions = myFindChangeArray[3];
                        switch(myFindType){
                            case "text":
                                myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                                break;
                            case "grep":
                                myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                                break;
                            case "glyph":
                                myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                                break;
                } while(myFindChangeFile.eof == false);
                myFindChangeFile.close();
    function myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
        //Reset the find/change preferences before each search.
        app.changeTextPreferences = NothingEnum.nothing;
        app.findTextPreferences = NothingEnum.nothing;
        var myString = "app.findTextPreferences.properties = "+ myFindPreferences + ";";
        myString += "app.changeTextPreferences.properties = " + myChangePreferences + ";";
        myString += "app.findChangeTextOptions.properties = " + myFindChangeOptions + ";";
        app.doScript(myString, ScriptLanguage.javascript);
        myFoundItems = myObject.changeText();
        //Reset the find/change preferences after each search.
        app.changeTextPreferences = NothingEnum.nothing;
        app.findTextPreferences = NothingEnum.nothing;
    function myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
        //Reset the find/change grep preferences before each search.
        app.changeGrepPreferences = NothingEnum.nothing;
        app.findGrepPreferences = NothingEnum.nothing;
        var myString = "app.findGrepPreferences.properties = "+ myFindPreferences + ";";
        myString += "app.changeGrepPreferences.properties = " + myChangePreferences + ";";
        myString += "app.findChangeGrepOptions.properties = " + myFindChangeOptions + ";";
        app.doScript(myString, ScriptLanguage.javascript);
        var myFoundItems = myObject.changeGrep();
        //Reset the find/change grep preferences after each search.
        app.changeGrepPreferences = NothingEnum.nothing;
        app.findGrepPreferences = NothingEnum.nothing;
    function myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
        //Reset the find/change glyph preferences before each search.
        app.changeGlyphPreferences = NothingEnum.nothing;
        app.findGlyphPreferences = NothingEnum.nothing;
        var myString = "app.findGlyphPreferences.properties = "+ myFindPreferences + ";";
        myString += "app.changeGlyphPreferences.properties = " + myChangePreferences + ";";
        myString += "app.findChangeGlyphOptions.properties = " + myFindChangeOptions + ";";
        app.doScript(myString, ScriptLanguage.javascript);
        var myFoundItems = myObject.changeGlyph();
        //Reset the find/change glyph preferences after each search.
        app.changeGlyphPreferences = NothingEnum.nothing;
        app.findGlyphPreferences = NothingEnum.nothing;
    function myFindFile(myFilePath){
        var myScriptFile = myGetScriptPath();
        var myScriptFile = File(myScriptFile);
        var myScriptFolder = myScriptFile.path;
        myFilePath = myScriptFolder + myFilePath;
        if(File(myFilePath).exists == false){
            //Display a dialog.
            myFilePath = File.openDialog("Choose the file containing your find/change list");
        return myFilePath;
    function myGetScriptPath(){
        try{
            myFile = app.activeScript;
        catch(myError){
            myFile = myError.fileName;
        return myFile;
    Here  is the File "findChangeStrings_SimpleTest.txt"
    //FindChangeList.txt
    //A support file for the InDesign CS4 JavaScript FindChangeByList.jsx
    //This data file is tab-delimited, with carriage returns separating records.
    //The format of each record in the file is:
    //findType<tab>findProperties<tab>changeProperties<tab>findChangeOptions<tab>description
    //Where:
    //<tab> is a tab character
    //findType is "text", "grep", or "glyph" (this sets the type of find/change operation to use).
    //findProperties is a properties record (as text) of the find preferences.
    //changeProperties is a properties record (as text) of the change preferences.
    //findChangeOptions is a properties record (as text) of the find/change options.
    //description is a description of the find/change operation
    //Very simple example:
    //text    {findWhat:"--"}    {changeTo:"^_"}    {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}    Find all double dashes and replace with an em dash.
    //More complex example:
    //text    {findWhat:"^9^9.^9^9"}    {appliedCharacterStyle:"price"}    {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}    Find $10.00 to $99.99 and apply the character style "price".
    //All InDesign search metacharacters are allowed in the "findWhat" and "changeTo" properties for findTextPreferences and changeTextPreferences.
    //If you enter backslashes in the findWhat property of the findGrepPreferences object, they must be "escaped"
    //as shown in the example below:
    //{findWhat:"\\s+"}
    grep    {findWhat:"  +"}    {changeTo:" "}    {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}    Find all double spaces and replace with single spaces.
    grep    {findWhat:"\r "}    {changeTo:"\r"}    {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}    Find all returns followed by a space And replace with single returns.
    grep    {findWhat:" \r"}    {changeTo:"\r"}    {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}    Find all returns followed by a space and replace with single returns.
    grep    {findWhat:"\t\t+"}    {changeTo:"\t"}    {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}    Find all double tab characters and replace with single tab characters.
    grep    {findWhat:"\r\t"}    {changeTo:"\r"}    {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}    Find all returns followed by a tab character and replace with single returns.
    grep    {findWhat:"\t\r"}    {changeTo:"\r"}    {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}    Find all returns followed by a tab character and replace with single returns.
    grep    {findWhat:"\r\r+"}    {changeTo:"\r"}    {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}    Find all double returns and replace with single returns.
    text    {findWhat:" - "}    {changeTo:"^="}    {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}    Find all space-dash-space and replace with an en dash.
    text    {findWhat:"--"}    {changeTo:"^_"}    {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}    Find all dash-dash and replace with an em dash.
    //The test starts here
    grep    {, findWhat:"\\r\\r.+[:].+\\r"}    {, appliedParagraphStyle:"01-Header"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:true, includeMasterPages:true, includeFootnotes:true, kanaSensitive:true, widthSensitive:true}    //Comment

  • Bug Report: line doubles dashed stroke

    Hi,
    to reproduce the bug, you have to:
    1. create a line with the line tool (I have used a weight of 1px and a lengt of 960px)
    2. give it a dashed stroke of the same weigt as the line weight. (1px in my case)
    3. Give it a dash and a gap width and set align on inside (4px / 4px in my case)
    Now you would expect a line with 4px dashes an 4px gaps, but you get a line with 7px dashes and 1px gaps.
    The problem lies in the creation of the stroke.
    The 1px stoke is basicly a 1px x 960px rectangle, because of that, the stoke goes all along the inside of the rectangle and creates two strokes on top of each other.
    This can be illustrated when you put the alignment of the stroke to outside.
    This behavior is fine for boxes, but in the case, where the line weight equals the stroke weight this behavior is a big problem.

    Since the line tool actually makes a skinny rectangle, you might try using the pen tool in shape mode to create a dashed line that will render as expected.
    If you select no fill, dashed stroke of selected color, 4 dash, 4 gap (similar to your example above) in the stroke options>more options, you will create a dashed line with equal spacing.
    Will that work for you?
    Pattie

  • Problem with JavaScript in DPS

    Hello,
    i have little problem with one HTML page in DPS. We've created HTML form, which is formatting output with JavaScript and then passing to local mail client via mailto. It works nicely in Safari on desktop, it works in Safari on iPad BUT it don't work in DPS, when we use it as HTML content (frame on page where form is loaded). Unfortunately, there is no way how to learn what's wrong - on iPad it works, it's not working just in DPS (and it's not working in Viewer on desktop too).
    Anyone have any idea what to do?
    Script is fairly simple, it's my compilation of other works, because i'm not JS programmer, just i'm skilled with google-copy-paste... So there can be some VERY trivial error, but i don't know correct syntax...
    very simple version of this form, which is not working in DPS (but everywhere else), is here
    http://dl.optio.cz/mailtoExample.html
    Thanks for any help!

    Hello,
    when used in DPS browser, it's working (as part of HTMLresources.zip). I don't know if this will help, but here is small game, which works correctly in DPS in web overlay. when you move any red circle, it will let you send results via email. But this is too complicated for my minimal skills.
    http://dl.optio.cz/Hra_en/
    Anyway, thanks for help
    Martin

  • Web.show_document() with javascript

    Hi Guys,
    I'v been searched this forum about web.show_document() with javascript.
    I saw some threads said
    I can do like
    WEB.SHOW_DOCUMENT ('javascript:window.open("http://www.google.com","","fullscreen=no,titlebar=no,location=no,toolbar=no,menubar=no,status=no,resizable=yes");self.close()','_blank');
    and someone said it worked, but it doesn't work in my machine.
    also some one said the javascript engine is not included in Form 10.1.2, so I can not use WEB.SHOW_DOCUMENT function like above.
    My form builder is 10.1.2.0.2 (Production), os is xp sq2 ,ie 6.(ie6 has some tighter security)
    I want to get clarification about this function, can i use the javascript on it or not ? I really want the pop up window without toolbar and customize size. I need do some configuration in formweb.cfg also?
    Thanks in advance. I appreciated every response.
    Appcat

    Hi Jan,
    Thanks for your reply. I check the metalink about it.
    The first solution is
    1. Make forms Developer URL a trusted site in IE to allow script executions.
    For that open Internet Explorer->Internet Option-> Security.
    Select the "Trusted Sites" Option.
    Click on the Sites Button.
    Add the Developer Suite URL in that.
    for example
    http://<Yourmachinename>:8889/
    It doesn't work in my machine ,still can not activate the javascript.
    The second solution is
    2. Place the script invocation code in a html file in Oracle_home/forms/server directory and call it.
    For example :
    Create a simple form.
    In Forms Trigger :
    web.show_document('http://<Yourmachinename>:8889/file.html');
    In the file.html you may enter the code, for example:
    <HTML>
    <HEAD>Heading</HEAD>
    <BODY>
    <SCRIPT LANGUAGE="Javascript">
    window.open("http://www.yahoo.com","_self");
    </SCRIPT>
    </BODY>
    </HTML>
    It also doesn't work in my machine, the problem is http://<Yourmachinename>:8889/file.html can not be found, even i put it under the Oracle_home/forms/server folder, but i click it directly ,the javascript works. that means the URL http://<Yourmachinename>:8889/file.html is incorrect or I should put the html file into other directory. And I also checked the default.env,FORMS_PATH=D:\DevSuiteHome\forms.
    anything wrong with my env?
    Do you have any idea about it?
    Thanks,
    Appcat
    Message was edited by:
    user577805
    Message was edited by:
    user577805

  • How to use the index method for pathpoints object in illustrator through javascripts

    hii...
    am using Illustrator CS2 using javascripts...
    how to use the index method for pathpoints object in illustrator through javascripts..

    Hi, what are you trying to do with path points?
    CarlosCanto

  • Can I with Javascript force Chrome users to open a PDF with Acrobat

    I have built a document in InDesign and exported to an Interactive PDF. I originally had issues with acrobat highlighting interactive buttons with a blue box but was able to get around this with a couple simple JavaScript lines that disabled this feature then re-enabled on closing. You can view the thread with my resolution here:
    Button Highlight in Interactive PDF from InDesign CC
    Great but now I have another issue. If the user opens with Chrome and has not disabled "Chrome's" PDF viewer the above JavaScript is ignored or not functional. It there a way with JavaScript or some other method to force the PDF to be opened with Acrobat in Chrome?
    I Miss FLASH this project would have been 100 times easier with action script and consistent across browsers ... curse you Steve Jobs.

    You need to not just think about Chrome. There is
    - FireFox
    - Microsoft Reader (comes with Windows 8)
    - Preview (comes with Mac)
    - iPad native PDF viewe
    - Android native PDF viewer
    Anyone getting a computer or tablet today can read PDFs without getting Adobe Reader and you need to give them a pretty compelling reason for them to download Adobe Reader to do what (they believe that) they can already do. I think it's the death knell for PDF forms.

  • Is it possible to create a panel with JavaScript?

    Hi friends
    As I´m studying JavaScript and the user interface creation...would like to ask (more for curiosity):
    Is it possible to create a new panel for Illustrator using JavaScript? Or this is only possible using C++?
    (in the Window Class UI we have the "palette" creation method..so wondering the result of it too)
    Thank you a lot
    Gustavo

    Hi Larry
    Thank you a lot for sharing this reference. This has alternative explanations from the JavaScript Tools Guide that already come with the Extended Script Toolkit SDK (I´m reading this and finding very very useful).
    My question, however, is not covered in any of the manuals.
    I´d like to confirm if a panel (like Brushes, Swatches, Appearance and Layer Illustrator panels) can be made only via C++??? (and not via JavaScript).
    Can I assume the Script UI capabilites in JavaScript can resume itself on creating dialog boxes only (not panels that persist, keep opened in the software, also could be docked in the side of app)?
    Thank you
    Gustavo.

  • Change 3D views with JavaScript code?

    I am looking for a way to change 3D views using JavaScript. I want to obtain similar result as the predefine action (Go to a 3D view) but with code.
    More preciselly, I want to connect items within a list box to different 3D views.
    Any ideas or suggestion would be greatly appreciated.
    Thank you
    Tutorial on how to use the Go to a 3D view action:
    Connecting Document JavaScript to 3D Views (PDF: 2.3M)
    http://partners.adobe.com/public/developer/en/tips/topic_tip3.pdf
    Related topics:
    looking for a way to switch views using Javascript
    http://www.adobeforums.com/cgi-bin/webx/.3bbed722/0
    SMOOTH TRANSITION BETWEEN VIEWS?
    http://www.adobeforums.com/cgi-bin/webx/.3bc0ce56
    Cameras vs. views; views.xml
    http://www.adobeforums.com/cgi-bin/webx/.3bbf0748/3

    hello maybe other have same problem i found a simple solution for me
    use the javascript bridge and juse the f4m manifest files
    function changeSrc(playerdivId,src){
                var player = document.getElementById(playerdivId);
                player.setMediaResourceURL(src);
    src multicast fm4 manifest like this
    http://sourceforge.net/apps/mediawiki/osmf.adobe/index.php?title=Flash_Media_Manifest_(F4M )_File_Format
    best regards

  • Remove or isolate part with JavaScript?

    Hi folks,
    as you know you can remove or isolate parts in the modelhierarchy with a few clicks. Now I want to do exacactly the same with JavaScript to add this function to a button or something similar.
    So I can have a button like "show part xy" and only this part is shown in the 3D view and other parts are not visible.
    Is there any chance to do this?
    I think there's a workaround with creating an animation like an exploded view where certain parts are removed. But a simple funtion would be much more easier I think.
    thx in advance,
    Tobias

    Hi,
    I didn't check whether the following code actually compiles and works, but maybe it does what you're trying to accomplish...
    [3D annotation JavaScript code, associated with the container for Your embedded U3D model]
    function makeAllMeshesInvisible ( )
    var howManyMeshesInScene = scene.meshes.count;
    for ( m=0; m < howManyMeshesInScene; m++ )
    var myMesh = scene.meshes.getByIndex(m);
    console.println("Making mesh " + myMesh.name + " invisible.");
    myMesh.visible = false;
    function makeMeshVisible ( meshName )
    var myMesh = scene.meshes.getByName(meshName);
    if ( myMesh )
    myMesh.visible = true;
    else
    console.println("There is no mesh named " + meshName);
    [Document JavaScript code, e.g. associated with a button]
    // getAnnots3D(pageNum)[annotIdx]
    context3D = getAnnots3D(0)[0].context3D;
    context3D.makeAllMeshesInvisible();
    context3D.makeMeshVisible("nodeName");
    Please note that the 3D viewer must be active for the button to work properly...
    I hope it works and helps!
    Sebi

  • Trigger Save As... dialog with Javascript?

    I have a script that makes some significant changes to an Illustrator file and would like to have a "Save As..." dialog pop up at the end of the script to give the user a chance to save the changes in a location of their choosing.
    I know how to trigger a Save As dialog box with AppleScript using GUI scripting, is there a way of doing this with Javascript?

    In short I think you answer is NO… There is no 'showing dialog' parameter in either language. You can prompt for a location pretty much the same as 'choose folder' in AppleScript. You can however construct your own dialog using ScriptUI and have the user input some options and a place to save. I am currently working on these myself for use my scripts… Here is an example of some for Photoshop…
    First dialog offers a selection of File Format to use:
    On choosing you get a second dialog (with limited options) for input:

  • Resize and hide a movie with JavaScript Fonctions

    Hello,
    I've read your topic about JavaScript Scripting Guide for QuickTime and I want to know if there is a solution for to rezise and to hide movie with JavaScript fonctions.
    Thank in advance

    It is very strange, most users who have focus on JS try to do everything with it, whereas lot of simple actions can easily be done with advanced/shared actions. I will only go to JS when it is not possible with advanced/shared actions.
    You are lucky, I was just restarting to work on an advanced training for next week when your question showed up.

Maybe you are looking for