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/

Similar Messages

  • 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/

  • 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

  • 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"); }

  • Make 3D Flash wedding photo gallery with songs

    Last week, my dearest sister got married. There were about a gazillion things to love about her wedding day… so many moments all wrapped up into one very totally unforgotten event. I took lots of wedding photos on her wedding day and wanted to give her a surprise of making her a 3D flash wedding photo gallery with wedding songs.
    As I expected, my sister was moved, many thanks she said to me. Now I just want to give my many thanks to Aneesoft 3D Flash Gallery. It is a wedding gallery making software that helped me make so gorgeous flash gallery with my sister's wedding pictures. Knowing nothing about flash making, I never thought making a splendid 3D flash gallery would be so easy. My friend, do you eager to make your own cool, awesome flash gallery now? Do you eager to sharing your wedding photos in a stunning 3D photo gallery? Let me show you the way!
    What you'll need:
    1. Wedding photos and wedding songs for your 3D flash gallery
    2. Aneesoft 3D Flash Gallery
    Step 1: Download & install Aneesoft 3D Flash Gallery
    We'll be using a very nice 3D gallery making software 'Aneesoft 3D Flash Gallery' to making a romantic wedding flash gallery with wedding photos and wedding songs, head over here and download the free trial version. Next step is to install the program.
    Step 2: Import wedding photos and edit
    You can add up to 500 photos that you want to use in your wedding photo gallery, arrange the photos as you like. Aneesoft 3D Flash Gallery supports a wide range of file formats for images, such as .jpg, .bmp, .gif. Click "Add Caption" to add title and description for your wedding photos. And you can also crop and add special effects to them to make your wedding photos more perfect
    Step 3: Choose from a variety of wedding flash gallery templates
    Aneesoft 3D Flash Gallery offer you an easy way to make a stunning wedding photo gallery by choosing from variety of flash gallery templates. A flash gallery template automatically put preset decoration to wedding gallery. When you select a preset flash gallery template, you're able to enhance it by customizing some additional settings, such as background, thumbnail effects, playback options and scrolling actions. For the adventurous users, explore the powerful advanced features and tools that gives you total control over how you compose your wedding flash photo gallery.
    Step 4: Add some wedding songs for your wedding flash gallery
    Wedding songs are a very important factor to consider when making your wedding flash photo gallery. They set the general mood and tone for your gallery, while also allowing you to express your feelings through music. You may find the perfect wedding songs out of hundreds of popular wedding songs and music through Amazon.com or iTunes.
    In this step, you can add some wedding songs as background music to play along with your wedding flash gallery. Click Add Music button to browse and add your wedding songs. You can add, remove and edit the wedding music files. And you may check the option to control the background music looping or not.
    Step 5: Preview and publish your 3D wedding flash gallery
    It is advisable that you preview the wedding flash gallery at least once, before you publish it. Click and drag mouse for scrolling and tilting the 3D flash gallery. Click on the thumbnail to zoom in and out the photos. You have several options to share and publish your 3D wedding photo gallery, such as SWF, EXE and HTML. It depends on your needs.
    OK, now your wedding flash gallery is done. What do you think of the wedding flash gallery that I made for my sister? End with my sister's sentences "Fun is not ending, romantic is not ending, and love is just beginning!" Wish your wedding pictures can also be splendid as my sister's, and your love is just beginning, enjoy!
    know more:
    http://www.aneesoft.com/win-3d-flash-gallery.html
    http://www.aneesoft.com/tutorials/3d-flash-gallery/make-wedding-flash-gallery-with-songs.h tml

    As for AS3 part of it, I am not sure your code really works. There are syntax and logical errors there.
    I think you need to take it step by step and accomplish several task in the following sequences:
    1. Write code that loads XML correctly;
    2. Write code that enables buttons;
    3. Write code that will load images on button clicks.
    The code below shows in principal what needs to be done in order to load XML and make the data in this XML available for further consumption. Also, by accomplishing this step you will iron out all the PHP vs Flash wrinkles including your XML.
    Please note, I don't know your XML structure so all the parsing issues you need to resolve yourself.
    Once you get handle on it - we, hopefully, will talk about steps 2 and 3.
    import flash.display.Loader;
    import flash.events.*;
    import flash.net.*;
    var images:XML;
    var myRequest:URLRequest;
    var myLoader:URLLoader;
    // list of image urls that will come from loaded XML
    var imageList:XMLList;
    myRequest = new URLRequest("Photography.php");
    myLoader = new URLLoader();
    myLoader.addEventListener(Event.COMPLETE, onFileLoaded);
    // suggested handler for unexpected errors - avoids some headaches
    myLoader.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
    myLoader.load(myRequest);
    // Note: all the listeners are removed
    // it is always wise to remove listeners that are needed any longer
    // to make objects eligible for arbage collection
    function onLoadError(e:IOErrorEvent):void
         trace(e.toString());
         myLoader.removeEventListener(Event.COMPLETE, onFileLoaded);
         myLoader.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError);
    function onFileLoaded(e:Event):void
         myLoader.removeEventListener(Event.COMPLETE, onFileLoaded);
         myLoader.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError);
         images = new XML(myLoader.data);
         // only now xml is ready and you can start loading images
         imageList= images.pic;

  • Flash-Web Photo Gallery

    I am trying to create a flash web photo galler using the Automate>Web Photo Gallery in CS2.
    I want to mix the features of the 2 existing options.
    In Flash Gallery 1, the thumbnails are listed as small icons in multiple lines and are magnified when the mouse hovers over them, like the dock in OS X.
    In Flash Gallery 2, the meta data listed in the xml file is displayed only if you explicitly click on the info button, and it is below the picture.
    I need these 2 options together. The rest of the options are not a problem I can go either way.
    Is there another Flash Gallery that will combine these two options?
    If not:
    Is there a way to modify the flash file to accomodate this?

    Google "Flash Gallery Templates", you'll see 2.4M links.
    Back to levonk's original question... sounds like you're trying to do what I'm trying to... alter the Flash files used to generate the Web Photo Gallery Flash Gallery 2.
    Here's my question, similar to yours:
    How do i open the "gallery.swf" file to alter Photoshop Flash Web Photo Gallery?
    Built Web Photo Gallery in Photoshop CS2's Automate. It turned out OK, and I made adjustments in the "index.html" and "galleryconfig.xml" files in a text editor (BBE).
    Now, I'd like to alter the template's .swf file but can't open it as it's "protected".
    It would be nice to be able to set up a new template that does exactly what I intend, without altering the other files. But I can't open the protected "gallery.swf" file to make changes. Can someone help? Does Adobe have an unprotected copy of that file I can fiddle with? Is there some "trick" to open a copy of that file? I could learn a lot and make it easy to repeat results for a site. Any assistance most appreciated!

  • 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.

  • 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/

  • 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?

  • Actionscript3 flash spherical photo gallery

    I am trying to get this photo gallery to work the way i want it too. I am trying to make the background transparent.
    And I can do it but when I do, the gallery seems to loose functionality. I can not scroll it, but it works when there is a background.
    I go about removing the drawBoard() function or one of the fills in the function. line 242-250.
    heres a link to the download http://www.flashandmath.com/flashcs4/spheregallery/spherical_gallery.zip.

    i understand that it is for flash cs4. my problem is figuring out a way too make background transparent so i can put it on html page and it shows background of html and not the background of the flash file. look in first post to download this file so you can try it out, to see what i am talking about.
    also i have read that i need to change the alpha in the component inspector but there is no option in this file to do that. is there any place else  i can change alpha.
    do me a favor open the file in flash and publish it and then put a new background in the html so you can see what i am trying to do

  • 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 Contest - Photo Gallery

    Hello, I hope this forum admins are OK with this post, else
    please re/move it.
    We are having a Flash contest at FFILES.com , users can
    submit a flash photo gallery, the user with best gallery system
    will receive $250.00.
    There are more details here:
    www.ffiles.com/flash/photo_gallery_contest
    Please let me know if you have questions.
    - Adrian

    no no....i designed the photo gallery especially for this
    contest....just asking if i could sell it on flashden even before
    the contest's deadline? and do you give me the permission to send
    it to them with the photos you provided? 10x

  • 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

Maybe you are looking for

  • Explorer.exe hangs on resolution changes

    I seem to have to have a very persistant, very reproducable and very annoying problem with explorer.exe just completely "hanging" frequently. This started happening near the end of November, about a month after I used Windows 7 (professional x64) wit

  • How to find out Tcode Used and their hit rate over a given period of time.

    Hi All, We wanted to know what are the tcodes that are used and how many times over a period of time.. Can you please suggest the ways to find this out.. I have heard of ST03N but not sure how to use this and then download the information .. Regards,

  • Exporting to Excel/Word get BSOD

    I am using V11.0.09 and whenever I try and export a pdf to Office 2013, the machine crashes to a BSOD. Any ideas?

  • Data struct in rsa7

    Hi guys, I came across an issue while loading data from the r/3 system to BI.The Infopackage which carries the data to the bi is fetching 0 recs...while the RSA7 queue is having data for the current selection. Can any one of tell me what could be the

  • Initial screen is different

    My initial firefox screen is google search, I have put my own image there. Everything has been fine and then for no apparent reason whenever I open firefox this initial screen has a very thick transparent white bar at that top of the image with my go