Call Bapi_Material_Availability Error : Index was outside the bounds ...

I am coding .net 2003 (VB)  and  .NET connector 2.0  Call Bapi_Material_Availability . It Error  Exception Details: System.IndexOutOfRangeException: Index was outside the bounds of the array.
This my code:
   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim Batch As String
        Dim Check_Rule As String
        Dim Customer As String
        Dim Dec_For_Rounding As Short
        Dim Dec_For_Rounding_X As String
        Dim Doc_Number As String
        Dim Itm_Number As String
        Dim Material As String
        Dim Material_Evg As Test6.BAPIMGVMATNR
        Dim Plant As String
        Dim Read_Atp_Lock As String
        Dim Read_Atp_Lock_X As String
        Dim Stge_Loc As String
        Dim Stock_Ind As String
        Dim Unit As String
        Dim Wbs_Elem As String
        Dim Av_Qty_Plt As Decimal
        Dim Dialogflag As String
        Dim Endleadtme As String
        Dim Return0 As Test6.BAPIRETURN
        Dim Wmdvex As Test6.BAPIWMDVETable
        Dim Wmdvsx As Test6.BAPIWMDVSTable
        Material = "100-400"
        Plant = "1000"
        Unit = "ST"
        Try
            SapProxy11.Bapi_Material_Availability(Batch, _
            Check_Rule, _
            Customer, _
            Dec_For_Rounding, _
            Dec_For_Rounding_X, _
            Doc_Number, _
            Itm_Number, _
            Material, _
            Material_Evg, _
            Plant, _
            Read_Atp_Lock, _
            Read_Atp_Lock_X, _
            Stge_Loc, _
            Stock_Ind, _
            Unit, _
            Wbs_Elem, _
            Av_Qty_Plt, _
            Dialogflag, _
            Endleadtme, _
            Return0, _
            Wmdvex, _
            Wmdvsx)
            Me.TextBox1.Text = Av_Qty_Plt.ToString()
        Catch ex As SAP.Connector.RfcAbapException
            MsgBox(ex.Message.ToString)
        End Try
    End Sub
========
<i>Source Error:
Line 157:     ByRef Wmdvsx As BAPIWMDVSTable)
Line 158:        Dim results As Object()
Line 159:        results = SAPInvoke("Bapi_Material_Availability", new Object() { _
Line 160:                            Batch,Check_Rule,Customer,Dec_For_Rounding,Dec_For_Rounding_X,Doc_Number,Itm_Number,Material,Material_Evg,Plant,Read_Atp_Lock,Read_Atp_Lock_X,Stge_Loc,Stock_Ind,Unit,Wbs_Elem,Wmdvex,Wmdvsx })
Line 161:        Av_Qty_Plt = CType(results(0), Decimal)
Source File: E:\SAP\BAPI\Test6\SAPProxy1.vb    Line: 159
Stack Trace:
[IndexOutOfRangeException: Index was outside the bounds of the array.]
   SAP.Connector.Rfc.RfcClient.RfcInvoke(SAPClient proxy, String method, Object[] methodParamsIn) +1229
   SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn) +70
   Test6.SAPProxy1.Bapi_Material_Availability(String Batch, String Check_Rule, String Customer, Int16 Dec_For_Rounding, String Dec_For_Rounding_X, String Doc_Number, String Itm_Number, String Material, BAPIMGVMATNR Material_Evg, String Plant, String Read_Atp_Lock, String Read_Atp_Lock_X, String Stge_Loc, String Stock_Ind, String Unit, String Wbs_Elem, Decimal& Av_Qty_Plt, String& Dialogflag, String& Endleadtme, BAPIRETURN& Return0, BAPIWMDVETable& Wmdvex, BAPIWMDVSTable& Wmdvsx) in E:\SAP\BAPI\Test6\SAPProxy1.vb:159
   Test6.WebForm1.Button1_Click(Object sender, EventArgs e) in E:\SAP\BAPI\Test6\Default.aspx.vb:64
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain() +1292
</i>
Pls. help me.
Thank you.

Hi Kreangsak,
It seems that you need to initialize you tables, parameters for rfc function
Dim Wmdvex As Test6.BAPIWMDVETable
Dim Wmdvsx As Test6.BAPIWMDVSTable
Wmdvex = new Test6.BAPIWMDVETable()
Wmdvsx = new Test6.BAPIWMDVSTable()
If there is other table, you need to initialize them with new operator. Null tables does not accepted.
If you problem goes set the call stack's "show non-user code" property and send the stack.
Best Regards,
Huseyin Akturk
SW Engineer & SAP ABAP Consultant
www.huseyinakturk.net

Similar Messages

  • Release Management 2013 Index was outside the bounds of the array

    I am getting "Index was outside the bounds of the array." error when Release Management 2013 is in Deploy step .
    Status: Rejected
    Command Output show "3589 File(s) copied" at the end of file
    The build of solution was Build succeeded completed.
    i try run release again and it no show log file
    Thanks for your help.
    steve

    Hi 
    I follow the steps to tracking Release management log and i see the error, a component have in the field "File extension filter" the value "*.*", i change this value to "*.config" and deploy is done 
    the complete error:
    - Index was outside the bounds of the array.: \r\n\r\n   at Microsoft.TeamFoundation.Release.Common.Helpers.TextFileEncodingDetector.DetectSuspiciousUtf8SequenceLength(Byte[] sampleBytes, Int64 currentPos)
       at Microsoft.TeamFoundation.Release.Common.Helpers.TextFileEncodingDetector.DetectUnicodeInByteSampleByHeuristics(Byte[] sampleBytes)
       at Microsoft.TeamFoundation.Release.Common.Helpers.TextFileEncodingDetector.DetectTextFileEncoding(FileStream inputFileStream, Int64 heuristicSampleSize, Boolean& hasBom)
       at Microsoft.TeamFoundation.Release.Common.Helpers.TextFileEncodingDetector.DetectTextFileEncoding(String inputFilename)
       at Microsoft.TeamFoundation.Release.DeploymentAgent.Services.Deployer.ComponentProcessor.ReplaceConfigurationVariablesInFilesImplementation(String path, String searchPattern, Func`4 directoryFileRetriever, Func`2 readAllText, Func`2 detectTextFileEncoding,
    Func`3 replaceConfigurationVariables, Action`3 writeAllTextWithEncoding, Action`2 writeAllText)
       at Microsoft.TeamFoundation.Release.DeploymentAgent.Services.Deployer.ComponentProcessor.ReplaceConfigurationVariablesInFiles(String path, String searchPattern)
       at Microsoft.TeamFoundation.Release.DeploymentAgent.Services.Deployer.ComponentProcessor.ReplaceConfigurationVariablesPostImplementation(Action`2 replaceConfigurationVariablesInFiles)
       at Microsoft.TeamFoundation.Release.DeploymentAgent.Services.Deployer.ComponentProcessor.DeployComponent()
    THANKS FOR YOUR HELP
    steve

  • Error during Addon Installation Index was outside the bounds of array

    Hi  wen im trying to install addon on x64 2003 server its throwing me error
    Customer library
    "Error during Addon Installation Index was outside the bounds of array."
    "Error(-2) at EndInstallEx(False) at the end of the addon installation"
    Please provide me a solution for this.
    Thanks
    Rekha

    Hi Rekha,
    You may check this: Add-on Installer Issue
    Is this your add-on or SAP add-on? If it is 3rd party add-on, post it to the other forum
    Thanks,
    Gordon

  • Claims authentication: "Server was unable to process request. --- Index was outside the bounds of the array"

    Hi there,
    I recently got a peculiar error when users tried to log-in into a SP 2010 portal using claims based authentication.
    The following error is logged in the event viewer of the SP server in question:
    Event ID 8306 - Claims authentication
    An exception occurred when trying to issue security token: Server was unable to process request. ---> Index was outside the bounds of the array.
    I also found an IIS warning entry with a similar message:
    Event ID 1309 - Web Event
    Exception type: FaultException
    Exception message: Server was unable to process request. ---> Index was outside the bounds of the array.
    I simply could not find an answer to why this happened, but an iisreset seemed to have fixed the issue. I was wondering if anyone here would know a possible root cause for this issue?
    Thanks in advance for your help.
    Regards,
    P.

    Hi,
    Thanks for posting your issue, Kindly browse below mentioned URLs to fix this issue
    http://underthehood.ironworks.com/2011/05/sharepoint-2010-an-exception-occurred-when-trying-to-issue-security-token-the-server-was-unable-to-p-1.html
    http://nearbaseline.com/blog/2011/01/claims-exception-occurred-issuing-a-security-token/
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • Script component Fail: System.IndexOutOfRangeException: Index was outside the bounds of the array

    In SSIS package “script component” is failing due to the following exception. This exception is occurring sometimes only.  This
    script component contain Try/Catch, still it’s failing. What could be the reasons for this exception?
    Error Message
    5246793 User:OnError Package1 2015-01-16 03:40:45.000 2015-01-16 03:40:45.000 00:00:00 System.IndexOutOfRangeException: Index was outside the bounds of the array.
       at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)
       at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer)
       at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)
    5246800 OnError Package1 2015-01-16 03:40:45.000 2015-01-16 03:40:45.000 00:00:00 SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Script Component" (657) failed with error code 0x80131508 while processing input
    input "Input 0" (666). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages
    posted before this with more information about the failure.

    Thanks for your reply. Please consider the following points too.
    1. In this code I don't use any array or list
    2. This exception is not happening always, when running the package again some time success some time failing.
    3. More than 100 Million records flow through this script component.
    4. I applied Try/Catch for whole script component. In this case script component should ignore the recode and should continue but it is not.
    5. Same package running successfully in QA Environment with same data. This exception sometime only occurring in Production environment only.
    6. Similar error message appearing three time. Can it be a time out error?
    5246793 User:OnError Package1 2015-01-16 03:40:45.000 2015-01-16 03:40:45.000 00:00:00 System.IndexOutOfRangeException: Index was outside the bounds of the array.
       at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)
       at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer)
       at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)
    5246794 OnError Package1 2015-01-16 03:40:45.000 2015-01-16 03:40:45.000 00:00:00 System.IndexOutOfRangeException: Index was outside the bounds of the array.
       at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)
       at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer)
       at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)
    5246795 OnError Execute Package1 (R2OK) 2015-01-16 03:40:45.000 2015-01-16 03:40:45.000 00:00:00 System.IndexOutOfRangeException: Index was outside the bounds of the array.
       at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)
       at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer)
       at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)
    These are some of the questions that I have:
    1. Bug in SSIS script component in SQL Server 2008R2?
    2. Is there any place Script component by default using Array or List?
    3. Why Try/Catch is not success?
    I know this is mess but please try to help!

  • Error messages shown outside the view/table.

    Hi People,
          I have created a view & added an event 'Before saving the data' to it. So when we enter data into the view & try to save it, it will trigger the event & that will call a function module, which will check if the user entries are correct, If the entries are incorrect then i am showing an error message. The problem is, this error message is shown outside the view maintenence screen but inside the sm30 transaction! then I have to navigate back to my view maintenence screen. Kindly guide me on how to avoid this & make the error message appear in the same view maintenence screen. 
    Thanks & Regards,
    Deepak

    Hi,
          I have now used the event '05' For new entries. I am able to validate the entries, & show the error messages for invalid entry. Now when I enter valid input, still the vent is triggered & it shows me the error message. I am using the following code
    FORM CHECK_BEFORE_SAVE.
        DATA: wa_total(1000) TYPE c.
        DATA: BEGIN OF ls_total,
                mandt type mandt,
                FUNCTIONAL_ID type /PRA/RESP_FUNC_AREAS,
                HIER_ID type /PRA/HIER_ID,
                DESCRIPTION type /PRA/HIER_DESC,
                CHANGE_FLAG type boolean,
               END OF ls_total.
    LOOP AT TOTAL INTO wa_total.
        ls_total = wa_total.
        IF ls_total-functional_id IS INITIAL.
            MESSAGE E208(00) WITH 'Functional Area cannot be empty'.
        ENDIF.
    ENDLOOP.
    ENDFORM.
    I see that when i enter the valid entry & this event is triggered, The global table for view TOTAL is not refreshed with new values & hence I still get the error. How do i refresh this TOTAL table?
    Regards,
    Deepak

  • Show error for pageitems outside the workarea of illustrator document

    Hi all,
    I want to write a script which will alert the error message if the page items are outside of the workarea.Any object placed outside the page area should generate error message.
    Thanks,
    Sanat

    this should alert whenever an item is outside the document bounds ... please keep in mind that this script assumes that first artboard is default and thus set to the size of the document:
    var doc = app.activeDocument;
    var artboard = doc.artboards[0];
    var version = parseInt(app.version);
    //workarea aka artboard differs slightly from CS4
    if(version > 13) {
        if(doc.artboards.length > 1) {
            var dlg = prompt("Object should be inside which artboard?", "1", "Artboard number?");
            artboard = (dlg != null) ? doc.artboards[parseInt[dlg]-1] : artboard;
    var ar = artboard.artboardRect;
    var dv = doc.visibleBounds;
    if(dv[0] <  ar[0] || dv[1] < ar[1] || dv[2] < ar[2] || dv[3] < ar[3]) {
        alert("There are some objects outside the visible bounds!");
    } else { 
        alert("Thanks god ... they`re all in!"); 
    hope it helps;
    cheers;

  • How can I stop the cursor from being dragged outside the bounds of an intensity graph in LV 7.1?

    Currently, an intensity graph cursor can be dragged outside the graph bounds, and the cursor position continues to change as if the graph had no bounds.

    You can maintain the cursor (and the graph scales...) between defined boundaries programmatically, using an attribute node. Not a very elegant solution, since there is some quivering. See the example.vi.
    Of course, if the user need to modify the scales (zoom in/out...), there will be some additional work ! :-)
    Hope this help.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Bound_cursor.vi ‏51 KB

  • I'm getting exception index was out of bound how should i fix it ?

    In a timer tick event i have:
    private void timer1_Tick(object sender, EventArgs e)
    if (htmlloaded == true)
    try
    uri = sourceUrlId + forumsIds[counter] + sourceUrlNumber + 1;
    filename = uri.Substring(49);
    webBrowser1.Navigate(uri);
    htmlloaded = false;
    timer1.Enabled = false;
    counter++;
    countpages++;
    catch (Exception err)
    string ttt = err.ToString();
    if (countpages == numberofpages)
    timer1.Stop();
    The problem is that in the end forumsIds and counter have the same number. forumsIds have 574 items and in the end counter is 574 too. And counter should be allways less then the forumsIds.

    Michael i solved it this way.
    First i changed in the top of the form the variable counter to value 0 instead 1 so it will start as 0.
    In the GetHtmls method where i used the index 0 first time i did:
    uri = sourceUrlId + forumsIds[counter] + sourceUrlNumber + 1;
    countpages ++;
    counter ++;
    So first time counter is 0 index 0 .
    Then i move it up by one so now counter value is 1.
    Now the timer tick event:
    private void timer1_Tick(object sender, EventArgs e)
    if (htmlloaded == true)
    try
    uri = sourceUrlId + forumsIds[counter] + sourceUrlNumber + 1;
    filename = uri.Substring(49);
    webBrowser1.Navigate(uri);
    htmlloaded = false;
    timer1.Enabled = false;
    counter ++;
    countpages ++;
    if (counter == numberofforums)
    timer1.Stop();
    catch (Exception err)
    string ttt = err.ToString();
    So now counter is 1 i'm navigating then counter is 2 now it will navigate again when counter is 2.
    Since i navigated first time once when it was 0 this is 3 times.
    So now counter will be 3 and the numberofforums is also 3.
    And in the document completed event i'm also checking if counter == numberofforums:
    if (counter == numberofforums)
    timer1.Stop();
    else
    timer1.Enabled = true;
    If counter is not equal to numberofforums keep navigating once they are equal stop the timer and finish the navigations.
    So in the end i started from index 0 (counter = 0 ) and navigated last time when counter was 2. That's 3 times navigations. And counter is now 3 and i navigated to 3 forums.
    I hope i did it right at least it's working like i wanted i think.
    Navigated 3 times and there are 3 forums so i think it's logic.

  • How to call common error pages for all the exceptions

    Hi All
    I have created the common ErrorPage in my application. In case of any error whether SQL,IO or JBO I want that error page be displayed. In the page definition I have given the errorpage name and also defined the error page as IS_ERROR_PAGE = true.But it is throwing Jbo exception at the top of the page itself.No redirection to the error page is done.
    Though I have gone through various threads in this forum but still its not clear how to get the things working.
    Can anyone please help me out in this regard?

    Hi,
    I assume you mean that you set the error page in the web.xml file. Note that exceptions are handled first by the JSF framework. Please have a look at the developer guide
    http://download-uk.oracle.com/docs/html/B25947_01/toc.htm
    http://download-uk.oracle.com/docs/html/B25947_01/web_val008.htm#CIHHBEEJ
    Frank

  • TS1702 My grandson, age 7 asked if he could buy treats for this puppy app. I thought it said 99 cents. Injustice opened my statement and see I was charged $99!!!  I said it was ordered in error and was told the app is not eligible for refund!!!!

    Has this happened to anyone else. Did you get a refund?

    Garmin is sending you to Apple because it is Apple that would have to give you a refund as the actual point of sale.  However, Apple states all sales are final.
    Apple is sending you to Garmin because it is Garmin's fault their maps are out of date and Apple doesn't write the software.  They may not even be looking that deeply and simply perceiving it as a programming "bug" it is up to Garmin to solve.
    Who know whose fault it is that Garmin isn't getting up to date data to put in their maps.
    Ultimately I think you stand the best chance in getting a refund from Apple though it isn't guaranteed.  Apple is the cashier.  You just have to convince them this isn't just a line of code omitted from an application and isn't something that will be soon corrected by Garmin.  Make it clear it isn't a problem with the application running on your device, it is a problem with the data it contains.  Either that or you have to hope Garmin will feel so bad about it they will delve down into their slush fund and send you a refund.

  • Workflow Activity "Lookup Value" returns An error occured while enumerating the filter using [//WorkflowData/customvalue]

    I want to generate an Accountname using EmployeeID, FirstName and LastName via a workflow.
    I'm using the Granfeldt Workflow Activity Library (https://fimactivitylibrary.codeplex.com/)
    I'm using the FIM Powershell Workflow Activity (https://fimpowershellwf.codeplex.com/)
    Steps:
    Passing the EmployeeID, FirstName and LastName to the powershell Activity, generating a logonid based on logic.
    Add-PSSnapin FIMAutomation
    $EmployeeID = $fimwf.WorkflowDictionary.EmployeeID
    $Forename = $fimwf.WorkflowDictionary.Firstname
    $Lastname = $fimwf.WorkflowDictionary.Lastname
    'logic creating a custom logonid here
       ==> This works
    Returning data back to the workflow via that powershell script:
    $fimwf.WorkflowDictionary.Add('NewAccountName',$newlogonid)
       ==> This works
     Using Lookup Value Activity to read the Workflow data and update the [//Target/AccountName] fails.
    This gives an error:
           An error occurred while enumerating the filter 'string' .
    (where string is the actual generated userid that I've got back from the powershell script. Example dab2563)
    I tried with only [//WorkflowData], then this gives the error:
          Index was outside the bounds of the array.
    Any hints to solve this?    
    Kind regards,
    David

    The Lookup Activity is for looking up an object in the FIM Service. Seems like thats not what you're trying to accomplish.
    For updating the target of the workflow, just use the built-in Function Evaluator. The Lookup WF was not built for that and it is failing because you have not specified a valid XPAth lookup filter, such as /Person[AccountName='BillG']
    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt

  • Date is outside the factory calendar range

    I am trying to run a BW query. When I click on the calnedar icon field. It gives this error.
    Error: Date is outside the factory calendar range
    Msg No. FK884
    What could be the problem in the query? Has anybody had the similar problem before? I tried to search in SAP notes and could not find anything close to this.
    I will  Appreciate your help. Thanks a lot.
    Abhi

    Hi Abhijit,
    We got the same error message in 2010.
    1) Check in transaction SCAL that the Factory Calendar ID 01 (i.e. German) is valid to 2009. This explains the error message.
    2) Found SAP Note 1136142 about the configuration of default factory calendar ID of F4 Help and hierarchy for Time-characteristics in BI 7.0.
    SAP Note Solution:
    The key figure attribute obtains its value from the default work calendar as it is maintained in transaction RSRHIERARCHYVIRT (General Settings -> Default Factory Cal. ID).
    This setting is valid across the entire system and does not permit any variable selection of the factory calendar for each query.
    Furthermore, a value for 0NUMWDAY is calculated only for the period in which the default factory calendar is valid.
    3) Check in transaction SCAL that the Factory Calendar ID of our location is valid to 2050.
    The problem is solved after changed the Default Factory Cal. ID from 01 to the ID of our location in transaction RSRHIERARCHYVIRT.
    Regards,
    Ricky

  • HT201239 I dont have the option to add a card and in the settings there is no Passport optionI made the initial setting outside the Us but mi adress credit card an tlf number are from the Us

    I cant add a credit card to Passbook on the app or in setting I'am in the Us mi account has a Us adress my credit card is from the Us and mi telephone line is also Us but the first time I used the phone was outside the country how can I fix the problem?

    I had to turn on location services for passbook before mine would show up.
    Settings>Privacy>Location Services>Passbook
    once I allowed location services for passbook I could add cards, etc. I was able to turn location services off after a card was added and the passbook option still showed up under general settings
    Hope this helps. It took me hours to figure it out

  • Error #2006: The supplied index is out of bounds

    hello,
    i'm trying to addChild with an interval, using this piece of code, but I allways get an error saiyng the suplied index is out of bounds.
    why?
    what should I do to have mc1 added then wait lets say a second and add m2 2 and so on?
    Thanks
    var tempo_espera:Timer = new Timer(1000, 1);
                tempo_espera.addEventListener("timer", inserir);
                tempo_espera.start();
                function inserir(evt:TimerEvent):void {
                    for (var nv1:int = 0; nv1<promocoes.length; nv1++) {
                        holder.addChildAt(mc, nv1);
                        var animacao:TransitionManager = new TransitionManager(mc);
                        animacao.startTransition({type:Zoom, direction:Transition.IN, easing :Elastic.easeOut, duration:3});
    RangeError: Error #2006: The supplied index is out of bounds.
    at flash.display::DisplayObjectContainer/addChildAt()
    at MethodInfo-346()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()

    using your new code, I got this error
    TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/addChild()
    at MethodInfo-343()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()
    I had to add mcArray = new Array(); to avoid another error
    // this is array of movie clips
            var mcArray:Array;
            // it is better to declare variable once and then reinstantiate it
            var mc:MovieClip;
            // do your regular routine
            for (var nv:uint = 0; nv<promocoes.length; nv++) {
                var prm;
                prm = promocoes[nv].split("|sep|");
                mc = new MovieClip();
                mc.name = "mc_"+nv;
                // place this new mc into array
                mcArray = new Array();
                mcArray.push(mc);
            // start timer - note that timer will fire as many times as there are movie clips
            var tempo_espera:Timer = new Timer(1000, mcArray.length);
            tempo_espera.addEventListener("timer", placeClip);
            tempo_espera.start();
            // the clip you will apply transition to
            var currentClip:MovieClip;
            // function that places clips
            function placeClip(e:Event):void {
                // get next clip by calling movie that corresponds with the timer counter
                currentClip = MovieClip(mcArray[tempo_espera.currentCount]);
                // just place next clip
                holder.addChild(currentClip);
                var animacao:TransitionManager = new TransitionManager(currentClip);
                animacao.startTransition({type:Zoom, direction:Transition.IN, easing :Elastic.easeOut, duration:3});

Maybe you are looking for

  • Sga_max_size and sga_target values

    I have an 11g database on windows with 4GB RAM, I have set the MEMORY_MAX_TARGET and MEMORY_TARGET, what should I do with the pre-existing sga_max_size and sga_target values

  • Getting tomcat,JSTL and JNDI working

    I have been trying to get this working for a quite a while now and I am so confused with different versions and this JNDI. All I want to to do as get taglibs working to query a database. I have installed Tomcat 5.5 and downloaded jakarta-taglibs-stan

  • Replacing the string with a sbstring

    String query="elect empname,empDate,CustNo from EmpData where (empname='smith') and ( empDate> '22/10/2005' and CustNo > '1' )"; the date here is dd/mm/yyyy formatt.. i want extract that date and change it to mm/dd/yyyy formatt and re create the same

  • Is Dreamweaver a step backwards?

    Is it just me, or is DreamWeaver a step backward from GoLive CS2? Granted, Adobe didn't get GoLive stable enough in CS2 to allow GL to compete. I deal REGULARLY with crashes, even with 4GB or RAM and a fairly simple web site. Simple things, like rear

  • Microsoft Visual C run time library

    I was trying access the internet and this message kept popping up Program: C\Program Files\Internet Explore\iexplore.exe This application has requested the runtime to terminated it in an unusual way.