5 Replies Latest reply on Feb 21, 2010 12:33 PM by kglad

    XML + FLASH

    patryk-112233
      Hello
      I'm new here and also in flash and I need your help
      I need to make an portfolio for my friend, he has got flash template, but he wants to make some changes in it.
      He asked me to make something like this: images and their text descriptions loaded from xml file. There should be as many rows as needed and 3 columns, that fits best in this template.
      I'm wandering is there an possibility to load all of pictures and text descriptions from a single xml file for example to one main movie clip which would have script to organize them in rows and columns in order from xml? I think it is possible, but because I'm new in flash I have no idea how to get started with this, and telling the truth I don't know how to look for this. So if someone could help me, give an code for this or links to were I can find answers, just please do not send me to google, please.:)
      Patryk
        • 1. Re: XML + FLASH
          kglad Adobe Community Professional & MVP

          if you just need a snippet of code created or edited, you can get help here.  but, your chances of getting someone to code a custom portfilio for you or, even less likely, to edit someone else's template aren't great.

          • 2. Re: XML + FLASH
            patryk-112233 Level 1

            I did not asked any one to edit someone else code or to code custom portfolio for me, I have written my idea and asked if it is possible and for help to find out how to make this...

            My friend bought an flash template and I have to make changes in it.

             

            "So if someone could help me, give an code for this or links to were I can find answers, just please do not send me to google...” writing, “code” I meant fragment of code according to my question not whole portfolio pages and everything and also I have asked for link where I can find answers, because I do not know names for actions or anything what I need, to do this.

             

            Everyone have a choice, how to help me, also I want to learn something not just copy somebody else's code.

            • 3. Re: XML + FLASH
              kglad Adobe Community Professional & MVP

              yes, it can be done.  exactly how you do it depends on the your setup.

               

              but, in general, you can create organized rows and columns utilizing Math.floor() and the modulo (%) operator.  for example,

               

              // define your parameters and use:

              for(var i:uint=0;i<100;i++){

              object[i].x = (i%columnNumber)*rowSpace;

              object[i].y = Math.floor(i/columnNumber)*columnSpace;

              }

              1 person found this helpful
              • 4. Re: XML + FLASH
                patryk-112233 Level 1

                Thn you very much

                • 5. Re: XML + FLASH
                  kglad Adobe Community Professional & MVP

                  you're welcome.