6 Replies Latest reply on Dec 30, 2010 6:30 AM by A.kameshwaran

    long time loop

    A.kameshwaran Level 1

      Hi,

       

           I want to run the loop for long time in my application.  If i do within few seconds i am getting a alert message like "Script in this movie make flash player to run slow . do you want to abort the script". How to overcome from this. Please tel me how to overcome from this.

       

      Regards,

      Kameshwaran A

        • 1. Re: long time loop
          Ned Murphy Adobe Community Professional & MVP

          Can you show the script you are using that you want to run for a long time?

          • 2. Re: long time loop
            Vishwas Gagrani

            file - > publish settings -> flash tab -> Script time limit ( edit this)

            • 3. Re: long time loop
              A.kameshwaran Level 1

              Hi Murphy,

                   concept is I have to load minimum of 200 xml and want to create 3 different output xml.  one parent loop which will have multiple loop inside it. I can paste the code but it is 1000 lines. Is it k shall i paste it.

              • 4. Re: long time loop
                A.kameshwaran Level 1

                Hi Murphy,

                 

                I wil check it immediately and let you know.

                 

                Regards,

                Kameshwaran A.

                • 5. Re: long time loop
                  Ned Murphy Adobe Community Professional & MVP

                  If you include all 1000 lines, no one is going to go thru it all.  What you should do is just show the general looping elements that are involved and leave out the other 990 or so lines

                  .

                  • 6. Re: long time loop
                    A.kameshwaran Level 1

                    Hi Murphy,

                     

                         Please find the below code

                     

                     

                    invXml.onLoad = function(Success:Boolean)
                    {
                        if (Success)
                        {
                            invPageStr = "/articles/article/page_details/page";
                            invPageArr = XPathAPI.selectNodeList(this.firstChild, invPageStr);
                            initload();
                        }
                    }
                    invXml.load("files/" + _global.batch + "/" + _global.batchname + "/"+ _global.batchname + "_zoner.xml"+ "?dummy="+time_get);
                    pageXml1.onLoad = function(Success:Boolean)
                    {
                        if (Success)
                        {
                            for (j = 0; j < fileArr.length; j++)
                            {
                            }
                            for (j = 3; j < artcnt; j++)
                            {
                                for (k = 0; k < zoncnt; k++)
                                {
                                }
                            }
                            i++;
                            if (i < fileArr.length)
                            {
                                invPageSplitArr = [];
                                issueXml.firstChild.insertBefore(pageXml1.firstChild,issueXml.firstChild.childNodes[i]);
                                initload();
                            }
                            else
                            {
                                for (k = 0; k < invXml.firstChild.attributes.maxid; k++)
                                {
                                    for (j = 0; j < issueArtArr.length; j++)
                                    {
                                        for (l = 3; l < issueArtArr[j].childNodes.length; l++)
                                        {
                                        }
                                    }
                                }
                                for (k = 1; k <= invXml.firstChild.attributes.maxid; k++)
                                {
                                    for (j = 0; j < issueArtArr.length; j++)
                                    {
                                        for (l = 3; l < issueArtArr[j].childNodes.length; l++)
                                        {
                                            for (ij = 0; ij < invArtArr.length; ij++)
                                            {
                                                for (jk = 0; jk < invArtArr[ij].childNodes[4].childNodes.length; jk++)
                                                {
                                                }
                                            }
                                            break;
                                        }
                                        if (tempLoopexit == true)
                                        {
                                            tempLoopexit = false;
                                            break;
                                        }
                                    }
                                }
                                for (i = 0; i < fmMaxId; i++)
                                {
                                    for (j = 0; j < issueArtArr.length; j++)
                                    {
                                        for (k = 3; k < issueArtArr[j].childNodes.length; k++)
                                        {
                                            if (fmArtId == fmarticleid)
                                            {
                                                for (l = 0; l < issueArtArr[j].childNodes[k].childNodes.length; l++)
                                                {
                                                   
                                                }
                                            }
                                        }
                                    }
                                    if (fmarticleType != "")
                                    {
                                        if (fmauthorTag.length > 0)
                                        {
                                            for (j = 0; j < fmauthorTag.length; j++)
                                            {
                                                for(var ijk=0;ijk<root_child_length;ijk++)
                                                {
                                                    for(var lmn=0;lmn<my_xml.firstChild.childNodes[ijk].childNodes.length;lmn++)
                                                    {
                                                       
                                                    }
                                                }
                                            }
                                        }
                                        if (fmsourceTag.length > 0)
                                        {
                                            for (j = 0; j < fmsourceTag.length; j++)
                                            {
                                                for(var ijk=0;ijk<root_child_length;ijk++)
                                                {
                                                    for(var lmn=0;lmn<my_xml.firstChild.childNodes[ijk].childNodes.length;lmn++)
                                                    {
                                                       
                                                    }
                                                }
                                               
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        else
                        {
                            trace("Failed");
                        }
                    };
                    function searchReplace(block:String, find:String, replace:String)
                    {
                        return block.split(find).join(replace);
                    }
                    function initload()
                    {
                        if (i < fileArr.length)
                        {
                            totalpage.text = i + "/" + fileArr.length;
                            filneame_txt.text = fileArr[i] + ".xml";
                            pageXml1.load("files/" + _global.batch + "/" + _global.batchname + "/"+ fileArr[i] + ".xml"+ "?dummy="+time_get);
                        }
                    }