A better way to determine the current state of the FLVPlayback component?

Below is the AS3 code I have used to display images (MCs) over an instance of the FLVPlayback component.  These images (one for loading, one for the title) are to appear – or disappear – according to the current state of the FLVPlayback component. 
It “works,” but when testing, I have noticed that it can be rather finicky.  The most common issue that arises is that many times the loadPoster movieclip will still be visible even though the video has entered the playing state.
Also, I wanted a title placeholder image to appear whenever the user stops the video or if the video completes.  However, I had to add the conditional statement to the “stoppedStateEntered” case to make everything appear when expected.  When the video is first viewed (and has completed buffering), it seems that the FLVPlayback component enters the stopped state before entering the playing state.  Thus, the titlePoster would flash on the screen right before it and the loadPoster “should” disappear when the video begins playing.
Even in my limited testing, these issues were very easily re-created.  I am definitely looking for a more reliable solution.  Is there a better (or more correct) way to go about all this?  If possible, I would like to stick with the FLVPlayback component, just for the simple fact of not having to code my own.
Where am I going wrong?
function updateMoviePoster(event:VideoEvent):void
                switch (event.type)
                                case "playingStateEntered":
                                                loadPoster.visible = false;
                                                titlePoster.visible = false;
                                break;
                                case "stoppedStateEntered":
                                                if (loadPoster.visible == false)
                                                                titlePoster.visible = true;
                                break;
                                case "complete":
                                                titlePoster.visible = true;
                                break;
myFLVPlayback.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, updateMoviePoster);
myFLVPlayback.addEventListener(VideoEvent.STOPPED_STATE_ENTERED, updateMoviePoster);
myFLVPlayback.addEventListener(VideoEvent.COMPLETE, updateMoviePoster);

Any suggestions?  I would truly appreciate the help.

Similar Messages

  • Error occurred in deployment step 'Add Solution': Operation is not valid due to the current state of the object

    hi,
      when i was trying to deploy a SP  solution from my vs 2012 solution. this error  is displayed.
    i tried many things like
    1) get the wsp and apply power shell cmds to add and deploy, here also it failed:
    Add-SPSolution -LiteralPath d:\mywsp.wsp
    Install-SPSolution mywsp.wsp -GacDeployment -AllWebApplications -Local
    2) restart the timer services and  do  iisreset and  reboot the server. etc .as mentioned in one of the  the below  blogs:
    http://sharepoint1on1.blogspot.in/2014/04/sharepoint-error-occurred-in-deployment.html
    http://suehernandez.wordpress.com/2011/03/31/error-occurred-in-deployment-step-activate-features-operation-is-not-valid-due-to-the-current-state-of-the-object/
    http://www.dotnetsharepoint.com/2014/04/error-occurred-in-deployment-step-add.html
    http://social.msdn.microsoft.com/Forums/en-US/63adde23-03cf-4b65-923e-1219da94a780/error-occurred-in-deployment-step-add-solution-operation-is-not-valid-due-to-the-current-state-of?forum=sharepointdevelopmentprevious
    http://www.shakirmajeed.com/error-occurred-in-deployment-step-activate-features-operation-is-not-valid-due-to-the-current-state-of-the-object/
    but even after doing all these steps, the  error still persists!. and am not deploying into a remote server, the dev env is in a VM, where sp 2013, vs 2012, sql 2012  are installed.
    just wanna share one  note:   there is a isue in my search admin component. index was reset due to some reason. and from that time onwards my search full/incremental crawls were not working!
    will this cause an issue in my wsp deployment ? i hope  it wont, still  asking...
    can anyone help me how to resolve this error.because this is a  show stopper for me for the last few days!
    help is highly appreciated!

    This issue cause because of feature activation failure while WSP deployment.
    when you create a WSP using visual studio, it creates WSP package with default deployment configuration settings.
    Please restrict feature activation configuration, this will help you to troubleshoot this issue.
    - Click on Project in WSP and press F4, it will open "Project Properties"
    - set "Active deployment Configuration" - as "No Activation"
    - you can activate this features in required sequence after deployment using Activate-SPFeature
    If my contribution helps you, please click Mark As Answer on that post and Vote as Helpful
    Thanks, ShankarSingh(MCP)

  • Error_27_Error occurred in deployment step 'Activate Features': Operation is not valid due to the current state of the object.

    I created a SharePoint 2013 farm solution project in Visual Studio 2013 (running on the same machine where SharePoint 2013 server is running) with
    event receiver.  I added web.config at project root level to store connection string (I'm working off external SQL DB) and got the following error during deployement:
    Error 27
    Error occurred in deployment step 'Activate Features': Operation is not valid due to the current state of the object.
    When I commented out the ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString; the error went away.  Am I missing something or not supposed to add my own App.config to SharePoint project solution? 

    Hi,
    From your description, you might want to store your connection string in web.config and there is an error during deployment.
    It is recommended to store the configuration data of SharePoint solution in either property bags or hierarchical object store.
    The links below will provide more information about this:
    http://blogs.msdn.com/b/zwsong/archive/2012/03/27/where-should-you-store-your-sharepoint-solution-s-configuration-data.aspx
    http://msdn.microsoft.com/en-us/library/ff647766.aspx
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they
    help and unmark them if they provide no help. If you have feedback for TechNet
    Subscriber Support, contact [email protected]
    Patrick Liang
    TechNet Community Support

  • The update operation is not allowed in the current state of the request

    When users have logged a request through the service manager 2012 portal and they go back in to add user input they sometimes receive a message that says " The update operation is not allowed in the current state of the request." The state of the
    request has not changed it is still Active and has not breached its service level .
    I can't seem to find any information about this error and don't know how to troubleshoot it. Any help and advice would be appreciated.
    Thanks
    Sarah

    ok, so they're adding user comments after creating the service request. looks like this:
    the first thing to check is that the user is added to the default, un-scoped "End User" security role, or the custom end user security role they are added to has a scope that includes all work items. The "user input" field adds a user comment related
    to the SR, so the ability to create user comments is required to use this field.

  • WCF Service update UPS. Operation is not valid due to the current state of the object.

    I try import custom data to custom user properties from my own wcf service (on sharepoint server machine), but i got
    Message "Operation is not valid due to the current state of the object. "
    on line
    userProfile[PropertyConstants.Department].Value = "SDDDD";
    Why i cant modify property value?
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite site = new SPSite("http://portal.local"))
    SPServiceContext serviceContext = SPServiceContext.GetContext(site);
    using (var web = site.OpenWeb())
    Debug.WriteLine(web.CurrentUser); //Here AppPoolAccount user of current wcf service
    Debug.WriteLine(WindowsIdentity.GetCurrent().Name); //Here too AppPoolAccount user of current wcf service
    UserProfileManager userProfileMgr = new UserProfileManager(serviceContext);
    ProfilePropertyManager profilePropMgr = new UserProfileConfigManager(serviceContext).ProfilePropertyManager;
    ProfileSubtypePropertyManager subtypePropMgr = profilePropMgr.GetProfileSubtypeProperties("UserProfile");
    UserProfile userProfile = userProfileMgr.GetUserProfile(accountName);
    userProfile[PropertyConstants.Department].Value = "SDDDD";
    userProfile.Commit();
    My service running under domain\SPSvcAcc what have full permissions on UPS service, it's management account and UPS admin with full rights.
    If i create console app with identical code and run it under SPSvcAcc account it working without problems
    What i do wrong?

    Hi,
    pls seee if you can add threading like this below to solve the pbm
    https://social.technet.microsoft.com/Forums/office/en-US/b6d6f85c-e12b-4540-a821-690e296b7b56/operation-is-not-valid-due-to-the-current-state-of-the-object-exception-when-activating-a?forum=sharepointdevelopmentprevious
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Microsoft RMS Add-in Operation is not valid due to the current state of the object

    Microsoft Rights Management sharing application for Windows
    Microsoft Windows 7/Office 2010 Service Pack 2
    Click 'Share Protected'
    Receive the following error message 'Microsoft RMS Add-in Operation is not valid due to the current state of the object'
    Microsoft Windows 7/Office 2013 Service Pack 1
    Works fine
    Any ideas why this is not working?

    Hi lra,
    As per my understanding, I think this issue can be caused by MaxHttpCollectionKeys settings in report manager web.config file.
    For more details, please refer this similar thread to override the default value of MaxHttpCollectionKeys:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/cb6ede72-6ed1-4379-9d3c-847c11b75b32/report-manager-operation-cannot-run-due-to-current-state-of-the-object?forum=sqlreportingservices
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • "Operation is not valid due to the current state of the object" error when trying to create a link for a shared folder in OneDrive

    I'm trying to share a folder in OneDrive with another user in my organization, and create a link so that people outside of the company can see the folder. Whenever I try to create a link I get an error that says: "Couldn't create the link sorry something
    went wrong operation is not valid due to the current state of the object" How do I resolve this?

    Hi,
    Sorry for replying late and I noticed that you posted another thread in this forum:
    http://social.technet.microsoft.com/Forums/en-US/2b8c6f54-9c59-4b37-b28f-1d49a1b7913b/operation-is-not-valid-due-to-the-current-state-of-the-object-error-when-trying-to-create-a-link?forum=officeitpro
    I've replied and kindly refer to it to see if it is helpful.
    Regards,
    Melon Chen
    TechNet Community Support

  • Error occurred in deployment step 'Activate Features': Operation is not valid due to the current state of the object.

    I recently copied a solution from one dev box to another. After pushing through a handful of other errors I hit a wall with this one. Any hints as to the human translation would be appreciated. The solution works on the original box. Also if there's
    a way to make the Forum Category list on this page smaller but with more items while making the icons and white space bigger, Microsoft would like to know. Thanks

    Hi George Takei,
    This is a common error message which is not easy to find the root cause directly.
    Here are some general checking steps:
    Check to make sure you haven’t change any objects like namespace, class name, that make feature cannot find specified class.
    Deactivate the feature on the site, reset IIS, and redeploy the solution.
    Kill the vssphost4.exe in Task Manager, to redeploy the feature.
    If the issue persists, it would be better to share the solution here to help to do troubleshooting, what’s the solution used for, is it an event receiver, feature, workflow or other type?
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Operation is not valid due to the current state of the object

    We are working with the System.Transactions for transaction control. An error is happening when confirming a transaction. Even without having changed any information. The user opens a register and does not modify any information, press the Change button and generates the error. Is not processed any UPDATE, DELETE, INSERT. Only queries. Below is the error details:
    Data base: Oracle 11g
    Application Server: Windows 2003 64 bits. Client 11g 32 bits and 64 bits
    Location: System.Transactions
    StackTrace:
    at System.Transactions.TransactionState.ChangeStatePromotedCommitted(InternalTransaction tx)
    at System.Transactions.DurableEnlistmentDelegated.Committed(InternalEnlistment enlistment)
    at System.Transactions.SinglePhaseEnlistment.Committed()
    at Oracle.DataAccess.Client.PromotableTxnMgr.SinglePhaseCommit(SinglePhaseEnlistment spe)
    at System.Transactions.TransactionStateDelegatedCommitting.EnterState(InternalTransaction tx)
    at System.Transactions.TransactionStateDelegated.BeginCommit(InternalTransaction tx, Boolean asyncCommit, AsyncCallback asyncCallback, Object asyncState)
    at System.Transactions.CommittableTransaction.Commit()
    at System.Transactions.TransactionScope.InternalDispose()
    at System.Transactions.TransactionScope.Dispose()
    at FPw.InfraEstrutura.DataAccess.FPwTransacao.Dispose()
    at LG.FPw_Cad.ServicoMapeador.Servicos.FichaCad.Update(Int32 lUserId, Int32 lMatFunc, LGVariant avRegFun, LGVariant avRegATF, Double dSalario, Boolean bConsiste)

    What I meant is that it's done any kind of alteration of the tables involved, because the user does not change any of your information on the screen.
    The problem happens on a client and does not happen in our test environment.
    The version of Oracle.DataAccess both 32-bit and 64 bit is 2.112.1.0.
    What is the code in the following summary:
    1) Is created transactional context:
    Dim TxOptions As New TransactionOptions
    Dim OpcaoDeEscopo As TransactionScopeOption
    Dim Transacao As System.Transactions.TransactionScope
    TxOptions.IsolationLevel = Transactions.IsolationLevel.ReadCommitted
    OpcaoDeEscopo = TransactionScopeOption.Required
    Transacao = New TransactionScope(opcaoDeEscopo, TxOptions, EnterpriseServicesInteropOption.Full)
    2) From this point are open connections are made and query commands to the database.
    Are opened and closed connections to the database.
    3) At the time of effecting the transaction Dispose of the error happens:
    Transacao.Dispose
    Note: Our way of working has its own peculiarities, the connection pool is always disabled: ";Pooling = false". It is inserted directly in the connection string. We need to do this because the pool had memory problems turned prey.
    Therefore the process of opening and closing connections, you can leave the system slow. So to avoid open connections within the transactional context, in some cases we enforce the transaction enlist. As follows:
    Dim TransacaoCorrente As ITransaction = CType(ContextUtil.Transaction, ITransaction)
    Conexao.EnlistDistributedTransaction(TransacaoCorrente)
    Can you help us?
    Edited by: 893128 on Oct 25, 2011 9:24 AM

  • ABAP OO Dynpro - What is current state-of-the-art of this?

    Hello SDN Community,
    I am looking to determine the current state-of-the-art of ABAP OO Dynpro programming.
    I have extensively searched both with Google and within SDN.  Best thing I could find was two articles from Thomas Jung from SAP Labs --> "ABAP OO Mixed with Classic Dynpro (02/21/2005)"  and "OO ABAP Dynpro Programming (09/20/2005)".
    Has anyone done any further development of this concept since Thomas's posts?  If so, can anyone point me to any relevant articles, source codes, examples?
    Thank you,
    Dean Atteberry.

    Hi Dean,
    It's a hard question to answer in reality because WDA is a growing beast. Even though there are new technologies involved now it's still still classic WDA. WDA has always been built with OO in mind. The only difference these days is that the functionality has been changed to allow for more RIA (rich internet applications).
    You have started in the right by checking out Thomas's blogs as he is one of the leaders in WDA. You might want to also check out www.enterprisegeeks.com. 
    If this is not useful to you then I apologise. However, if I can help in a any other mate I will gladly do so.
    Regards,
    Neil.

  • Looking for a better way to determine string variable from multiple options

    Hi,
    I trying to figure out a better way to determine a string variable from multiple options.
    Say i have five pictures each with a different filename: img1 - img5...these file names could be named anything really but for this example i will keep them as img1, img2, img3, img4 and img5.
    I want to display a messagebox with the string depending on what a certain variable is.
    So for example, we have the number X, if X = 1 then i want the messagebox to show "img1" as the message
    Essentially the way I have been doing it so far is:
    Private Sub WhichImage()
    Dim ImageName As String = ""
    Dim i as integer
    If i = 0 Then
    ImageName = "img1"
    End If
    If i = 1 Then
    ImageName = "img2"
    End If
    If i = 2 Then
    ImageName = "img3"
    End If
    If i = 3 Then
    ImageName = "img4"
    End If
    If i = 4 Then
    ImageName = "img5"
    End If
    MessageBox.show(imagename, "Name of image", MsgBox.Style.OkOnly, MsgBoxResult.Ok)
    end
    Up until now, this has been fine, but what if I have 50 images, do I have to do this for all 50 images? or is there an easier way like putting the image names into a text file and have it read from the file depending on what the variable i equals? If so,
    how do I go about this? Does each image name go on a separate line? can it just be separated by a comma instead? or is there a better way?
    Please note that i know that i have declared "i" above in my code and not intialised it with anything, in reality "i" comes from somewhere else in the program so please ignore that part, it is not what I am concerned with.
    Thanks
    Mersec

    Does each image name go on a separate line? can it just be separated by a comma instead? or is there a better way?
    Arrays are useful for this.
    Dim imagenames() As String = {"img1", "img2", "img3", "img4", "img5"}
    Dim imagename As String = imagenames(i)
    MessageBox.Show(imagename, "Name of image")
    Any sort of collection will do instead of an array, and may be simpler to manage. There are many other options - the most suitable one probably depends on where the names originally come from.  For instance, if you are getting them from a folder
    using the FileSystem.GetFiles method, then they are already in a collection.
    If the files names never change then you may as well include them in the program code, using something like the code above.  If they can change, then you could use a text file, but that means you need a file update routine.  If that is required
    then the way you store the names will dictate how you access them.

  • How to get the name of the city and state of the current location of the user

    Hi all
             i need to get the name of the city and state (full address) of the current location of the user.
    need help.

    The best way to do this is to put the monitor name as a property bag in the script and pass that to your event details. Otherwise, we're looking at querying the database each time the monitor generates an event, and this is overhead that is really not
    necessary. The other option, which is just even worse in terms of performance, is to use powershell to query the SDK for the monitor name. Both of these options are not going to be a good solution, because now you need to implement action accounts that can
    either query the database or the sdk.
    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

  • HELP! InDesign CC got an error: The property is not applicable in the current state." number 30615

    HELP! Was working perfectly now it is giving me this error and doesn't seem to be going past the printing option. Code is below.
    main.scpt
    set posixIdPath to "/Applications/Adobe InDesign CC/Adobe InDesign CC.app"
    do shell script "/Users/cdapice/Desktop/cryptoquip/getquip.sh"
    delay 8
    tell application posixIdPath
    activate
    end tell
    delay 8
    set scripttoRun to ":Users:cdapice:Desktop:cryptoquip:Script.jsx" as alias
    tell application "Adobe InDesign CC"
    do script scripttoRun language javascript
    end tell
    delay 5
    Adobe InDesign CC got an error: The property is not applicable in the current state." number 30615
    Script.jsx
    var myDocument = app.open(File("/Users/cdapice/Desktop/cryptoquip/NewCryptoquip.indt"), true);
    //var myDocument = app.activeDocument;
    var myPage = myDocument.pages.item(0);
    var myTextFrame = myPage.textFrames.add();
    //Place a text file in the text frame.
    //Parameters for TextFrame.place():
    //File as File object,
    //[ShowingOptions as Boolean = False]
    //You'll have to fill in your own file path.
    myTextFrame.place(File("/Users/cdapice/Desktop/cryptoquip/quips.txt"));
    //var myTextFrame = app.selection[0];
    myTextFrame.parentStory.pointSize = 10;
    var brkStory = myTextFrame.parentStory.contents;
    var myPIs = myDocument.pageItems;
    var  destTextFrame = myPIs[6];
    destTextFrame.parentStory.contents = brkStory;
    firstChange();
    myTextFrame.remove();
    app.select(destTextFrame);
    splitStory();
    for (i = 0; i < myPIs.length; i++) {
              if (myPIs[i].appliedObjectStyle.name == "puzzleBox") {
                        var newBoxStyle = myPIs[i].appliedObjectStyle;
                        secondChange(myPIs[i]);
            myPIs[i].applyObjectStyle(newBoxStyle,true);
        if(myPIs[i].appliedObjectStyle.name == "otherBox"){
            var newBoxStyle = myPIs[i].appliedObjectStyle;
            myPIs[i].applyObjectStyle(newBoxStyle,true);
    Date.prototype.getMonthFormatted = function() {
        var month = this.getMonth() + 1;
        var formMonth = month < 10 ? '0' + month : month; // ('' + month) for string result
              return formMonth.toString();
    Date.prototype.getDayFormatted = function() {
        var day = this.getDate();
        var formDay = day < 10 ? '0' + day : day; // ('' + day) for string result
              return formDay.toString();
    var newdate = new Date();
    var laterdate = new Date();
    var dayofweek = newdate.getDay();
    var offsetdays = 0;
    switch(dayofweek) {
        case 2:
            offsetdays = 6;
            break;
        case 3:
            offsetdays = 5;
            break;
        case 4:
            offsetdays = 4;
            break;
        case 5:
            offsetdays = 3;
            break;
    app.epsExportPreferences.appliedFlattenerPreset.convertAllStrokesToOutlines = true;
    app.epsExportPreferences.appliedFlattenerPreset.convertAllTextToOutlines = true;
    app.epsExportPreferences.appliedFlattenerPreset.rasterVectorBalance = 100;
    //app.activeDocument.exportFile(ExportFormat.epsType, newFile, false);
    for (i = 1; i < 7; i++) {
        var curPage = i + "";
        var x = i + (offsetdays - 1);
        laterdate.setMonth(newdate.getMonth());
        laterdate.setDate(newdate.getDate());
        //alert(newdate);
        //alert(x);
        //alert(laterdate);
        laterdate.setDate(newdate.getDate() + x);
        //alert(laterdate);
        var nameDate = laterdate.getMonthFormatted() + laterdate.getDayFormatted() + ".eps"
        //alert(nameDate);
        app.epsExportPreferences.pageRange = curPage;
        var curFile = new File("/Users/cdapice/Desktop/cryptoquip/" + nameDate);
        app.activeDocument.exportFile(ExportFormat.epsType, curFile, false);
    var endDate = laterdate.getMonthFormatted() + laterdate.getDayFormatted();
    var firstDate = new Date();
    firstDate.setDate(newdate.getDate() + offsetdays);
    var startDate = firstDate.getMonthFormatted() + firstDate.getDayFormatted();
    var idFile = "cryptoquip_" + startDate + "_" + endDate + ".indd";
    app.activeDocument.save(new File("/Users/cdapice/Desktop/cryptoquip/" + idFile));
    with (app.activeDocument.printPreferences){
            printer = "Advertising - Creative - Color Xerox";
            copies = 1;
            pageRange = "1-6";
            paperSize = "US Letter";
            paperHeight = "11 in";
            paperWidth = "8.5 in";
            printPageOrientation = PrintPageOrientation.landscape;
            pagePosition = PagePositions.centered;
           scaleHeight = 100;
           scaleWidth = 100;
            scaleMode = ScaleModes.scaleWidthHeight;
            scaleProportional = true;
            pageInformationMarks = true;
            colorOutput = ColorOutputModes.COMPOSITE_CMYK;
    app.activeDocument.print(false);
    for(myCounter = app.documents.length; myCounter > 0; myCounter--){
    app.documents.item(myCounter-1).close(SaveOptions.no);
    function firstChange() {
              app.findTextPreferences = NothingEnum.NOTHING;
              app.changeTextPreferences = NothingEnum.NOTHING;
              app.findChangeTextOptions.caseSensitive = false;
        app.findTextPreferences.findWhat = "^t";
              app.changeTextPreferences.changeTo = "";
              myDocument.changeText();
              app.findTextPreferences = NothingEnum.NOTHING;
              app.changeTextPreferences = NothingEnum.NOTHING;
         app.findTextPreferences.findWhat = "^p^p";
              app.changeTextPreferences.changeTo = "^p";
              myDocument.changeText();
              app.findTextPreferences = NothingEnum.NOTHING;
              app.changeTextPreferences = NothingEnum.NOTHING;
              app.findTextPreferences.findWhat = "^p";
              app.changeTextPreferences.changeTo = "^R";
              myDocument.changeText();
              app.findTextPreferences = NothingEnum.NOTHING;
              app.changeTextPreferences = NothingEnum.NOTHING;
    function secondChange(curFrame) {
              app.findTextPreferences = NothingEnum.NOTHING;
              app.changeTextPreferences = NothingEnum.NOTHING;
              app.findChangeTextOptions.caseSensitive = false;
        app.findTextPreferences.findWhat = "    ";
              app.changeTextPreferences.changeTo = "|";
              curFrame.changeText();
              app.findTextPreferences = NothingEnum.NOTHING;
              app.changeTextPreferences = NothingEnum.NOTHING;
         app.findTextPreferences.findWhat = " ";
              app.changeTextPreferences.changeTo = "";
              curFrame.changeText();
              app.findTextPreferences = NothingEnum.NOTHING;
              app.changeTextPreferences = NothingEnum.NOTHING;
              app.findTextPreferences.findWhat = "|";
              app.changeTextPreferences.changeTo = " ";
              curFrame.changeText();
              app.findTextPreferences = NothingEnum.NOTHING;
              app.changeTextPreferences = NothingEnum.NOTHING;
    function splitStory(){
              //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){
                                  //Get the first item in the selection.
                                  var mySelection = app.selection[0];
                                  //Process the selection. If text or a text frame is
                                  //selected, do something; otherwise, do nothing.
                                  switch(mySelection.constructor.name){
                                            case "Text":
                                            case "InsertionPoint":
                                            case "Character":
                                            case "Word":
                                            case "Line":
                                            case "TextStyleRange":
                                            case "Paragraph":
                                            case "TextColumn":
                                            case "TextFrame":
                                                      //If the text frame is the only text frame in the story, do nothing.
                                                      if(mySelection.parentStory.textContainers.length > 1){
                                                                //Splitting the story is a two-step process: first, duplicate
                                                                //the text frames, second, delete the original text frames.
                                                                mySplitStory(mySelection.parentStory);
                                                                myRemoveFrames(mySelection.parentStory);
                                                      else{
                                                                alert("Please select a story containing more than one text frame and try again.");
                                                      break;
                                            default:
                                                      alert("Please select some text or a text frame and try again.");
                        else{
                                  alert("Please select some text or a text frame and try again.");
              else{
                        alert("Please open a document and try again.");
    function mySplitStory(myStory){
              var myTextFrame;
              //Duplicate each text frame in the story.
              for(var myCounter = myStory.textContainers.length-1; myCounter >= 0; myCounter --){
                        myTextFrame = myStory.textContainers[myCounter];
                        myTextFrame.duplicate();
    function myRemoveFrames(myStory){
              //Remove each text frame in the story. Iterate backwards to avoid invalid references.
              for(var myCounter = myStory.textContainers.length-1; myCounter >= 0; myCounter --){
                        myStory.textContainers[myCounter].remove();

    Hotfixes are special, out-of-band patches created to fix specific problems, so they are never published to Windows Update.  Often the hotfix gets incorporated into a released patch that is published on Windows Update.  If this hotfix was incorporated
    into a released patch, and you applied that patch to your system, the hotfix would see that its files are older than the latest files on the system and would give you this message.  Because the hotfix is not for general distribution, there is rarely documentation
    saying that it has been superceded.
    Generally there is a file list with a hotfix/patch that gives you the version number of the affected files.  You can go through those files to see that you have the latest files.  The problem is finding the actual patch that updated those files. 
    Without going through lots of patches, it is hard to find which patch made the hotfix obsolete.
    .:|:.:|:. tim

  • How to find the current state in web dynpro

    Hi,
       Can any one tell me how to find the current state of system (idle /not idle).
    Thanks,
    Krishna..

    Please explain further.  I don't understand how you are expecting to test for idle.  If ABAP code is being executed, then you know that the application is not idle. Only a server event could trigger code execution. Only a timedTrigger would be able to tell you that a certain amount of time has passed without activitity - although the event of the timer itself will be a server event that constitutes activity.

  • Is there any way to to have the "Home" icon open a new tab instead of replacing the current page with the home page?

    I would prefer that the "Home" icon on the Navigation Toolbar open a new tab instead of replacing the current tab with the home page. Is there any way to accomplish this?
    Thank you.

    If you middle-click on the home icon it will open a new tab containing the home page.

Maybe you are looking for

  • Movie playback issues

    My movies are having playback issues again. Default settings are 44.1kHz  16bps  720p HD. Operating System: Windows 8 Itunes Version 12.1.0 The issue is the sound goes in the beginning of each film. I have a computer which is two years old and yet th

  • Adding a clock to a field in a PDF using Adobe Designer

    Hi, I am trying to add a clock field to a PDF. It needs to be a continous clock in the format of HH:MM:SS. I am having alot of trouble. It is probably quite simple. Can anyone help? Thanks, Damo.

  • What is BOM? Steps Needed. How is it Related to Product Costing

    Gurus, What is BOM? How is it related to Product Costing and Profitability Analysis and CO? Technical help and steps would be appreciated. Thanks. Points available.

  • External Drive for both PC and G4

    Hi-I am new to this, so please explain in very simple terms. I need to get an external hard drive (looked at Maxtor& seagate so far. Need 300-500 GB. I am in Fashion deisgn and need to downoad programs off the main frame at work. I will do this throu

  • Interface Builder Fold Down Panel?

    Hey Thanks to everyone on these forums there a huge help. I'm trying to recreate the fold down effect that the open file panel has were the panel like folds out of the top of the app. Is there a way I could recreate this in Interface Builder or possi