Add second image of the same category of xml

I ask everyone's help to add a second image of the same category of my xml.
banco.xml
<?xml version="1.0" encoding="utf-8"?>
<photos>
          <photo>
                    <filename>01.png</filename>
                    <filename2>01-01.png</filename2>
                    <title>Bolsa Feminina Pequena</title>
                    <description>
                    Descrição é aqui, 25 cm altura
                    </description>
                    <valorde>199,00</valorde>
                    <valorpor>159,90</valorpor>
                    <marca>Jhenyfer loopes</marca>
          </photo>
          <photo>
                    <filename>02.png</filename>
                     <filename2>02-01.png</filename2>
                    <title>Bolsa Feminina Longa</title>
                    <description> Descrição é aqui, 25 cm altura </description>
                    <valorde>89,00</valorde>
                    <valorpor>69,99</valorpor>
                    <marca>Ana Gabriella</marca>
          </photo>
</photos>
Action
import caurina.transitions.Tweener;
var folder:String = "photos/";
var timer:Timer;
var i:Number;
var tn:Number = 0;
var pic:Number = 0;
var previous_no:Number = 0;
var current_no:Number = 0;
var tween_duration:Number = 0.2;          // seconds
var total:Number;
var flashmo_xml:XML;
var flashmo_photo_list = new Array();
var photo_group:MovieClip = new MovieClip();
this.addChild(photo_group);
this.addChild(photo_title);
this.addChild(photo_description);
this.addChild(valor_de);
this.addChild(valor_por);
this.addChild(mc_marca);
photo_button.alpha = 0;
photo_button.buttonMode = false;
photo_group.x = flashmo_photo_area.x;
photo_group.y = flashmo_photo_area.y;
photo_group.mask = flashmo_photo_area;
photo_group_info.text = "";
photo_title.text = "";
photo_description.text = "";
valor_de.text = "";
valor_por.text = "";
mc_marca.text = "";
function load_gallery(xml_file:String):void
          var xml_loader:URLLoader = new URLLoader();
          xml_loader.load( new URLRequest( xml_file ) );
          xml_loader.addEventListener(Event.COMPLETE, create_photo_rotator);
function create_photo_rotator(e:Event):void
          flashmo_xml = new XML(e.target.data);
          total = flashmo_xml.photo.length();
          for( i = 0; i < total; i++ )
                    flashmo_photo_list.push( {
                              miniatura: flashmo_xml.photo[i].miniatura.toString(),
                              filename: flashmo_xml.photo[i].filename.toString(),
                              title: flashmo_xml.photo[i].title.toString(),
                              description: flashmo_xml.photo[i].description.toString(),
                              valorde: flashmo_xml.photo[i].valorde.toString(),
                              valorpor: flashmo_xml.photo[i].valorpor.toString(),
                              marca: flashmo_xml.photo[i].marca.toString()
          load_photo();
          photo_title.text = flashmo_xml.photo[0].title.toString();
          photo_description.text = flashmo_xml.photo[0].description.toString();
          valor_de.text = flashmo_xml.photo[0].valorde.toString();
          valor_por.text = flashmo_xml.photo[0].valorpor.toString();
          mc_marca.text = flashmo_xml.photo[0].marca.toString();
function load_photo():void
          var pic_request:URLRequest = new URLRequest( folder + flashmo_photo_list[pic].filename );
          var pic_loader:Loader = new Loader();
          pic_loader.unload();
          pic_loader.load(pic_request);
          pic_loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, on_photo_progress);
          pic_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, on_photo_loaded);
          pic++;
function on_photo_progress(e:ProgressEvent):void
          var percent:Number = Math.round(e.bytesLoaded / e.bytesTotal * 100);
          photo_group_info.text = "Loading image... " + pic + " of " + total + " (" + percent + "%)";
function on_photo_loaded(e:Event):void
          if( pic < total )
                    load_photo();
          else
                    photo_group_info.text = "";
          var flashmo_pic_bm:Bitmap = new Bitmap();
          var flashmo_pic_mc:MovieClip = new MovieClip();
          flashmo_pic_bm = Bitmap(e.target.content);
          flashmo_pic_bm.smoothing = true;
          flashmo_pic_mc.addChild( flashmo_pic_bm );
          flashmo_pic_mc.name = "flashmo_pic_" + photo_group.numChildren;
          if( photo_group.numChildren > 0 )
                    flashmo_pic_mc.alpha = 0;
          photo_group.addChild( flashmo_pic_mc );
function change_photo():void
          if( current_no >= photo_group.numChildren )
                    current_no = 0;
          if( current_no < 0 )
                    current_no = photo_group.numChildren - 1;
          Tweener.addTween( photo_group.getChildAt(previous_no), { alpha: 0, time: tween_duration,
                                                    transition: "easeInOutQuart" } );
          Tweener.addTween( photo_group.getChildAt(current_no), { alpha: 1, time: tween_duration,
                                                    transition: "easeInOutQuart" } );
          previous_no = current_no;
          photo_title.text = flashmo_photo_list[current_no].title;
          photo_description.text = flashmo_photo_list[current_no].description;
          valor_de.text = flashmo_photo_list[current_no].valorde;
          valor_por.text = flashmo_photo_list[current_no].valorpor;
          mc_marca.text = flashmo_photo_list[current_no].marca;
function pic_over(e:MouseEvent):void
          var mc:MovieClip = MovieClip(e.target);
          Tweener.addTween( mc, { alpha: 0.1, time: tween_duration, transition: "easeIn" } );
function pic_out(e:MouseEvent):void
          var mc:MovieClip = MovieClip(e.target);
          Tweener.addTween( mc, { alpha: 0, time: tween_duration, transition: "easeOut" } );
flashmo_previous.addEventListener( MouseEvent.CLICK, pic_previous );
flashmo_next.addEventListener( MouseEvent.CLICK, pic_next );
function pic_previous(e:MouseEvent):void
          current_no--;
          change_photo();
function pic_next(e:MouseEvent):void
          current_no++;
          change_photo();
I created a movieclip with instance name flashmo_photo_area2
PROJECT DOWNLOAD
http://www.solutionvix.com/as3project2012.zip

The project is working normally I want is to add another image to display on the screen capturing the second image of the same category of xml.
Example xml:
<photos>
          <photo>
                    <filename>01.png</filename>
<filename2>01-02.png</filename2> <-- add 
                    <title>Bolsa Feminina Pequena</title>
                    <description>
                    This flash photo rotator is provided by flashmo.com for free of charge. You may download, edit and use the source file for any purpose. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
                    </description>
                    <valorde>199,00</valorde>
                    <valorpor>159,90</valorpor>
                    <marca>Jhenyfer loopes</marca>
          </photo>
Action
flashmo_photo_list.push( {
                              filename2: flashmo_xml.photo[i].filename2.toString(), <-- add
                              filename: flashmo_xml.photo[i].filename.toString(),
                              title: flashmo_xml.photo[i].title.toString(),
                              description: flashmo_xml.photo[i].description.toString(),
                              valorde: flashmo_xml.photo[i].valorde.toString(),
                              valorpor: flashmo_xml.photo[i].valorpor.toString(),
                              marca: flashmo_xml.photo[i].marca.toString()
function load_photo():void
???????? <-- add
          var pic_request:URLRequest = new URLRequest( folder + flashmo_photo_list[pic].filename );
          var pic_loader:Loader = new Loader();
          pic_loader.unload();
          pic_loader.load(pic_request);
          pic_loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, on_photo_progress);
          pic_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, on_photo_loaded);
          pic++;

Similar Messages

  • Is there a way to add multiple images at the same time to Keynote 6.0?

    I just brought keynote after searching online about adding multiple images to a presentation all in one go - I couldn't do this on the powerpoint version I was using but there were multiple references on google to being able to do this on keynote. I purchased it and now can't get it to work! Any ideas anyone? Thanks

    Do you mean like dragging in multiple images and having one image go on each slide? If so, you just drag the images into the Slide List on the left instead of onto the slide. From this prior post.
    https://discussions.apple.com/message/9068283#9068283

  • How do I add a second URL to the same contact

    How do I add a second URL to the same contact.  There are 3 URL for this one company  depending on which division I need to look at.  I could 3 contacts but having the 3 URLs on one contact is easier for me

    Tap the "Edit" button in the upper right corner of the contact's screen. Tap the green "+" (which says add URL) next to it) below whatever URL you currently have entered.

  • When clicking "Save image as" how can I get Firefox to auto add a (1) (2) etc at the end of the filename if an image with the same filename already exists?

    How can I get Firefox to automatically rename images when clicking "Save image as" on the menu, when an image with the same file name already exists in the folder??

    Hello,
    That is not a feature that is supported natively within Firefox but there are various add-ons which I think will do the job you need.
    The one I have used is [https://addons.mozilla.org/en-US/firefox/addon/web-slide-show/?src=search Web Slide Show]. This is primarily an add-on for viewing a slideshow of images when they are presented as thumbnails on a web page. However once you are in the slideshow there is a download button which will download all the images in the slideshow. It will automatically rename the images if an image with the same name already exists in the folder.
    If you don't like that add-on then here are some others that may do the same job:
    * [https://addons.mozilla.org/en-US/firefox/addon/image-download-%E2%85%B1/?src=search Image Download II]
    * [https://addons.mozilla.org/En-us/firefox/addon/image-picker/ Image Picker]
    I hope that helps. Let me know if not.
    Also I notice that you are using Firefox v23. That is now an outdated version. To get the latest security updates I suggest updating to version 24. See the support article here: [[Update Firefox to the latest version]].

  • How  to fade groups of images or multiple images at the same time?

    I am creating a flash infographic, and want to fade images I have imported from Illustrator that are grouped. I would like to know how  to fade these groups and multiple images at the same time.
    Thanks!

    Use TweenMax for this.
    the syntax is like this:
    var arrayOfDisplayObjects:Array = new Array();
    //with arrayOfDisplayObjects.push(DisplayObject)
    //you can put any DisplayObject in the Array and when you want to fade them call this
    TweenMax.allTo(arrayOfDisplayObjects,1, { autoAlpha:0} );
    //to fade them in 1 second to alpha=0 and when reaching the zero make them invisible (to save processing power)

  • When I try to same an image under the command 'save as' it will only let me save as file types 'firefox document' or 'all files' and when I try to look at them later they dont work. How can I save an image as the same file type it is on the web site?!

    When I try to save an image under the command 'save as' it will only let me save as file types 'firefox document' or 'all files' and when I try to look at them later they dont work. How can I save an image as the same file type it is on the web site?!
    == This happened ==
    Every time Firefox opened
    == I updated to one of the firefox versions (Not sure which one it was)

    Thanks Alex, but sadly I already tried that. Neither .docx or .xlsx files show up in the content list. They both show as a Chrome HTML document so changing how Firefox addresses those doesn't help since it thinks its the same type of file. I don't think I can manually add files into the "Content Type" left side nav.

  • How to add a image in the DocSign example

    Hi,
    I am struggling to add a image to the DocSign example instead of text. If somebody could give me a few hints it would be much appretiated.
    I am currently modifying the CreateN2XObject function.
    My situation is as follows:
    I am drawing a image using the wxWidget library. From this a save the raw pixel data to a file. The pixel data is an array of unsigned chars where the first RGB triplet corresponds to the pixel first pixel of the first row, the second one to the second pixel of the first row and so on until the end of the first row; and so on...
    In the CreateN2XObject I create an ASStm to read this file.
    I create an attribute dictionary for this image
    And then a new cos stream from the ASStm and dictionary
    When I return from the function the plugin says that it is successfully signed, but I see nothing on the screen.
    When I open the 'signed' document in a text editor I see:
    <</Subtype/Form/Length 16038/Name/PROS/BitsPerComponent 8/Matrix[1.00011 0.0 0.0 1.00011 0.0000305176 0.0000305176]/ColorSpace/DeviceRGB/Width 54/Height 99/Type/XObject/BBox[0 76 238 0]/FormType 1>>stream
    the data in the file
    endstream
    Below is the code I use to make the image i.e. CreateN2XObject:
         DSAPXObjEntryRec signRec;
         memset(&signRec, 0, sizeof(DSAPXObjEntryRec));
         signRec.rect = *pBBoxRec;
         signRec.bDestroy = true;
         AVDevRect rcDev = { (int)ASFixedToFloat(pBBoxRec->left), (int)ASFixedToFloat(pBBoxRec->top), (int)ASFixedToFloat(pBBoxRec->right), (int)ASFixedToFloat(pBBoxRec->bottom) };
         const char* baseDirectory = "C:/temp/data";
         ASPathName exampleFilePathName = ASPathFromPlatformPath ((char*)baseDirectory);
         ASFile theFile;
         ASInt32 retVal = ASFileSysOpenFile(NULL,exampleFilePathName, ASFILE_READ, &theFile);
         int len = 16038;
         ASStm inStm = ASFileStmRdOpen(theFile,len);
         char tmpsize[255];
         sprintf(tmpsize,"%d",len);
         AVAlertNote("tmpsize");
         AVAlertNote(tmpsize);
         //sprintf_s(buf, 125, "1 0 0 RG %i %i m %i %i l S", rcDev.left, rcDev.top, rcDev.right, rcDev.bottom);
         //ASArraySize len = strlen(buf);
         //int len = 19758;
         //ASStm inStm = ASMemStmRdOpen(buf, len);
         CosObj attrDict = CosNewDict(cosDoc, false, 1);
         CosDictPutKeyString(attrDict, "Type", CosNewNameFromString(cosDoc, false, "XObject"));
         CosDictPutKeyString(attrDict, "Subtype", CosNewNameFromString(cosDoc, false, "Image"));
         CosDictPutKeyString(attrDict, "Width", CosNewInteger(cosDoc, false, 54));
         CosDictPutKeyString(attrDict, "Height", CosNewInteger(cosDoc, false, 99));
         CosDictPutKeyString(attrDict, "ColorSpace", CosNewNameFromString(cosDoc, false, "DeviceRGB"));
         CosDictPutKeyString(attrDict, "BitsPerComponent", CosNewInteger(cosDoc, false, 8));
         CosDictPutKeyString(attrDict, "Name", CosNewNameFromString(cosDoc, false, "PROS"));
         CosDictPutKeyString(attrDict, "Length", CosNewInteger(cosDoc, false, len));
         CosObj cBBoxObj = CosNewArray(cosDoc, false, 4);
         CosArrayInsert(cBBoxObj, 0, CosNewInteger(cosDoc, false, rcDev.left));
         CosArrayInsert(cBBoxObj, 1, CosNewInteger(cosDoc, false, rcDev.top));
         CosArrayInsert(cBBoxObj, 2, CosNewInteger(cosDoc, false, rcDev.right));
         CosArrayInsert(cBBoxObj, 3, CosNewInteger(cosDoc, false, rcDev.bottom));
         CosDictPutKeyString(attrDict, "BBox", cBBoxObj);
         AVAlertNote("Creating cos stream");
         CosObj cStmObj = CosNewStream(cosDoc, true, inStm, 0, true, attrDict, CosNewNull(), len);
         AVAlertNote("Finished creating cos stream");
         ASStmClose(inStm);
         signRec.xobj = cStmObj;
         AFPDWidgetBorderRec border;
         AFPDWidgetGetBorder(PDAnnotFromCosObj(sigAnnot), &border);
         AVAlertNote("Returning DigSigAPXObjectFromXObjList");
         return DigSigAPXObjectFromXObjList(cosDoc, pBBoxRec, &signRec, 0, 0, &border, kDSMerge);
    Regards,
    Magda

    Thanks!
    So, even though I am spesifically telling it to create an Image type with CosDictPutKeyString(attrDict, "Subtype", CosNewNameFromString(cosDoc, false, "Image"));
    I must still create a Form object around it?

  • How do I add an image above the navigation bar?

    I'm trying to add an image above the navigation bar and can't seem to do it without covering the links. Does anyone know how to do that?
    Thanks!

    Hi,
    select the page you want to add the image to
    open up the Inspector and go to the Page Tab (second from left)
    Choose Layout and increase the size of Header Height
    Regards,
    Cédric

  • How add a image in the banner portlet like 'my links' in favourite portlet

    How can I add a image in the banner of a portlet, like the 'my links' image in the Favourite Portlet?
    Thanks in advance

    hi,
    The image mylinks is not rendered by the portlet. It is a part of the page. You can always do a similar thing like rendering the image in the same page before the portlet.
    Thanks,
    Sriram

  • Is there a way to add two windows in the same window?

    is there a way to add two windows in the same window?

    what do you mean by your first use of the word "window"? do you mean a visible frame? a section of the gui that the user doesnt see?
    or perhaps you mean you want to add multiple tabs to a single window, so that switching between tabs shows different windows?

  • How to add an image in the header? Pages 5.0

    I don't believe I have to use Microsoft Word! I can't, no way, add an image in the header. This is unbelievable!
    **** time I updated to Mavericks!
    Please, does anyone know the solution?
    I'm losing a great deal in my company.

    Do you still have Pages 4.3 installed. If so, use that.

  • HT1349 I can not run the scanner in my main user, but only the second user and the same thing with updating apps! Why is this happening???

    I can not run the scanner in my main user, but only the second user and the same thing with updating apps! Why is this happening???

    Welcome to the Apple Community.
    Enter the details of her second account at system preferences> mail, contacts & calendars.

  • How to use two different boot images in the same task sequence

    I have a need to use Two boot images in the same task sequence. The reason is I'm deploying ZTI to McAfee encrypted devices which I have already done with McAfee v6 Encryption successfully.
    Here's where my problem comes in. We are about to deploy McAfee v7 which means we will have a mix of v6 and v7 in our environment. I must have two special Boot images one with v6 drivers and one with v7 drivers in order for my process to work. I don't see
    a way right now to assign more than one boot image to a task sequence. Is there any way to do this?
    If I can't do that then I will have to create two task sequences and target collections based on the Endpoint Encryption version to deploy to.
    If anyone has suggestions it would be much appreciated. Thank you

    Have you tested copying those files to %windir%\system32\drivers during the WinPE session (just enable commandline support to your boot image) to see if they need to be in there before the OS start? Test that and if they don't need to be there during the
    boot up of WinPE then:
    Create two packages (v6 and v7)
    "Run command line", use the package created earlier and just use "copy /Y .\*.* %windir%\system32\drivers" ...again, this should be run according to your needs, variable or some other check like I said

  • Multiple images of the same file on one page

    How do I create multiple images of the same file on one page? For example, I've got an image that I could fit 6 of on one page, and would like to print it that way instead of printing it on 6 individual pieces of paper.

    Are you attempting to do this in Adobe Workspaces? Or are you looking for software that will do it?
    If the former, you could insert the image into a Buzzword document six times. Not exactly elegant, but it might do the trick.

  • How to have multiple images on the same screen? like in the movies where you see several actions at

    how to have multiple images on the same screen? like in the movies where you see several actions at the same time ....
    i don't find  a tutorial in adobe tv....
    thanks !!

    The short answer is that you'll put the source clip(s) for each inset on a different video track, all stacked up. Then use the Scale and Position effects (under "Motion" on the Effect Controls panel) to reduce their size and place them where you want.
    If the content of an inset will involve edited content (where you're cutting among various clips or just trimming out unwanted content from a single clip), then you'll probably find it easier to do all those edits in one sequence, then nest that sequence in the master sequence, where you apply the Scale and Positioning effects. That will save the step of applying the scale and position effects to each edited track item.

Maybe you are looking for

  • Function Job_Close

    Hi, I try to use following function:     CALL FUNCTION 'JOB_CLOSE'       EXPORTING         jobcount             = u_f_jobcount         jobname              = u_f_jobname         predjob_checkstat    = 'X'         pred_jobcount        = pred_jobcount

  • Slow internet. Web pages slow to load.

    Hello, My mac mini is finding web pages slowly. 5-10 seconds or more to find the pages and then it will load (instantly) most of it and pause a second of or two and load the rest. Downloads are fast. Within 100kbps of advertised speed (1.5 mb dsl). M

  • How to use iMac to work with windows computers like pcAnywhere?

    I just bought my first iMac, and love it. I run pcAnywhere (version 12.1) on a few windows computers for work, but need to connect to them via my new iMac and using a phone line modem.  How do I do this; and I am fairly new to Mac.  I have tried to i

  • IChat keeps quitting

    For the past several days both my daughter and I have been experiencing problems with my iChat and her AIM quitting. I thought it was me and she thought it was her work computer. We are in 2 different states. I can bring it up and then after a while

  • Balance Dimension in Payroll

    Hi Friends, Balance Dimension in Payroll : Is der any Balance dimension which will hold the value of Previous year YTD? As per my requirement, i want to use the previous year accumulated balance value(from 01-Apr-2010 to 31-Mar-2011) in the current y