8 Replies Latest reply on Oct 29, 2009 11:26 AM by kglad

    Reading

    Ron Colmen Level 2

      I need a way to read the length of my array, automatically create that many frames in the main.fla and read each screen from my array and display it accordingly on each frame. How to do this?

       

      E.g.. In A.xml, I calculated 10 screens, so Ii need to create 10 frames for A.xml....and in my B.xml, I have 25 screens, there Iit should create 25 frames.

        • 1. Re: Reading
          Ron Colmen Level 2

          Any suggestions from anyone?

          • 2. Re: Reading
            kglad Adobe Community Professional & MVP

            you can't add frames dynamically.

            1 person found this helpful
            • 3. Re: Reading
              Ron Colmen Level 2

              Thank you!

               

              What should I do to achieve my requirement? any suggestions?

              • 4. Re: Reading
                kglad Adobe Community Professional & MVP

                how can you achieve what?

                • 5. Re: Reading
                  Ron Colmen Level 2
                  I need a way to read the length of my array, automatically create that many frames in the main.fla and read each screen from my array and display it accordingly on each frame. How to do this?

                   

                  Sir, sorry for the confusion. I got carried away with your answer (can not add frames dynamically).

                   

                   

                  If this is not possible, how should I go about to have each XML file load in to different frames? I need the number of frames of my main FLA to be = to the XML files in that category. (it's like a book, each frame have different pages). But I constantly update the XML therefore I need a way to automatically load the XML data to my main FLA and each XML should load to a seperate frame.

                   

                  Hope this makes sence.

                  • 6. Re: Reading
                    kglad Adobe Community Professional & MVP

                    there's no reason to have xml files load to each frame and there's no reason to have a "page" appear on a different frame.

                     

                    you can use attachMovie() and removeMovieClip() to change what appears on-stage.  if you do this you won't have to worry about the number of xml files or the number of pages.  you create one master function that sets up each "page".  you can pass a different xml file and whatever else to the master function to setup each page the way you want.

                    • 7. Re: Reading
                      Ron Colmen Level 2

                      Thank you sir! That was very helpful and perhaps I should have marked as the correct answer!

                       

                      Anyway I'll try this and come back.

                       

                       

                      • 8. Re: Reading
                        kglad Adobe Community Professional & MVP

                        you're welcome.