XML Photo Gallery

Hello,
I am creating a very basic AS3 XML Gallery.
The problem I am having is including the description or
"caption" along with the photo.
I have been going around it for awhile, but I can't seem to
get my head around it.
These are the basics I have for my XML.
<?xml version="1.0" encoding="utf-8"?>
<images>
<image>
<url>pics/first.jpg</url>
<big_url>big_pics/first.jpg</big_url>
<description>The first time</description>
</image>
</images>
Here is my AS3 code attached.
I believe that my main problem is the very last line.
Thanks for any help that you can provide.

Hello Dear,
I was reading in this forum about XML gallery and found your thread. I am having a very similar problem to yours. I am making a XML driven flash gallery. I was able to make scrolling thumbnails that show larger images using XML. But the problem I am having now is displaying the description text. While reading your conversation with KG.Glad, it seems like you figured out the solution. But I couldn't really get a hold of it. Would you mind sharing your solution with me? I am new to XML and flash. I am spending weeks without much success. So desperately needing a help. If you could share a code or file, it would be nice.
Thank you.
generalbatzorig

Similar Messages

  • Need Help Removing XML Photo Gallery on Button Click

    Hi, I'm new to flash so this might seem like a dumb question, but I'm right in the middle of designing a photography site and need some help.  I have 4 buttons in my timeline that go to the corresponding frame labels when clicked, above each frame label is a keyframe with actionscript applied to it, that will load an external XML photo gallery. I need the current photo gallery that's on the screen to disappear when I click on a new button to load the new XML photo gallery.  this is the code that will be above each frame label with a few changes, then below this is the code for my buttons. Any help is greatly appreciated. Thank you  Code: Select all var imageX:XML; var imageList:XMLList;  var canvas:MovieClip = new MovieClip(); var picLoader:Loader; addChild(canvas); canvas.x = -155; canvas.y = 160;   var req:URLRequest = new URLRequest("gallery.xml"); var imageLoader:URLLoader = new URLLoader(); imageLoader.addEventListener(Event.COMPLETE, onComplete); imageLoader.load(req);  function onComplete(e:Event):void { imageX = new XML(imageLoader.data); imageList = imageX.image; picLoader = new Loader(); picLoader.contentLoaderInfo.addEventListener(Event .COMPLETE, imageLoaded); picLoader.load(new URLRequest (imageList[0].url)); }  function imageLoaded(e:Event):void  { canvas.addChild(picLoader); }    Code for the buttons in different keyframe.  Code: Select all stop();  kids_btn.addEventListener(MouseEvent.CLICK,onKidsClick); couples_btn.addEventListener(MouseEvent.CLICK,onCouplesClick); portraits_btn.addEventListener(MouseEvent.CLICK,onPortraitsClick); bellies_btn.addEventListener(MouseEvent.CLICK,onBelliesClick);  function onKidsClick(e:MouseEvent):void { gotoAndStop("kids"); }  function onCouplesClick(e:MouseEvent):void { gotoAndStop("couples"); }  function onPortraitsClick(e:MouseEvent):void { gotoAndStop("portraits"); }  function onBelliesClick(e:MouseEvent):void { gotoAndStop("bellies"); }

    Hi, I'm new to flash so this might seem like a dumb question, but I'm right in the middle of designing a photography site and need some help.  I have 4 buttons in my timeline that go to the corresponding frame labels when clicked, above each frame label is a keyframe with actionscript applied to it, that will load an external XML photo gallery. I need the current photo gallery that's on the screen to disappear when I click on a new button to load the new XML photo gallery.  this is the code that will be above each frame label with a few changes, then below this is the code for my buttons. Any help is greatly appreciated. Thank you  Code: Select all var imageX:XML; var imageList:XMLList;  var canvas:MovieClip = new MovieClip(); var picLoader:Loader; addChild(canvas); canvas.x = -155; canvas.y = 160;   var req:URLRequest = new URLRequest("gallery.xml"); var imageLoader:URLLoader = new URLLoader(); imageLoader.addEventListener(Event.COMPLETE, onComplete); imageLoader.load(req);  function onComplete(e:Event):void { imageX = new XML(imageLoader.data); imageList = imageX.image; picLoader = new Loader(); picLoader.contentLoaderInfo.addEventListener(Event .COMPLETE, imageLoaded); picLoader.load(new URLRequest (imageList[0].url)); }  function imageLoaded(e:Event):void  { canvas.addChild(picLoader); }    Code for the buttons in different keyframe.  Code: Select all stop();  kids_btn.addEventListener(MouseEvent.CLICK,onKidsClick); couples_btn.addEventListener(MouseEvent.CLICK,onCouplesClick); portraits_btn.addEventListener(MouseEvent.CLICK,onPortraitsClick); bellies_btn.addEventListener(MouseEvent.CLICK,onBelliesClick);  function onKidsClick(e:MouseEvent):void { gotoAndStop("kids"); }  function onCouplesClick(e:MouseEvent):void { gotoAndStop("couples"); }  function onPortraitsClick(e:MouseEvent):void { gotoAndStop("portraits"); }  function onBelliesClick(e:MouseEvent):void { gotoAndStop("bellies"); }

  • Error in creating XML photo gallery with Flash CS4 and AS 3.0

    Hello, all. I've been creating an XML photo gallery with Flash CS4 and AS 3.0 following a tutorial. I followed the instructions step-by-step but at the end I got the following error message instead:
    Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
    Could anyone in the community assist me as to how to solve the problem? The script has no errors and last time I checked all the applicable files (the .xml file, the .jpg files, the .swf and the .fla file) are in my Documents folder on the Mac.
    Looking forward to your suggestions!

    Check the folder structure
    Flash is not able to get some file thats why the IO Error.
    trace the url path just before u load the file and u will be abel to find whether that file is in specified folder or not.
    http://www.darshanrane.com

  • XML Photo Gallery - Loader won't load :(

    Hi,
    I'm trying to make an XML Photo Gallery type thing. For each
    'Product' it creates a new instance of a MovieClip from the
    library, 'XmlItem' which contains a Loader Component and Dynamic
    Text.
    The Product Title goes into the Dynamic Text perfectly. The
    problem is with the Loader Component. It simply REFUSES to load the
    images. There's an exception. If I deliberately cause a syntax
    error in the Loader Component's code, then the pictures load! What
    the hell?
    Oh, also I'm having trouble with the placement of the XmlItem
    instances... For each of them, what position is _x relative to?
    Thanks very much in advance for any help,
    Tim.
    Code:

    my_ldr must exist on all frames or, if you navigate to a frame where it doesn't exist, you must create another loader with the "new" constructor.  in the later situation, you'll need to (re)define your button actions too because the new loader will need to before referenced in the button listener functions.  even if you use the same name, my_ldr, you'll probably need to re-define your buttons.

  • Flash & XML Photo Gallery with Categories

    Hello friends
    i am trying but
    i want to create Flash & XML Photo Gallery with Different Categories
    please help me

    If you want to do using oop
    go throgh this article first
    http://active.tutsplus.com/tutorials/actionscript/as3-101-oop-additional-concepts/

  • Help With A Project " XML Photo Gallery"

    Hi all thanks for taking the time to look at this post,
    I have made a Photo Gallery using Xml but im having a bit of
    trouble getting it to work, What i mean is that i have saved my xml
    gallery as a .swf file and im loading it into a loader componet of
    another .swf file.
    The gallery is the screen shots for my Clans webpage. But
    when i load the gallery .swf file into the themain.swf file i get
    no pictures or captions.
    I used a tutorial to make this work
    http://www.gotoandlearn.com/
    Flash XML Basics video.
    My website thats in development can bew viewed here
    http://www.theoaps.co.uk/Support%20Files/Index1.html
    (please note this is still in draft as we are trying to include xml
    to make the swf files smaller)
    The Gallery file can be viewed here
    http://www.theoaps.co.uk/Support%20Files/GScreens.swf
    (this works but the buttons do not go to the next picture)
    The Actual .fla file is here
    http://www.theoaps.co.uk/Support%20Files/GScreens.fla
    Please Please Please can someone help me with my problem (not
    the drinking problem) this is driving me made and i can't
    understand why it is doing this
    Thanks
    Dunkyb123
    www.theoaps.co.uk

    I HAVE SOLVED THE BUTTONS PROBLEM

  • Issues importing XML photo gallery SWF in Catalyst

    Hey everyone,
    I'm creating a mini-site using Catalyst, and am trying to include a photo gallery on one of the pages. Problem is, the photo gallery uses XML, and grabs the photos from a folder. The photo gallery works great on its own, but when I import the gallery SWF into Catalyst and run it, nothing shows up. I've found a few posts saying to move the XML and other corresponding files into the "/Library/Application Support/ Adobe/Flash Catalyst/workspace/Project/bin-debug" folder, and tried it with no luck. I even tried publishing the project (both locally and to the web), and then adding the XML and photo folder in, but still didn't have any luck getting it to work. Has anyone had any similar issues/ have an idea of how to fix it?
    Any help would be greatly appreciated!

    I've been pointing people here for issues relating to xml driven swfs.
    http://flashcats.net/2010/05/29/using-an-xml-driven-swf-in-catalyst/
    Also, in regards to the previous comment, the run-local will work on your machine, the deploy-to-web when you put the content on the internet. This post has a bit more information.
    http://flashcats.net/2010/06/23/run-local-vs-deploy-to-web/

  • Creating a xml photo gallery

    I am wondering if there is a way to use data stored as part
    of the image (tag data?) like the title of the image and
    accompanying comments to display in the
    <caption></caption> section of the xml file.
    right now I have php write the xml file in the following
    format
    <gallery>
    <image>
    <url></url>
    <caption></caption>
    <width></width>
    <height></height>
    </image>
    </gallery>
    The php just pulls all the images from a folder so the
    gallery gets updated when I add images to the folder. Now I would
    like to know if that info from the file (the stuff you see when you
    right click the file to see its properties, then the summary) can
    be generated under the caption section. This way the captions can
    be automatically generated without me having to type it in for each
    image.
    I am using this for our school website. It is for our staff
    page. I am hoping to just drop the images of the staff in a folder
    and have the page update that way and include the staff member name
    and their teaching assignment as part of the "title" and "comments"
    section of the tag data of the image.
    Thanks
    Darren

    Hi Darren,
    Last week I was troubleshooting a photo gallery, and
    discover a PHP class does this. This program will extract EXIF
    information from the image file. It is called Exifer.
    The URL for more info is at:
    http://www.jakeo.com/software/exif/index.php
    Good luck
    David

  • XML photo gallery tutorial

    hi guys,
    I need to create a flash photo gallery that loads the photos
    and photo title with xml but can't seems to b able to find a
    suitable one.
    this is what i need to do
    http://www.afterlights.com/phuket/photo_gallery.html
    basically the photos, thumbnails and photo description will
    be all controlled by xml
    i've created the flash with everything loaded in flash by
    hard code now, can anyone share any similar tutorial that can do
    something like this?
    million thanks in advance!

    So this is the information that I'm using which leads me to believe I can use the xml feed to populate the slider.
    http://forums.adobe.com/docs/DOC-1780
    . You can now style this using your own CSS or use one of the many free, jQuery-based Gallery/Slideshow plugins available on the web, such as Galleria, the jQuery Cycle plugin, or InnerFade.
    When using a seperate jQuery plugin on top of this set up, make sure you place and execute the plugin script after the code we just inserted, so that our LI items are generated before it attempts to process and manipulate them.
    Am I right and it just takes the proper coding?

  • AS3 xml photo gallery

    I'm fairly new to flash, and after reading a few online
    tutorials on trying to make xml photo galleries (specifically the
    one here:
    http://www.tutorio.com/tutorial/simple-flash-xml-photogallery)
    I'm trying to figure things out.
    I want to make something similar, but have the photos line up
    in columns (not rows), and once there are a certain number of
    photos in a column (in this case, 6) have them load into another
    column.
    I have been trying to mess around with the AS given in the
    tutorial as well as what I've been reading on the net, and here is
    what I have so far:
    I'm loading the images and thumbs through the images.xml
    file. On my stage I only have 2 movie clips (loader &
    thumbnails) and a dynamic text field (title_txt). Any thoughts??? I
    really am new to this, but I'm trying hard to figure it out - I'm
    at the point now where I need help.
    Thanks!
    Mike ([email protected])

    You can add a drop shadow filter by creating a new variable
    at the top of the code:
    var dropShadow:DropShadowFilter = new
    DropShadowFilter(PARAMETERS);
    You can test different parameters to change the appearence -
    see this page on the livedocs, or look at Flash help for the
    accepted parameters:
    http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts&file=00001633.html
    I thought you would be asking about making a fade transition,
    it aways makes it look much better.
    I would definitely recommend downloading the "Tweener"
    library and placing the "caurina" folder in the same folder as your
    FLA or in your "global ActionScript directory". This tutorial will
    teach you all about Tweener:
    http://www.gotoandlearn.com/player.php?id=45
    Attached code includes a fade in and out transition on the
    images and adds a drop shadow to the thumbnails.
    I also realised (after testing for the first time!) that the
    thumbs were lining up vertically instead of in columns and I
    corrected the following 2 lines of code:
    thumb.x = xOffset + (thumbWidth+xspacing)*i; //j becomes i
    thumb.y = yOffset + (thumbHeight+yspacing)*j; //i becomes
    j

  • AS2 xml photo gallery

    I'm fairly new to flash, and after reading a few online
    tutorials on trying to make xml photo galleries (specifically the
    one here:
    http://www.tutorio.com/tutorial/simple-flash-xml-photogallery)
    I'm trying to figure things out.
    I want to make something similar, but have the photos line up
    in columns (not rows), and once there are a certain number of
    photos in a column (in this case, 6) have them load into another
    column.
    I have been trying to mess around with the AS given in the
    tutorial as well as what I've been reading on the net, and here is
    what I have so far:
    I'm loading the images and thumbs through the images.xml
    file. On my stage I only have 2 movie clips (loader &
    thumbnails) and a dynamic text field (title_txt). Any thoughts??? I
    really am new to this, but I'm trying hard to figure it out - I'm
    at the point now where I need help.
    Thanks!
    Mike ([email protected])
    ***

    you want to use:
    thumbnail_mc["t"+k].removeMovieClip();  // where k is defined as in your createEmptyMovieClip() method.

  • Flash XML Photo Gallery

    In this tutorial
    http://www.kirupa.com/developer/mx2004/thumbnails5.htm
    it explain how to make a Flash Thumbnail Photo Gallery. I am
    designing a bigger photo gellery based on this code. how do I have
    the photo gallery to list 5 pictures it create a new row . This
    code is the code that designs the thumbnail movie clip with all the
    thumbs in 1 row.
    function thumbnails_fn(k) {
    thumbnail_mc.createEmptyMovieClip("t"+k,
    thumbnail_mc.getNextHighestDepth());
    tlistener = new Object();
    tlistener.onLoadInit = function(target_mc) {
    target_mc._x = hit_left._x+(target_mc._width+5)*k;
    target_mc.pictureValue = k;
    target_mc.onRelease = function() {
    p = this.pictureValue-1;
    nextImage();
    target_mc.onRollOver = function() {
    this._alpha = 50;
    thumbNailScroller();
    target_mc.onRollOut = function() {
    this._alpha = 100;
    image_mcl = new MovieClipLoader();
    image_mcl.addListener(tlistener);
    image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
    }

    Right... you need to update row and column, for each k:
    var perRow = 5;
    function thumbnails_fn(k) {
    //these go inside the function
    var row = Math.ceil(k/perRow);
    var col = (k%perRow == 5) ? k/row : k%perRow;
    thumbnail_mc.createEmptyMovieClip("t"+k,
    thumbnail_mc.getNextHighestDepth());
    tlistener = new Object();
    tlistener.onLoadInit = function(target_mc) {
    target_mc._x = hit_left._x+(target_mc._width+5)*col;
    target_mc._y = hit_left._y+(target_mc._height+5)*row;
    target_mc.pictureValue = k;
    target_mc.onRelease = function() {
    p = this.pictureValue-1;
    nextImage();
    target_mc.onRollOver = function() {
    this._alpha = 50;
    thumbNailScroller();
    target_mc.onRollOut = function() {
    this._alpha = 100;
    image_mcl = new MovieClipLoader();
    image_mcl.addListener(tlistener);
    image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
    Dave -
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Need help with a xml photo gallery

    First, hello to everyone. My name is Tudor , i'm from Romania and i have a flash project which implies building an XML driven scrolling photo galery. Very sorry if my english will slip in some phrases. Well , the question for which i must get an answer is: I already built the gallery, everything works ok.... but ... when i want to make some changes when the pictures load .... well here is the problem. I will print the code and briefly explain and ask at the end....
    import com.greensock.TweenLite;
    import com.greensock.TweenMax;
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import fl.transitions.*;
    import fl.containers.UILoader;
    var MASK_WIDTH:Number = myMask_mc.width;
    var menuHolder:MovieClip = new MovieClip();
    //menuHolder.x = myMask_mc.x;
    //menuHolder.y = myMask_mc.y;
    addChild(menuHolder);
    var mouseIsOver:Boolean = false;
    var oldX:Number = menuHolder.x;
    menuHolder.mask = myMask_mc;
    import flash.filters.ColorMatrixFilter;
    import fl.motion.AdjustColor;
    var color : AdjustColor;
    var colorMatrix : ColorMatrixFilter;
    var matrix : Array;
    var filterBW : Array;
    color = new AdjustColor();
    color.brightness = 20;
    color.contrast = 20;
    color.hue = 0;
    color.saturation = -100;
    matrix = color.CalculateFinalFlatArray();
    colorMatrix = new ColorMatrixFilter(matrix);
    filterBW = [colorMatrix];
    /// HERE i read and parse the XML
    var xmlLoader:URLLoader = new URLLoader();
    var xmlData:XML = new XML();
    xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
    xmlLoader.load(new URLRequest("C:/Documents and Settings/Sm/Desktop/feteModel.xml"));
    function LoadXML(e:Event):void
    xmlData = new XML(e.target.data);
    ParsePictures(xmlData);
    function ParsePictures(input:XML):void
    var mainPictures:Array = new Array();
    var firstPictures:Array = new Array();
    var secondPictures:Array = new Array();
    var thirdPictures:Array = new Array();
    var forthPictures:Array = new Array();
    var dimensiuniArray:Array = new Array();
    var heightArray:Array = new Array();
    var eyeColorArray:Array = new Array();
    var hairColorArray:Array = new Array();
    var numeArray:Array = new Array();
    var mainPicturesList:XMLList = input.fata.pozaPrincipala;
    var firstPicturesList:XMLList = input.fata.poza1;
    var secondPicturesList:XMLList = input.fata.poza2;
    var thirdPicturesList:XMLList = input.fata.poza3;
    var forthPicturesList:XMLList = input.fata.poza4;
    var dimensiuniList:XMLList = input.fata.dimensiuni;
    var heightList:XMLList = input.fata.inaltime;
    var eyeColorList:XMLList = input.fata.culoare_ochi;
    var hairColorList:XMLList = input.fata.culoare_par;
    var numeList:XMLList = input.fata.nume;
    for each (var element1:XML in mainPicturesList)
    mainPictures.push(element1);
    for each (var element2:XML in numeList)
    numeArray.push(element2);
       /////////// HERE I LOAD THE PICTURES ...... i must say that menuItem is a mc - exported as a class , which basically has inside a textfield, a UILoader and a preloader - also movieclip. Also i need the pictures to be black and white when they are displayed and when the mouse is over to color
    for (var i=0; i < mainPictures.length; i++)
    var menuItem:MenuItem;
    menuItem = new MenuItem();
    menuItem.y = 200;
    menuItem.x =(i * (menuItem.width+1))+150;
    menuItem.itemLoader.filters = filterBW;
    menuItem.itemText.text = numeArray[i];
    menuItem.itemLoader.source = mainPictures[i];
    menuItem.itemLoader.maintainAspectRatio = false;
    menuItem.itemLoader.addEventListener(Event.COMPLETE, completeHandler);
    //menuItem.itemLoader.addEventListener(Event.COMPLETE,uiLoaded, false, 0, true);
    //menuItem.itemLoader.addEventListener(ProgressEvent.PROGRESS, progressHandler);
    //menuItem.itemLoader.load();
    //menuItem.preloader_mc.visible = true;
    function completeHandler(event:Event)
         //trace(menuItem.itemText.text);
    menuItem.mouseChildren = false;
    menuItem.buttonMode = true;
      menuItem.addEventListener(MouseEvent.MOUSE_OVER, mouseOverItem);
      menuItem.addEventListener(MouseEvent.MOUSE_OUT, mouseOutItem);
      //Add the menuItem to the menuHolder
      menuHolder.addChild(menuItem);
    menuHolder.addEventListener(MouseEvent.MOUSE_OVER, mouseOverMenu);
    menuHolder.addEventListener(MouseEvent.MOUSE_OUT, mouseOutMenu);
    function mouseOverMenu(e:Event):void
    mouseIsOver = true;
    //Calculate the vertical distance of how far the mouse is from
    //the topleft  of the mask.
    var distance:Number = mouseX - myMask_mc.x;
    //Calculate the distance in percentages
    var percentage:Number = distance / MASK_WIDTH;
    //Save the holder's old y coordinate
    oldX = menuHolder.x;
    var targetX:Number = -((menuHolder.width - MASK_WIDTH +150) * percentage) + myMask_mc.x;
    //Tween the menuHolder to the target coordinate
    TweenMax.to(menuHolder, 5, {x: Math.round(targetX)});
    //This function is called when the mouse is out of the menu
    function mouseOutMenu(e:Event):void
    mouseIsOver = false;
    var tw1:Tween;
    var tw2:Tween;
    function mouseOverItem(e:Event):void
    var item:MenuItem = e.target as MenuItem;
    menuHolder.addChild(item);
    item.itemLoader.filters = [];
    //trace(item.itemText.text);
    tw1 = new Tween(item,"scaleX", Strong.easeInOut,1, 1.25,0.25,true);
    tw2 = new Tween(item,"scaleY", Strong.easeInOut,1, 1.25,0.25,true);
    //This function is called when mouse moves out of the item
    function mouseOutItem(e:Event):void
    var item:MenuItem = e.target as MenuItem;
    item.itemLoader.filters = filterBW;
    tw1 = new Tween(item,"scaleX", Strong.easeInOut,1.25, 1,0.25,true);
    tw2 = new Tween(item,"scaleY", Strong.easeInOut,1.25, 1,0.25,true);
    Now , i want each picture to scale when it fully loads ... i thought it will be enough to put it on the completeHandler function , but here is the problem - it scales only the last picture ..... eg. if there are 5 , it scales only the 5th ..... i tried to trace the name of the picture inside the completeHandler and also , i got 4 identical names - the name of the last picture ...... my question  is : why is the completeHandler firing only for the last item?   anyone has any idea why this is hapening? and more how can i fix it? PLEASE ... i'm burning my brain here for half a day here ..........  THANKS in advance!!!!!!!!!!!!!!!!!!   
                                                                                                                                                                    REGARDS, Tudor

    If you are using a "for" loop to do the loading, it can process thru the entire set of loops before the first image is loaded.  If you want to have control over the loading you should load things sequencially.
    So instead of using a for loop, build a pseudo loop using an array of the files to load, a counter variable, a loading function, and a loadComplete function.  Have the loading function load just one image using the counter variable to identify which image in the array to load.  Have the loadComplete function process the one image that was just kloaded, increment the counter, and call the loading function if the counter value does not equal the length of the array.

  • XML photo gallery Adding transition

    i will add some transition on this xml gallery code. Can i do that, if so how?
    var titleArray:Array = new Array();
    var descriptionArray:Array = new Array();
    var largeImageArray:Array = new Array();
    var thumbImageArray:Array = new Array();
    //this has to be declared outside the function so it's available everywhere
    var totalImages:Number;
    //image number is always available but starts at 0
    var imageNum:Number=0;
    //Load the XML
    var xmlURLLoader:URLLoader = new URLLoader();
    xmlURLLoader.load(new URLRequest("gallery/gallery.xml"));
    //Once the XML is loaded...
    xmlURLLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(event:Event):void {
    var theXMLData:XML=new XML(xmlURLLoader.data);
    totalImages=theXMLData.title.length();
    trace("totalImages: "+totalImages);
    for (var i:Number = 0; i <totalImages; i++) {
      titleArray.push(theXMLData.title[i]);
      trace("titleArray: "+titleArray[i]);
      descriptionArray.push(theXMLData.description[i]);
      trace("Description: "+theXMLData.description[i]);
      largeImageArray.push(theXMLData.largeImage[i]);
      trace("Large Image: "+largeImageArray[i]);
      thumbImageArray.push(theXMLData.thumbImage[i]);
      trace("Thumbnail: "+theXMLData.thumbImage[i]);
    loadThumbnail();
    portfolioScrollPane.source=allThumbnails;
    function loadThumbnail():void {
    trace(imageNum);
    var thumbLoader:Loader = new Loader();
    thumbLoader.load(new URLRequest(thumbImageArray[imageNum]));
    thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded);
    function thumbLoaded(event:Event):void {
      thumbLoader.y=100*imageNum;
      //Put the array content inside variables
      var thisLargeImage:String=largeImageArray[imageNum];
      var thisTitle:String=titleArray[imageNum];
      var thisDescription:String=descriptionArray[imageNum];
      //add the thumbnail to allThumbnails
      allThumbnails.addChild(thumbLoader);
      allThumbnails.buttonMode = true;
      thumbLoader.addEventListener(MouseEvent.CLICK, loadMainImage);
      function loadMainImage(event:MouseEvent):void {
       //Load in the correct image
       largeUILoader.source=thisLargeImage;
       //Preloader
       selectedTitle.text=thisTitle;
       selectedDesc.htmlText=thisDescription;
      portfolioScrollPane.update();
      imageNum++;
      if (imageNum<totalImages) {
       loadThumbnail();

    thank you for that.
    Transitions code
    import fl.transitions.Tween;import fl.transitions.easing.*;import
    flash.utils.Timer;//classes to use Timerimport
    flash.events.TimerEvent;
    var timer:Timer = new Timer(1500, 1);//create the timer
    timer.addEventListener(TimerEvent.TIMER, doNextTween);
    timer.start();
    var myTweenX:Tween = new Tween(bloc, "alpha", None.easeOut, 0, 1, 3, true);
    function doNextTween(e:TimerEvent):void{
      var myTweenAlpha:Tween = new Tween(bloc, "x", Strong.easeOut, 0,
    300, 3, true);
      timer.removeEventListener(TimerEvent.TIMER, doNextTween);}
    Where do i place these code above?

  • Xml photo gallery loop

    Hi,
    I have photo galleries loading via an xml file.
    Right now, it stops at the last photo. I would like it to
    "loop" back to the first photo instead of stopping and vice versa
    for the previous button.
    Here is my code for next and previous buttons.
    Thanks!
    function nextImage() {
    if (p<(total-1)) {
    p++;
    if (loaded == filesize) {
    picture._alpha = 20;
    picture.contentPath = image[p];
    picture_num();
    if(!auto_dsbl){
    slideshow();
    function prevImage() {
    if (p>0) {
    p--;
    picture._alpha = 20;
    picture.contentPath = image[p];
    picture_num();

    Try this:
    function nextImage() {
    if (p<(total-1)) {
    p++;
    if (loaded == filesize) {
    picture._alpha = 20;
    picture.contentPath = image[p];
    picture_num();
    if(!auto_dsbl){
    slideshow();
    } else{
    p=0;
    if (loaded == filesize) {
    picture._alpha = 20;
    picture.contentPath = image[p];
    picture_num();
    if(!auto_dsbl){
    slideshow();
    function prevImage() {
    if (p>0) {
    p--;
    picture._alpha = 20;
    picture.contentPath = image[p];
    picture_num();
    } else{
    p=total;
    picture._alpha = 20;
    picture.contentPath = image[p];
    picture_num();
    Cheers,
    Gorka
    http://www.AquiGorka.com/blog

Maybe you are looking for

  • What is a good product to connect laptop to the tv

    I'm looking for a wireless way to connect my laptop to my tv anyone know of a good product

  • Supplier Evaluation in SRM

    Hi Gurus, There are standard supplier evaluation functionalities in SRM. I wonder if the supplier evaluation in SRM can also include Purchase Order, receiving, etc info from backend R/3 system. Or does the supplier evaluation only include the informa

  • Cisco CDA does not connect to domain controller

    Hello, I am trying to install the Cisco CDA (Context Directory Agent) to bridge the windows identity gap between Active Directory and Cisco IronPort WSA and eventually ASA. I followed all the rules in the deployment instructions and I still cannot ge

  • CS 5.5 Premiere Pro - Why no GPU acceleration to choose

    Normalyy there should be the possibility to choose two options of video rendering and playback when starting a new project. As I use a NVDIA GTX470 which is on the gpu accerleration list of graphic cards on adobe homepage I guess I should have the po

  • Responsive object test not working

    I am working on a tutorial found in the AS Bible for flash 8 which is suposed to create a square which responds to your mouse movement by dragging part of the square to change it's shape. The script works partially, but not all the way. When loading