7 Replies Latest reply on Jul 20, 2008 3:44 PM by DLMAES

    Need help with code

      I have a gallery with a main image box and thumbnail boxes. Once the thumbnail is chosen, it's image appears in the main image box. What I would like to do is be able to click on whatever image is in the main box and have a pop-up window appear with additional photos for that particular image. I am not that knowledgable about Flash - I can do the basics at this stage. I would like to know if I would use the "behavior" section and php. Again, I only learned the basics of php a year ago and haven't used it since. Can anyone help me?

      Thanks
      Jackie
        • 1. Re: Need help with code
          kglad Adobe Community Professional & MVP
          you'll get more benefit out using xml as your database for that simple a project and flash is capable of parsing your xml so you need no server-side scripting.
          1 person found this helpful
          • 2. Re: Need help with code
            DLMAES Level 1
            A great place to find XML driven application tutorials is on http://www.gotoandlearn.com
            • 3. Re: Need help with code
              Thanks for the guidance! I need all I can get! Is there, like a standard xml script for this type of thing?

              Jackie
              • 4. Re: Need help with code
                Thanks for the guidance! I need all I can get! Is there, like a standard xml script for this type of thing?

                Jackie
                • 5. Re: Need help with code
                  DLMAES Level 1
                  Let me get you an example....

                  Here you go:

                  ******Flash:

                  var xml:XML = new XML();
                  xml.ignoreWhite = true;

                  xml.onLoad = function(){
                  var nodes = this.firstChild.childNodes;
                  numOfItems = nodes.length;
                  for (var x=0; x<numOfItems; x++){
                  var temp = eval("btn" + x);
                  temp.title = nodes[x].attributes.title;
                  temp.id = x;
                  temp.onEnterFrame = moveMe;
                  temp.icon.onRollOver = genericOver;
                  temp.icon.onRollOut = temp.icon.onReleaseOutside = genericOut;
                  temp.icon.onRelease = genericRelease;
                  }
                  }

                  xml.load("titles.xml");

                  *****XML:

                  <?xml version="1.0" encoding="iso-8859-1"?>

                  <icons>

                  <icon title="title1" content="content1" />

                  <icon title="title2" content="content2" />

                  <icon title="title3" content="content3" />

                  <icon title="title4" content="content4" />

                  <icon title="title5" content="content5" />

                  </icons>

                  You'll find great examples on gotoandlearn and how to import xml into flash. Hope this helps!
                  1 person found this helpful
                  • 6. Re: Need help with code
                    Trust me ....anything helps at this point! I went the site you suggested and started looking at the info. I didn't know this site existed! Showing me that alone would have been great but helping me with the example is much appreciated!

                    Thanks again
                    Jackie
                    • 7. Re: Need help with code
                      DLMAES Level 1
                      You're welcome... good luck!
                      1 person found this helpful