Help emitting a frame from random sellection

I have a few games im working on.
Some of which rely on results given after an action is performed.
I've been using frames inside layers, each have their own 'answer', but if i have the first frame as a blank (to not show any results when the game starts) the blank frame gets pulled up as an answer.
Is there a way to emit a certain frame from answers / random sellections?
Ollie

Here's an e.g.
var result6Array:Array = new Array();
result6Array[0] = 1;
result6Array[1] = 2;
result6Array[2] = 3;
var f:int = 0;
button_mc.addEventListener(MouseEvent.CLICK, result6);
function result6(event:MouseEvent):void
     for(f=0; f<result6Array.length; f++)
          var randomResult:Number = Math.round(Math.random() * result6Array.length);
          result6_mc.gotoAndStop(randomResult);
Does this help?
(I have 3 frames id like to show in the random selection, when i make the first frame blank it still brings it up in results)

Similar Messages

  • Need Help Pasting Key Frames from one still image to others, and Changing the duration of multiple still images.

    I'm working on a stop motion project, and I have at least a thousand still images to work with.
    I have adjusted several Key Frame settings on the 1st still image in my project, such as
    Brightness
    Cropping
    Scale
    Position
    I now want to apply these exact settings to hundreds of still images at a time that make up one scene in the project (but not all still images in the entire project).. Is there a way to paste or easily transfer them?
    Also, there are scenes I'm working on in which I want to change the image duration of hundreds of photos at once, but not change to duration of all images in the project, is this possible?
    I've looked at several different web-links, but none of them have what I'm looking for. If you can please help me, I'd be willing to send you $10 through paypal. Knowledge is power; the solution to these problems would save me hours of time. If you don't fully understand my questions I can send you a pictures or a video, pointing out my needs.

    Stan,
    Thanks again for your input.
    When the project is created, I don't recall seeing the preference settings until after the project opens the first time.  In that case if certain media was imported into the project panel but not in the sequence, after the duration was changed, it would be necessary to remove the media from the project panel then re-import again.  If there is a workaround to this please let me know.  It also doesn't appear that creating a new sequence would prevent the re-importing.  Could you confirm?
    Thanks for the link on automating to sequence--I remember that from CS4.
    The application of identical effects to media on the timeline in a sequence was something I had learned back in CS3 or maybe earlier CS4 where the effected, in this case a transition between images was applied then copied then using the paste or (Control V) command, applied to all other stills.  That worked fine but with lots of images, it ends up being a lot of "point and clicks" since the CTI must be moved to each transition insertion point before the paste is applied. 
    I actually thought that I had seen someone select the remainder of the images in the sequence then apply the paste command but I was never able to make that work.  Have you heard of such a short-cut?
    Much thanks again!!

  • Help to  grab frames from vidoe file

    hello
    i'm working in scene change detection project with java
    i' want to get all video frames to compare each successive frames
    my needs now how to get all frames form video file

    syncmaster739df wrote:
    ..But when i run this code i have got exception Which code exactly? I gave you a search term that might return many URLs, but to help you, I need you to supply a single URL.
    Failed to create a processor from the given url: javax.media.NoProcessorException: Cannot find a Processor for: C:\Documents and Settings\ahmed\Desktop\sadat pump.mpgWas there any more information in the stack trace? [Copy/paste the entire message|http://pscode.org/javafaq.html#exact].

  • PLEASE HELP - cant switch frame from html to excel and vice versa!!

    Hi
    I'm have been unable to dynamically change an html frame to display in excel format.
    The variable that determines whether this page should be html or excel comes from another frame.
    Its not working...
    Any ideas why this would be?
    seems to be a straight forward issue, but I can't seem to solve it.
    ****code below****
    <%
    String xFmt = (String)request.getParameter("passFmt");
    if (xFmt == "1")
    response.setContentType("application/vnd.ms-excel");
    else
    response.setContentType("text/html");
    %>

    SORRY...."my bad" (as it were)...
    should have been
    if (xFmt.equals("1"))
    rather than
    if (xFmt == "1")

  • Please help in calculating average from random nos. generated

    Actually i am new to LV and i don't understand e'thing pretty well. Can anyone please help me with this problem?
    I have to construct a VI that displays a random no. once every sec., and then in the same VI, i am trying to compute the average of the last four nos. generated, i.e. the average is displayed only after 4 numbers have been generated, else the average displays zero.
    Well, i was trying to  get this, but so far what i have got is a VI that is generating average, but that is not what i need.
    Thanks for any help.
    CL

    Easiest would be to use "Mean PtByPt.vi" in the Analyze...Point by Point palette. It is most flexible, e.g. if you would want to change the averaging length in the future.
    Alternatively, you could use shift registers initialized with NaN. I would prefer NaN over zero for incomplete samples, zero is not unique, it could be a legal value. See attached simple example (LabVIEW 7.1). Modify as needed.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Average4.vi ‏31 KB

  • Premiere Pro 7.0 dropping random frames from original video

    Here is one of many problems I am running into. When I import original video into Adobe Premiere Pro 7.0 it always leaves out a few frames in random spots scattered throughout a clip (I'm guessing this is what is referred to as dropped frames).
    I first noticed this when I went to sync the audio mp3 files, which are imported seperatly, to the video clips and found that the audio clips are a few frames longer; and the audio/video don't match up.
    I was hoping someone could shine some light onto why this is happening and what can be done to remedy it. I've fiddled around with differnt settings when loading a new project with no success.
    I am importing the origina video from a folder on my desktop. It is MPEG-2 format and came from my Sony Handycam DCR SR45 camcorder. Below are the properties for the video according to a video player on my computer.
    Video:
    MPEG-2 Video
    720x480 (16:9)
    29.97fps 9100Kbps
    Audio:
    Dolby AC3 48000Hz stereo 256Kbps (this audio doesn't show up with imported video files which is why I import seperate mp3 audio)
    P.S.
    I've recently been told that MPEG-2 files are not ideal for video editing. I've also been told that Premiere Pro doesn't recognize AC3 audio, which is why I am importing the audio seperatly as mp3 files that I have created in another program. Also I've been told that the camcorder I use is not ideal for editing purposes.
    So, if anyone sees any reasons to disagree or concur with these statements, please let me know. But, as for right now, I currently have existing video from this camcorder that I MUST make work in Adobe Premiere Pro, so please help me work with what I got. Thanks.

    I have began uploading 2 vidoes to the DropBox.
    One is the original that came from my camcorder, the other is the attempted converted DV AVI.
    The footage is a clip of a turkey hunt i filmed for a friend where a turkey is shot at and missed. The video is not that great but I still need it and other similar clips.
    I'm not sure if your familar with Dropbox or not.  We mainly use it for PDF's from architects and Contractors, but I am trying it for video for the first time.  Here is what it states for sharing files publicly:
    function(){return A.apply(null,[this].concat($A(arguments)))}
    The Public Folder lets you easily share single files in your Dropbox.  Any file you put in this folder gets its own Internet link so that you can share it with others-- even non-Dropbox users!  These links work even if your computer’s turned off. 
    Step 1:  Drop a file into the Public folder.
    Step 2: Right-click/control-click this file, then choose Dropbox > Copy Public Link. This copies the Internet link to your file so that you can paste it somewhere else.
    That's it!  You can now share this file with others: just paste the link into e-mails, instant message conversations, blogs, etc.!
    If you'd like more help with sharing files, head here: http://www.getdropbox.com/help/16
    Happy Dropboxing!
    - The Dropbox Team
    Note: You can only link to actual files within your Public Folder, not to folders.
    I guess I will try to paste these links now even though they are still uploading.  I will re-paste them later when the upload is complete.
    Original Video - http://dl.dropbox.com/u/5773253/Tom%20Turkey%20-%20Original%20MPEG2.MPG
    DV AVI - http://dl.dropbox.com/u/5773253/Tom%20Turkey%20-%20Converted%20DV%20AVI.avi
    Anyone else who want's to play around with these videos have at it.
    I'm glad I found this forum. Thanks for helpin'

  • Help! How to Open a Frame from applet with

    Hey all. I need help =).
    I want:
    1. Have 1 class extends applet with running thread (this far no prob)
    2. Open a new frame from the applet (no prob)
    3. Start a new thread which is operating "inside" the new Frame/class
    4. Draw a simple Rect in the new Frame with the new thread to test that the graphics work.
    Plz help,
    ~Trobsky

    �rr..... i cant draw on the Frame =(.
    Heres the code:

    public class Fonster extends java.applet.Applet {
         Frame myFrame;
         Fri friFonster=new Fri();
         public void init() {
              myFrame=new Frame();
              myFrame.resize(300,300);
              myFrame.show();
              myFrame.add(friFonster);
              friFonster.init();
              friFonster.start();
         public void paint(Graphics g)
              g.drawRect(10,10,100,100);
    public class Fri extends java.applet.Applet {
         public void init(){
              repaint();
         public void paint(Graphics g)
              g.drawRect(10,10,200,200);

  • Plz Help : How to use FrameGrabbingControl to extract frame from video.

    I m trying to extract frame from the video (from .mpg file)using FrameGrabbingControl on the click of the button.There is no problem related to playing video.
    import javax.media.control.*
    public void actionperformed(ActionEvent ae)
    String s = ae.getActionCommand();
    if(s.equals("click") )
    FrameGrabbingControl fgc = (FrameGrabbingControl) player.getcontrol("FrameGrabbingControl"); //it is returning null
    Buffer bf = fgc.grabFrame(); // so here nullpointerException
    }

    hi I am also experiencing the same prob.can u send me the code if u got one..my mail id is [email protected].we are working on a proj to extract jpeg images from any movie file in jmf...can u help us

  • Importing frames from video help please

    Why is photoshop elelments 9 not recognizing .wmv or .avi files when trying to import photos from videos. I have used this feature before without problems using .wmv videos, why did it quit working all of the sudden?

    When something goes awry, start by resetting the preferences. Quit the editor, then restart it from the button in the organizer or the button in the Welcome Screen, whilie holding down Ctrl+Alt+Shift (command+option+shift on a mac). Keep the keys down till you see a window asking if you want to delete the settings file. You do.
    However, having said that, are you sure these wmv files are the same as the ones you did before? Frame from video doesn't work with high-def videos, for example, and it's not great with long ones, either.

  • How to call a j-frame from a main frame

    I use both NetBean 5.5 and Forte for Java4
    i would like to know how to call a j-frame from a main jframe window when a button is clicked after
    action performed or moused clicked is set
    i.e Main jframe (window) has a button ---> (grades) click it
    should open the sub-jframe named grades with all the grades showin in that frame
    your help please thanks

    It sounds as if you want the button to open a dialog that displays your data such as a JOptionPane and not a JFrame.

  • After Effects CC 2014 problem: Image from frame from the last Premiere CC-After Effects link permanently burned into new project compositions.

    One frame from one of the clips I sent from Premiere to After Effects through "replace with After Effects composition" was permanently burned in After Effects and now it appears in every new composition of every new project I create as the background of such composition. 
    For example, I sent from Premiere a clip of a building to After Effects for color correction with Finesse, and warp stabilization and then after rendering, finishing, and closing all the applications, now, every time I open After Effects for any other project, whether already-created or brand-new, every existing or newly created composition (in a Mac Command N) you see the image of the building as the background of the composition.  If you create a new composition, while it remains empty of any layers, you see the image of the building.  If you have an already-created composition with layers, when you turn off all the eyes of the layers, you would expect to see black (nothing) in the composition window (if that's the color you assigned to be as the background of the comp), but instead you see the building.  If you change the color of the comp's background in Composition Settings, you still see the building as the background.  If you render such empty composition (no layers) you render out the image of the building, not black.  I tried clicking everywhere and going through the preferences, and even uninstalling the application and re-installing it, but it seems to be permanently burned in into every comp's background.
    Please, any ideas of what's going on and how to get rid of it?
    Thanks so much for your help,
    RR.

    Thanks so much Dave.  It fixed the problem.
    Raoul.

  • Hel with modifying cs5/6 script...create anchored frames from text

    hello
    I have one great time saver script for cs5 for create anchored frames from text tagged with/or charachter style/paragraph style. This work in cs6 but have some "bugs" for me. Script need to be compatible with InDesign CS6.
    1. script in original (look bellow) create text frame which is fitted to lenght of the text. I make change and change 466 line:
    AnchoredTextFrame.fit(FitOptions.FRAME_TO_CONTENT);
    now frame is wide as I write in check box, good. But frame not resize to lenght of the text so I add after above lines 466-470:
        var FO = FitOptions.FRAME_TO_CONTENT,
        tfs = ([]).concat.apply([], app.activeDocument.stories.everyItem().textContainers),
        t, i = tfs.length;
    while( i-- ) (t=tfs[i]).overflows && ( t.locked || t.fit(FO) );
    now all is ok but is here better way to make this to work? Simply, i want to spec text frame width in dialog box, frame will resize only verticaly in direction to amount text in frame. I dont want any overset text.
    2. One "bug". For some reason script alter paragraph style of other text which is not subject to be cutted in anchored frame.
    How to resolve this?
    #targetengine "session"
              Automating anchored object creation
              Version: 2
        Script by Thomas Silkjær
              http://indesigning.net/
    Модификация Б. Кащеев, www.adobeindesign.ru
    Скрипт предназначен для создания привязанных фреймов из текста, отформатированного
    каким-либо абзацным или символьным стилем. Эти стили задаются пользователем в диалоговом
    окне скрита. Там же необходимо задать объектный стиль для привязанного фрейма, в котором
    пользователь должен заранее задать оформление и параметры привязки. Далее необходимо
    указать ширину привязанного фрейма, а его высота будет рассчитана автоматически исходя из
    объема текста. При вводе дробных значений ширины привязанного фрейма в качестве
    разделителя целой и дробной части следует использовать не запятую, а точку, следуя западным
    стандартам разработчиков программы  Adobe InDesign. Первоначально идея и скрипт по созданию
    привязанных фреймов принадлежит Thomas Silkjær для версии ID CS4. C появлением версий CS5
    и CS5.5 скрипт перестал в них выполняться, да и в версии CS4 не всегда корректно работал.
    Анализируя недочеты скрипта в данной его версии были исправлены ошибки и внесены
    функциональные дополнения исходя из понимания задачи автором модификации. Добавлена
    возможность выбора стилей, если они они находятся в группах (папках), возможность выбора
    единиц измерения из выпадающего списка, изменены GREP-выражения для поиска текста,
    область действия скрипта ограничена материалом (Story), а не документом.
    var myMeasureUnits = ["Milimeters","Centimeters","Points","Inches", "Picas", "Ciceros"];
    var selectUnits;
    var pStyleIndex = null;
    var cStyleIndex = null;
    var oStyleIndex = null;
    var myH, myW;
    function main()
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
              if (app.documents.length == 0)
                        alert ("Document is not open. Open document first");
                        return;
        var myParaStyleList = myGetParagraphStyleNames();
        var myCharStyleList = myGetCharacterStyleNames();
        var myObjStyleList = myGetObjStyleNames();
        if(app.selection.length && app.selection[0].hasOwnProperty("baseline"))
            var myStory = app.selection[0].parentStory;
            var myWin = myDialog(myParaStyleList, myCharStyleList, myObjStyleList);
            if ( myWin.show()  == 1 )
                var myDocument = app.activeDocument
                with (myDocument.viewPreferences){
                    // Сохраняем старые единицы измерения в переменных myOldXUnits, myOldYUnits
                    var myOldXUnits = horizontalMeasurementUnits;
                    var myOldYUnits = verticalMeasurementUnits;
                    // Устанавливаем новые единицы измерения
                    switch(selectUnits)
                        case 0:                   
                            horizontalMeasurementUnits = MeasurementUnits.millimeters;
                            verticalMeasurementUnits = MeasurementUnits.millimeters;
                            break;
                        case 1:
                            horizontalMeasurementUnits = MeasurementUnits.centimeters;
                            verticalMeasurementUnits = MeasurementUnits.centimeters;
                            break;
                        case 2:
                            horizontalMeasurementUnits = MeasurementUnits.points;
                            verticalMeasurementUnits = MeasurementUnits.points;
                            break;                  
                        case 3:
                            horizontalMeasurementUnits = MeasurementUnits.inches;
                            verticalMeasurementUnits = MeasurementUnits.inches;
                            break;
                        case 4:
                            horizontalMeasurementUnits = MeasurementUnits.picas;
                            verticalMeasurementUnits = MeasurementUnits.picas;
                            break;
                        case 5:
                            horizontalMeasurementUnits = MeasurementUnits.ciceros;
                            verticalMeasurementUnits = MeasurementUnits.ciceros;
                            break;
                        default: break;
                    } // switch
                if(cStyleIndex == null)
                {/*поиск по стилю абзаца*/
                    var pStyle = getParagraphStyleByName(myParaStyleList[pStyleIndex]);
                    resetGREPfindChange();
                    app.findGrepPreferences.appliedParagraphStyle = pStyle;
                    app.findGrepPreferences.findWhat = NothingEnum.nothing;
                else //
                    // поиск по стилю символов
                    var cStyle = getCharacterStyleByName(myCharStyleList[cStyleIndex]);
                    resetGREPfindChange();
                    app.findGrepPreferences.appliedCharacterStyle = cStyle;
                    //app.findGrepPreferences.findWhat = ".+";
                    app.findGrepPreferences.findWhat = NothingEnum.nothing;
                var foundItems = myStory.findGrep();
                if(!foundItems.length) {
                    alert("Found the text to be placed in a linked frames"); exit();
                //alert(foundItems.length);
                //alert (foundItems[0].contents)
                //alert (foundItems[1].contents)
                var oStyle = getObjectStyleByName(myObjStyleList[oStyleIndex]);
                for(var i = foundItems.length-1; i >=0; i--)
                    //alert (foundItems[i].contents)
                    createAnchoredFrame(foundItems[i], oStyle);
                with (myDocument.viewPreferences){
                    try{
                        horizontalMeasurementUnits = myOldXUnits;
                        verticalMeasurementUnits = myOldYUnits;
                    catch(myError){
                        alert("Unable to return to the original unit");
            } //if ( myWin.show()
        } //if(app.selection.length && app.selection[0].hasOwnProperty("baseline"))
        else
            alert("Place the cursor in the text and run the script again")
    } // main
    function myGetParagraphStyleNames()
    // Получаем список стилей абзацев
              var curGroup;
              var curGroupName;
              var curNameInGroup;
              var myParagraphStyleNames = app.activeDocument.paragraphStyles.everyItem().name;
              myParagraphStyleNames.shift(); // удаление стиля No Paragraph Style
              var paraGroups = app.activeDocument.paragraphStyleGroups;
              var paraGroupsLen = paraGroups.length;
              for(var i = 0; i < paraGroupsLen; i++) {
                        curGroup = paraGroups[i];
                        curGroupName = paraGroups[i].name;
                        curGroupStyleNames = curGroup.paragraphStyles.everyItem().name
                        for (j=0; j< curGroupStyleNames.length; j++)
                                  curNameInGroup = curGroupName +":"+ curGroupStyleNames[j];
                                  myParagraphStyleNames.push(curNameInGroup);
              return myParagraphStyleNames;
    function myGetCharacterStyleNames()
    // Получаем список символьных стилей
              var curGroup;
              var curGroupName;
              var curNameInGroup;
              var myCharacterStyleNames = app.activeDocument.characterStyles.everyItem().name;
              myCharacterStyleNames.shift(); // удаление стиля None
              var charGroups = app.activeDocument.characterStyleGroups;
              var charStyleGroupLen = charGroups.length;
              for(var i=0; i < charStyleGroupLen; i++)
                        curGroup = charGroups[i];
                        curGroupName = charGroups[i].name;
                        curGroupStyleNames = curGroup.characterStyles.everyItem().name;
                        for (j=0; j< curGroupStyleNames.length; j++)
                                  curNameInGroup = curGroupName +":"+ curGroupStyleNames[j];
                                  myCharacterStyleNames.push(curNameInGroup);
              } //for
              return myCharacterStyleNames;
    } // fnc
    function myGetObjStyleNames()
        var curGroup;
              var curGroupName;
              var curNameInGroup;
              var myObjStyleNames = app.activeDocument.objectStyles.everyItem().name;
        myObjStyleNames.shift();
        var objGroups = app.activeDocument.objectStyleGroups;
        var objStyleGroupLen = objGroups.length;
        for(var i=0; i < objStyleGroupLen; i++)
                        curGroup = objGroups[i];
                        curGroupName = objGroups[i].name;
                        curGroupStyleNames = curGroup.objectStyles.everyItem().name;
                        for (var j=0; j< curGroupStyleNames.length; j++)
                                  curNameInGroup = curGroupName +":"+ curGroupStyleNames[j];
                                  myObjStyleNames.push(curNameInGroup);
              } //for
        return myObjStyleNames;
    } // fnc
    function myDialog(myParaStyleList, myCharStyleList, myObjStyleList)
        var myDialog = new Window('dialog', 'Create anchored text frames');
        this.windowRef = myDialog;
              myDialog.orientation = "column";
        myDialog.alignChildren = ['fill', 'fill'];
        // добавляем панель 1 с элементами управления
        myDialog.Pnl1 = myDialog.add("panel", undefined, "Move the text in linked frames");
              myDialog.Pnl1.orientation = "column";
        myDialog.Pnl1.alignChildren = "left";
        myDialog.Pnl1.pstyle = myDialog.Pnl1.add('checkbox', undefined, "Text with the paragraph style");
        myDialog.Pnl1.pstyle.value = false;
        myDialog.Pnl1.dropdownParaStyle = myDialog.Pnl1.add("dropdownlist", undefined, myParaStyleList);
        myDialog.Pnl1.dropdownParaStyle.title = "Select the paragraph style ";
        myDialog.Pnl1.dropdownParaStyle.minimumSize = [250,20];
        myDialog.Pnl1.dropdownParaStyle.enabled = false;
        myDialog.Pnl1.dropdownParaStyle.selection = 0;
        if(myCharStyleList.length)
            myDialog.Pnl1.сstyle = myDialog.Pnl1.add('checkbox', undefined, "Text with character style");
            myDialog.Pnl1.сstyle.value = false;
            myDialog.Pnl1.dropdownCharStyle = myDialog.Pnl1.add("dropdownlist", undefined, myCharStyleList );
            myDialog.Pnl1.dropdownCharStyle.title = "Select the character style ";
            myDialog.Pnl1.dropdownCharStyle.minimumSize = [250,20];
            myDialog.Pnl1.dropdownCharStyle.enabled = false;
            myDialog.Pnl1.dropdownCharStyle.selection = 0;
            myDialog.Pnl1.pstyle.onClick = function()
                if(this.value) {
                    myDialog.Pnl1.dropdownParaStyle.enabled = true;
                    myDialog.Pnl1.dropdownCharStyle.enabled = false;
                    myDialog.Pnl1.сstyle.value = false;
                else
                    myDialog.Pnl1.dropdownParaStyle.enabled = false;
                    myDialog.Pnl1.dropdownCharStyle.enabled = true ;
                    myDialog.Pnl1.сstyle.value = true;
            }// fnc
            myDialog.Pnl1.сstyle.onClick = function()
                if(this.value)
                    myDialog.Pnl1.dropdownCharStyle.enabled = true;
                    myDialog.Pnl1.dropdownParaStyle.enabled = false;
                    myDialog.Pnl1.pstyle.value = false;
                else
                    myDialog.Pnl1.dropdownCharStyle.enabled = false;
                    myDialog.Pnl1.dropdownParaStyle.enabled = true ;
                    myDialog.Pnl1.pstyle.value = true;
            }// fnc
        }//  if(myCharStyleList.length)
        else
            myDialog.Pnl1.pstyle.onClick = function()
                if(this.value)
                    myDialog.Pnl1.dropdownParaStyle.enabled = true;
                else
                    myDialog.Pnl1.dropdownParaStyle.enabled = false;
    //  Вторая панель
        myDialog.Pnl2 = myDialog.add("panel", undefined, "Parameters of the text frame");
              myDialog.Pnl2.orientation = "column";
        myDialog.Pnl2.alignChildren = "left"; 
        myDialog.Pnl2.dropdownObjStyle = myDialog.Pnl2.add("dropdownlist", undefined, myObjStyleList );
        myDialog.Pnl2.dropdownObjStyle.title = "Select an object style ";
        myDialog.Pnl2.dropdownObjStyle.minimumSize = [250,20];
        myDialog.Pnl2.dropdownObjStyle.enabled = true;
        myDialog.Pnl2.dropdownObjStyle.selection = 0;
        myDialog.Pnl2.Group1 = myDialog.Pnl2.add( "group" );
        myDialog.Pnl2.Group1.stxt1 = myDialog.Pnl2.Group1.add("statictext", undefined, "The width of the text frame");
        myDialog.Pnl2.Group1.etxt = myDialog.Pnl2.Group1.add("edittext", undefined, "40");
        myDialog.Pnl2.Group1.etxt.characters = 10;
        myDialog.Pnl2.Group1.dropdownMeasurementUnits = myDialog.Pnl2.Group1.add("dropdownlist", undefined, myMeasureUnits );
        myDialog.Pnl2.Group1.dropdownMeasurementUnits.maximumSize = [80,20];
        myDialog.Pnl2.Group1.dropdownMeasurementUnits.selection = 0;
        //myDialog.Pnl2.Group1.stxt2 = myDialog.Pnl2.Group1.add("statictext", undefined, "mm ");
        /*myDialog.Pnl2.Group2 = myDialog.Pnl2.add( "group" );
        myDialog.Pnl2.Group2.stxt1 = myDialog.Pnl2.Group2.add("statictext", undefined, "Высота привязанного фрейма  ");
        myDialog.Pnl2.Group2.etxt = myDialog.Pnl2.Group2.add("edittext", undefined, "30");
        myDialog.Pnl2.Group2.etxt.characters = 10;
        //myDialog.Pnl2.Group2.stxt2 = myDialog.Pnl2.Group2.add("statictext", undefined, "mm ");*/
        myDialog.Pnl2.stxt1 = myDialog.Pnl2.add("statictext", undefined, "Attention! When you enter fractional values as");
        myDialog.Pnl2.stxt2 = myDialog.Pnl2.add("statictext", undefined, "the decimal part, should be used");
        myDialog.Pnl2.stxt3 = myDialog.Pnl2.add("statictext", undefined, "point, not comma.");
        myDialog.Pnl2.stxt1.graphics.foregroundColor = myDialog.Pnl2.stxt1.graphics.newPen (myDialog.Pnl2.stxt1.graphics.PenType.SOLID_COLOR, [1, 0, 0, 1], 1);
        myDialog.Pnl2.stxt2.graphics.foregroundColor = myDialog.Pnl2.stxt2.graphics.newPen (myDialog.Pnl2.stxt2.graphics.PenType.SOLID_COLOR, [1, 0, 0, 1], 1);
        myDialog.Pnl2.stxt3.graphics.foregroundColor = myDialog.Pnl2.stxt3.graphics.newPen (myDialog.Pnl2.stxt3.graphics.PenType.SOLID_COLOR, [1, 0, 0, 1], 1);
        // --------- кнопки --------------
        var myGroup = myDialog.add( "group" );
        myGroup.orientation = 'row';
        myGroup.alignChildren = ['fill', 'fill']; 
        myGroup.okButton = myGroup.add( "button", undefined, "OK" );
        myGroup.okButton.onClick = function()
            if(myCharStyleList.length) // есть символьные стили в документе
                if(!myDialog.Pnl1.pstyle.value && !myDialog.Pnl1.сstyle.value)
                    alert("You must select a paragraph style or character style");
                    return ;
                if(myDialog.Pnl1.pstyle.value) { pStyleIndex= myDialog.Pnl1.dropdownParaStyle.selection.index; cStyleIndex = null;}
                else {cStyleIndex = myDialog.Pnl1.dropdownCharStyle.selection.index; pStyleIndex=null; }
            else // нет символьных стилей
                if(!myDialog.Pnl1.pstyle.value)
                    alert("You must select a paragraph style");
                    return;
                pStyleIndex = myDialog.Pnl1.dropdownParaStyle.selection.index;
                cStyleIndex = null;
            } //  else // нет символьных стилей
           oStyleIndex = myDialog.Pnl2.dropdownObjStyle.selection.index;
           if(myDialog.Pnl2.Group1.etxt.text =="")
               alert("Enter the width of the text frame");
               return;
            else
                myW = myDialog.Pnl2.Group1.etxt.text;
                myH = myW;
            /*if(myDialog.Pnl2.Group2.etxt.text == "")
                alert("Введите высоту привязанного фрейма");
                return;
            else
                myH = myDialog.Pnl2.Group2.etxt.text;
           selectUnits = myDialog.Pnl2.Group1.dropdownMeasurementUnits.selection.index;
            myDialog= this.window.close( 1 );
        myGroup.cancelButton = myGroup.add( "button", undefined, "Cancel" );
        myGroup.cancelButton.onClick = function() { myDialog = this.window.close( 0 ); }
        myDialog.Pnl3 = myDialog.add("panel", undefined, "");
        myDialog.Pnl2.alignChildren = "left";
        myDialog.Pnl3.stxt = myDialog.Pnl3.add("statictext", undefined, "(с) Thomas Silkjær        (с) Борис Кащеев, www.adobeindesign.ru ");
        return myDialog;   
    } // fnc
    function getParagraphStyleByName(myStyleName)
              var DocParaStyles = app.activeDocument.paragraphStyles;
              var DocParaGroups = app.activeDocument.paragraphStyleGroups;
              myStyleName = ""+myStyleName;
              var pos = myStyleName.indexOf(":")
              if(pos == -1)
              // стиль не в группе
              var myStyle = DocParaStyles.item(myStyleName);
                        return myStyle;
              } //if
              else
                        var myGroupAndStyleNames = myStyleName.split(":")
                        var myGroupName = myGroupAndStyleNames[0];
                        var myStyleName = myGroupAndStyleNames[1];
                        var myGroup =DocParaGroups.item(myGroupName);
                        return myGroup.paragraphStyles.item(myStyleName);
    } // fnc
    function getCharacterStyleByName(myStyleName)
              var DocChStyles = app.activeDocument.characterStyles;
              var DocCharGroups = app.activeDocument.characterStyleGroups;
              // Есть ли в имени полученного символьного стиля двоеточие? (двоеточие разделяет название группы стилей и название стиля)
              myStyleName = String (myStyleName);
              var pos = myStyleName.indexOf(":");
              if(pos == -1)
              // стиль не в группе
                        return DocChStyles.item(myStyleName)
              } //if...
              else
              {// Стиль в какой-то группе
                        var myGroupAndStyleNames = myStyleName.split(":")
                        var myGroupName = myGroupAndStyleNames[0];
                        var myStyleName = myGroupAndStyleNames[1];
                        var myGroup = DocCharGroups.item(myGroupName);
                        return myGroup.characterStyles.itemByName(myStyleName);
              } // else
    } // fnc()+
    function getObjectStyleByName(myStyleName)
        var DocObjStyles = app.activeDocument.objectStyles;
        var DocCObjGroups = app.activeDocument.objectStyleGroups;
        myStyleName = String (myStyleName);
        var pos = myStyleName.indexOf(":");
        if(pos == -1)
              // стиль не в группе
                        return DocObjStyles.item(myStyleName);
              } //if...
        var myGroupAndStyleNames = myStyleName.split(":");
        var myGroupName = myGroupAndStyleNames[0];
        var myStyleName = myGroupAndStyleNames[1];
        var myGroup = DocObjGroups.item(myGroupName);
                        return myGroup.objectStyles.itemByName(myStyleName);
    } //fnc
    function resetGREPfindChange()
        app.changeGrepPreferences = NothingEnum.nothing;
        app.findGrepPreferences = NothingEnum.nothing;
        app.findChangeGrepOptions.includeFootnotes = false;
        app.findChangeGrepOptions.includeHiddenLayers = false;
        app.findChangeGrepOptions.includeLockedLayersForFind = false;
        app.findChangeGrepOptions.includeLockedStoriesForFind = false;
        app.findChangeGrepOptions.includeMasterPages = false;
    function createAnchoredFrame(myText, myObjStyle)
        var myGeometricBounds = [];
        var myInsertionPoint = myText.insertionPoints[0];
        myInsertionPoint.select;
        var AnchoredTextFrame = myInsertionPoint.textFrames.add();
        myGeometricBounds = AnchoredTextFrame.geometricBounds;
        //alert(parseFloat(myH) + " " + parseFloat(myW))
        myGeometricBounds[2] = myGeometricBounds[0] + parseFloat(myH);
        myGeometricBounds[3] = myGeometricBounds[1] + parseFloat(myW);
        AnchoredTextFrame.geometricBounds = myGeometricBounds;
        AnchoredTextFrame.anchoredObjectSettings.anchoredPosition = AnchorPosition.anchored;
        myText.move(LocationOptions.before, AnchoredTextFrame.texts[0]);
        AnchoredTextFrame.appliedObjectStyle = myObjStyle;
        AnchoredTextFrame.fit(FitOptions.CONTENT_TO_FRAME);
        var FO = FitOptions.FRAME_TO_CONTENT,
        tfs = ([]).concat.apply([], app.activeDocument.stories.everyItem().textContainers),
        t, i = tfs.length;
    while( i-- ) (t=tfs[i]).overflows && ( t.locked || t.fit(FO) );
    } //fnc
    main();

    Hi Cari,
    I did create a new user account (admin level) and InDesign works like a charm.
    When I went back to the other account, plug-ins gone, I deleted the prefs and caches, restarted and still everything is crashing as before.
    At least I am working on one account and I will contiue to troubleshoot on the other account. And at some point either the new account will crash or the old account will work and I will go from there.
    Thanks for the info about Mac remembering info. Always trying to be helpful these Macs.
    And thanks for getting at least into a workable space!!! I am supremely grateful!

  • Why I can't export a single frame from my composition?

    I try to export a single frame from the cavas but motion just did nothing when I click on export. Is there something wrong with my motion setup? I have trashed the motion's plist couple times already but still having the same issue. I can't even save the project. When click on save, motion did nothing, just like export. HELP!

    I see that you are on an intel mac. Are you running the universal versions (Final Cut Studio 5.1 w/ Motion 2.1)?
    See this article for troubleshooting steps: http://docs.info.apple.com/article.html?artnum=302596.
    When I am having major issues like this, I just start over from scratch. Do a complete erase and install with the OS discs, reinstall all applications and update everything with software update. I keep a separate partition just for film and video work that I can blow away any time (I don't store any important files on it).

  • Still frame from video: PS Elements 9

    I am new to PS, trying to get a still frame from a video. My camera uses a file  MP4, but PS says it does not accept that format.  How do I convert my MP4 videos so I can get some still pix from it?  I did the file>import>> frame for video>browze. It works with a sample video on my computer but not the video from my camera.  PLEASE HELP!  Thank you

    One more thing---I'm working with PC: Windows 7 and only the PSE, not the premier version. 

  • How to stop frame from closing?

    Hi,
    ramka.addWindowListener(new WindowAdapter()
                  public void windowClosing(WindowEvent e)
                      Object [] qqq = {"yes", "no"};
                      int answer = JOptionPane.showOptionDialog(
                                null,
                                 "want to close window?",
                                 JOptionPane.YES_NO_OPTION,
                                  JOptionPane.QUESTION_MESSAGE,
                                  null,
                                 qqq,
                                 qqq[1]);
                      if (answer == JOptionPane.YES_OPTION)
                           // WHAT TO DO TO STOP WINDOW FROM CLOSING?
                  });as you can see above i want to stop frame from closing.
    what should i do in the commented line?
    or maybe somewhere else?
    please help,
    thanks

    Hello friend,
    I've found a solution for your query. I think, you'll get a solution from my codings. I've given you below my codings,plz go through it.Verify it. Reply me about my codings.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.JOptionPane;
    public class MyFrame extends JFrame{
         JButton jb=new JButton("My Details");
         public MyFrame(){
         JPanel jp=new JPanel();
         jp.add(jb,new FlowLayout(FlowLayout.CENTER));
         add(jp);
         jb.addActionListener(new ActionListener(){
         public void actionPerformed(ActionEvent ae){
                   if(ae.getSource()==jb){
                        String str[]={
                             "Name : Karthikeyan.K",
                             "Email-ID : [email protected]"
                        JOptionPane.showMessageDialog(null, str);
    WindowCloser wc=new WindowCloser();
    addWindowListener(wc);
         class WindowCloser extends WindowAdapter{
              public void windowClosing(WindowEvent we){
                   int res=JOptionPane.showConfirmDialog(null,"Do you want to exit from it?","Confirmation!!!",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE);
                   switch(res){
                        case JOptionPane.YES_OPTION:
                             dispose();
                             System.exit(0);
                             break;
                        case JOptionPane.NO_OPTION:
                             repaint();
                             doOpenFrame();
                             break;
                        case JOptionPane.CANCEL_OPTION:
                             repaint();
                             doOpenFrame();
                             break;
                        case JOptionPane.CLOSED_OPTION:
                             repaint();
                             doOpenFrame();
                             break;
         public static void doOpenFrame(){
              MyFrame mf=new MyFrame();
              mf.pack();
              mf.setSize(400,400);
              mf.setVisible(true);
         public static void main(String ar[]){
         doOpenFrame();
    }

Maybe you are looking for

  • Mandatory fields for xd01

    hai, what are the mandatory fields to create the datas for xd01.(customer master data). regards surender

  • IPods not working with iTunes 12.1 or OS 10.8.5

    I recently tried to sync my old Gen 3 nano to my newest laptop. It wasn't recognized in iTunes 12.1. Thinking it was just old, I bought a shuffle, only to have iTunes 12.1 tell me there was an issue and to uninstall and re-install iTunes. When lookin

  • IPod Won't charge when put onto dock

    So 2 years ago I got a Phillips Dock for an iPod and I got an iPod 5. The dock was for an iPod 4th gen so I bought an adapter it plays my music but won't charge my iPod....why?

  • My Acrobat 9 Pro Serial isn't working.  How do i resolve?

    My Acrobat 9 Pro Serial isn't working.  How do i resolve?

  • Problems Playing a Captivate Simulation

    I have published a project using Adobe Captivate. Some users have the first slide play and then the simulation automatically stops, if you press the next button in progress to the next slide but the slide stay on the screen and the audio continues. O