Creating simple photo gallery

Hi,
I'm trying to create a simple photography portfolio in Flash
8, whereby the user clicks on a thumbnail and the image fades up. I
have 24 thumnails, so do I need to create 24 different 'fading
image' movie clips, or is there an easier way to do this? Is it
possible to create one movie clip and then just update the image
within it?
I'm quiet a newbie so i might be missing somehting here...
Any help greatly appreciated. David.

Ok,
So many of you started using this that I had to look it over
and figure out how to make things easier. The setup on the stage is
exactly the same, except you should now create a simple preloader
movieclip and place it on the stage - name it "loader". Remove all
the actionscripts you had attached to your buttons and the holder
movie clip and everywhere else. The script below should be the only
script in the movie and should reside in the first frame. Simply
copy and paste the following script into the first frame of your
timeline:
/* SCRIPT STARTS HERE - COPY FROM HERE DOWN */
/* make sure your jpegs are named Image1.jpg, Image2.jpg,
etc., etc... */
var reset:Boolean = false;
/* change numOfImages to the total number of images you have,
and create this many buttons on the stage named button1,
button2, etc., etc... */
var numOfImages:Number = 3;
/* ====================== */
/* create a movie clip that will act as your preloader and
place it on the stage,
name it "loader" */
this.loader._visible = false;
/* ======================== */
this.holder.createEmptyMovieClip("jpegTarget",0);
for (i=1; i<numOfImages+1; i++) {
this["button"+i].ID = i;
this["button"+i].onRelease = function() {
_root.loader._visible = true;
var targetName:String = "Image"+this.ID+".jpg";
reset = true;
_root.holder.jpegTarget.loadMovie(targetName, 0);
_root.holder._alpha = 0;
this.holder.onEnterFrame = function() {
fadeIn(this);
function fadeIn(clip) {
if (clip.jpegTarget._width>1) {
_root.loader._visible = false;
dif = 100-clip._alpha;
if (Math.abs(dif)>1 && reset == true) {
/* the .3 in the next line controls the speed of the fade
change it and experiment */
clip._alpha += dif*.3;
/* ================= */
} else {
clip._alpha = 100;
reset = false;
/* END OF SCRIPT - DON'T COPY BELOW THIS LINE */
The only things on the stage should be:
1 blank movie clip named "holder" - position where you want
picture to load
1 movie clip named "loader" which is your preloading
animation (or text or whatever)
your buttons (thumbnails) which should be named button1,
button2, etc.
Make sure of the following:
- Change the numOfImages variable in the script to match how
many images and buttons you have. so if there are 5 buttons on
stage loading 5 jpegs, change it to 5.
- Target AS 2.0 in your publish settings
- name your jpegs EXACTLY as follows: Image1.jpg, Image2.jpg,
etc. If you move them to another folder, i.e., "images", make sure
to put this in the script
- name your button instances EXACTLY as follows: button1.jpg,
button2.jpg, etc.
The loader movie clip is up to you, and you may figure out a
better way to handle this. This is pretty simple but should work if
simple is what you're after. Please let me know if it doesn't work
- good luck!

Similar Messages

  • Creating a simple photo gallery.. buttons not working.

    Im trying to create a photo gallery that when you click on the thumbnail image you get a blown up image on the screen. The user will then hit the little "x" button to return to the thumbnail page.
    I have attached pictures of what they look like. My issues is that when the user clicks on the little "x" nothing happens on images 2-5. It works fine on image 1. I have fiddled with the code, creating different buttons, using the same button both with different instance names and with different. Still does not work. I do not get any error messages during test either. Im at a loss. Please help!
    Here is the code as it stands: (ActionScript 3.0 using Flash CC)
    function go_back1(event:MouseEvent):void {
      gotoAndStop(1)
    close1.addEventListener(MouseEvent.CLICK, go_back1);
    close2.addEventListener(MouseEvent.CLICK, go_back1);
    close3.addEventListener(MouseEvent.CLICK, go_back1);
    close4.addEventListener(MouseEvent.CLICK, go_back1);
    close5.addEventListener(MouseEvent.CLICK, go_back1);
    close6.addEventListener(MouseEvent.CLICK, go_back1);

    I think the problem lies in skipping the frame where the button gets the listener assigned to it.  If you are at frame 1 and then jump frame 5 or beyond you skip the code that would be assigned in frame 4.
    Try the following.  Have the close button start from frame 1, but in frame 1 make it invisible.  Also move the listener code and event handler function there as well
              close1.visible = false;
              function go_back1(event:MouseEvent):void {
                gotoAndStop(1)
              close1.addEventListener(MouseEvent.CLICK, go_back1);
    Then in whatever function(s) you have for going to one of the large picture frames include the line to make close1 visible.
            close1.visible = true;

  • Help with creating a photo gallery?

    im trying to create a simple photo gallery. all i need to
    know is the lingo so that i can rollover a thumbnail of an image
    and it appears in place of a black box.... any help would be much
    appreciated.

    what code do you already have? Maybe we can help you modify
    it where it's not working.
    Also, how do you have it currently laid out? eg. do you have
    several images on the screen, but some method to scroll through
    other images? Have you done a search here or on director-online.com
    (in the forum or articles section) on similar questions? Do you
    have something written up to describe what features you need such
    as a design document?
    Just trying to get a sense of your level of programming in
    general, experience with Director and what planning/details you
    have worked out so far because there are so many different ways to
    program a gallery.

  • Creating flash photo gallery with Bridge

    This may not be the best way of creating a flash gallery but
    I thought I would try it since I'm new to this and it seems faster
    then editing all those photos.
    When I create the photo gallery using Adobe Bridge and then
    try to open the Flash Movie file to edit the movie it tells me
    "Cannot open a protected movie"
    Does this mean that I cannot edit the movie after Bridge
    creates it or is there a way around this?

    Welcome Alex  -
    Any picture you display on your site can be saved to the visitor's computer.
    If you ZIP each gallery, a simple link to the zipped archive will offer the visitor
    an option to save to their computer.

  • Creating short photo gallery using previous and next frame A3.0

    I'm creating a simple photo gallery.
    Can someone tell me the right code this is what I'm remember. I forgot.
    next_btn.addEventListener(MouseEvent.CLICK, goNext);
    previous_btn.addEventListener(MouseEvent.CLICK, goBack);
    function goNext(e:MouseEvent):void {
    gotoAndStop("nextFrame");
    function goBack(e:MouseEvent):void {
    gotoAndStop("previoudFrame");
    I know it's wrong can someone help me out?
    Thanks

    inside your functions use just
    nextFrame();
    and
    prevFrame();
    and get rid of those gotoAndStop and it should work...

  • Simple photo gallery

    I used a very old version of Fireworks some time ago, which I
    think had the ability to do this but I'm now uing CS3 and wanted to
    know:
    I would like to create a simple photo gallery whereby there
    is a grid of 4x3 image thumbnails and then when you click on one of
    the thumbnails it enlarges the photo to take up the occupied space
    of where the thumbnails exist - click close and then it takes you
    back to the thumbnails.
    Is there any way of doing this in CS3? I'm presuming I could
    use slices and layers with hotspots but I'm not entirely sure how -
    are there any tuturials on this.
    Thanks in advance for any help on this subject.

    Hi,
    Not exactly what you're asking for but are you aware of the,
    new to CS3,
    'Create SlideShow' Command?
    There are six (I think) different layouts, one of which may
    suit.
    An example of one I threw together can be seen here
    http://www.fasterthanu.com/
    There are also a couple of links on bridge to tutorials as
    well as some on
    the Adobe site
    Peter
    "greencode75" <[email protected]> wrote in
    message
    news:fgjvai$qg$[email protected]..
    |I used a very old version of Fireworks some time ago, which
    I think had the
    | ability to do this but I'm now uing CS3 and wanted to know:
    |
    | I would like to create a simple photo gallery whereby there
    is a grid of
    4x3
    | image thumbnails and then when you click on one of the
    thumbnails it
    enlarges
    | the photo to take up the occupied space of where the
    thumbnails exist -
    click
    | close and then it takes you back to the thumbnails.
    |
    | Is there any way of doing this in CS3? I'm presuming I
    could use slices
    and
    | layers with hotspots but I'm not entirely sure how - are
    there any
    tuturials on
    | this.
    |
    | Thanks in advance for any help on this subject.
    |

  • How can I create a photo gallery in flash cs3, Iam a beginner in flash

    How can I create a photo gallery to put into my current flash site Iam creating? Using  flash cs3, can anybody suggest any tutorials (noting complicated with me being new to flash cs3)
    When going on line I saw that maybe you can use Dreamweaver, XML, or even Photoshop can anybody explain the difference between using one or the other?
    THanks

    Indeed, google ftw.
    For example:
    +as3 photo gallery flash tutorial
    reveals many including this one:
    http://www.flashmagazine.com/Tutorials/detail/as3_photo_gallery/

  • Help to create a photo gallery..

    Can anyone visit this site..
    www.ted.com
    I want to create a photo gallery like that.. I mean when i hover my mouse over a thumbnail my image should enlarge.. and if i click i should be able to download..
    I want that animation while loading between my galleries..
    please help me.. please.. no need that various sizes for all tiles.. no problem even if all tiles are of same size.. please.. I need it so badly..
    thanks in advance

    Whenever I need a gallery like this i usually just buy one
    from:
    http://www.flashcomponents.net/component/
    they are usually like $8-10 and have saved me quite a bit of
    time... there are plenty of tutorials out there for custom ones,
    but for $8 its hard to pass up a pre-built... i know this doesnt
    answer your question exactly but i figured i would give my 2 cents,
    hope this helps :)

  • Creating a photo gallery like the China Gallery in Adobe Labs. How?

    I have photos in several categories (I'll use 2, "frank" and "wolfie" as examples here). What I'd like to do is build a photo gallery like the China Photo Gallery shown in the Adobe Labs site, where the user can switch between categories without going to a different page. Here's what I've done so far and how I'm stuck:
    I created a photo gallery with the instructions in the tutorial "Building a photo album with the Spry Framwork". I then inserted a Tabbed Panels widget for navigating between the categories.
    I set up an XML file as follows:
    /* frank category */
    <photo
    path = "001p.png"
    width = "467"
    height = "467"
    thumbpath = "001p.png"
    thumbwidth = "85"
    thumbheight = "85">
    </photo>
    /* wolfie category */
    <photo
    path = "001f.png"
    width = "467"
    height = "467"
    thumbpath = "001f.png"
    thumbwidth = "85"
    thumbheight = "85">
    </photo>
    To create the div holding the thumbnails for the "frank" category, I entered the following:
    <div class="thumbdiv" spry:region="dsGallery"><img src="thumbnails/frank/{@thumbpath}" spry:repeat="dsGallery" spry:setrow="dsGallery" class="thumbs" /></div>
    To create the div where the full size images will be displayed, I entered the following:
    <div class="mainpic" spry:detailregion="dsGallery"><img src="images/frank/{@path}" onload="MM_effectAppearFade(this, 1500, 0, 100, false)" /></div>
    Then, in the tabbed panel set for the "wolfie" category, I did the same thing, substituting "wolfie" for "frank". However, since there is only one xml file, spaceholders for all of the thumbnails appear in the thumbnail div for the frank category. I realize that I'll probably need to create a separate xml file for each category, but how do I set it up so the correct xml file is accessed when the link in the tab is clicked? Or am I approaching this all wrong?
    From reviewing the source for the China gallery, it appears that they set up links to different xml files instead of Tabbed Panels. How does that work? There are also some javascript files I can't find anywhere on Adobe's site.
    Thanks

    Hi,
    If you have seperate XML file but with the same basic structure then you can change the XML a Spry dataset refers to and regenerate the spry region without reloading the full page.
    So on my photo gallery page I can change the album the photos are shown from via the seturl sprydata function as below.  dsPhotos being my Spry dataset that points to the relevant XML dataset with my image references and captions etc.  My XML is actually dynamically generated from Picasa RSS feeds (and RSS feeds are XML) but the principle will be the same with your static XML.
    First I add an event listener for when someone clicks on an album (the li tag within my div with the id "albums" holds a photo and title for each album.)
    function Albums()
    var myalbums = Spry.$$("#albums li", "TabbedPanels1")
    var rows = dsAlbums.getData();
    var setListener = function( element, value )
      Spry.Utils.addEventListener( element, "click", function(){ showAlbum( value ); },false );
    for( var i = 0, length = myalbums.length; i < length; i++ )
      setListener( myalbums[i], i );
    Then this is the code which changes the photo album to be shown. (when the user clicks the relevant album)
    function showAlbum(i)
    pauseShow();
    pImage = 'No';
    var rows = dsAlbums.getData();
    var albumid = rows[i]["albumid"];
    var url = "xml/PicasaAphotoFeed.asp?albumid=" + albumid;
    dsPhotos.setURL(url);
    dsPhotos.loadData();
    var rowcount = dsAlbums.getRowCount() - 1;
    var nextalbum;
    var navnext;
    var n;
    The page is here www.thehmc.co.uk/photo5.html is you want to see it in context.
    In your case showAlbum would switch between Frank.xml or Wolfie.xml depending on how you decide to name your xml datasets.
    Regards
    Phil

  • What is the best way to create a photo gallery?

    Hi,
    I want to create a photo gallery in Dreamweaver without using any pre-built "web gallery" function. What's the best way to swap the images when I click the "next" button? Do I create a new Dreamweaver page for each photograph? Is there a more efficient way to do it than that?
    Thanks,
    Gordon

    Is there a more efficient way to do it than that?
    Most definitely.  With scripts.
    57+ Free Galleries, Slideshows & Lightbox solutions:
    http://www.1stwebdesigner.com/css/57-free-image-gallery-slideshow-and-lightbox-solutions/
    20 Best jQuery Slideshow Scripts
    http://graphicalerts.com/20-best-jquery-slideshow-image-photo-gallery-plugins/
    If you're a photographer or managing a large collection of images, look at JAlbum.
    Download the software.  Drag & Drop your images/folder of images into the work space.  Hit create album.  In a few seconds, jAlbum generates your HTML pages and thumbnail images for you.  A real time saver with plenty of customizable skins to choose from.
    Download: http://jalbum.net/software;jsessionid=qkhdjzieqjtg1rz4x2anjlk5d
    Skins:  http://jalbum.net/skins
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Can/How Do I Create a Photo Gallery Template in Bridge

    It is possible for me to create a photo web gallery "template" in Bridge CS5. I would like it so that every time I create a photo gallery for sports photos, the header, google analytics, facebook icon,  twitter icon copyright and more are all the same every time a create a photo gallery in Bridge CS5.
    Sample of one of our photo pages (not done in Bridge yet).

    Thanks a million .

  • Is it possible to create a Photo Gallery DVD with downloadable content?

    I am looking for a way to create a photo gallery, distribute it via DVD, and have the end user be able to download the photos from within the photo gallery. This would function exactly like the iPhoto web galleries, but would be distributed on DVD rather than posted to the web. Is this possible? I am looking for a way for a user to download the photos, in low res and high res, from within the DVD player.

    My first suggestion is to use Apple's Pro apps (ie, DVDSP) if you plan to use this DVD commercially. You'll get far better results and you will also be able to meet nearly all of the above objectives.
    If on the other hand you don't have the time to learn apple's pro apps which does have a large learning curve compared to the i-apps, and you are currently working with a shoestring budget, then you can meet at least some of these objectives within iDvd by adding your content to the Dvd rom section of the Dvd. The app that one uses to play the slideshow from this data section of the Dvd depends largely on the available apps on the host computer system having access to this data in terms of what software is available to play its content. Hope this makes sense but if not, just come on back. Good luck.
    Btw ... I'll check back with you later tonight since I have a fair amount of editing to do this AM.

  • CS6 How to create a photo gallery?

    CS6 How to create a photo Gallery?

    I like Fancybox2.  It's a big improvement over Lightbox &  the original Fancybox.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5, with Fancybox2 Viewer</title>
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <!--LATEST JQUERY CORE LIBRARY-->
    <script src="http://code.jquery.com/jquery-latest.min.js"></script>
    <!--FANCYBOX plugins-->
    <link href="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.css" rel="stylesheet" media="screen">
    <script src="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.pack.js"></script>
    <style>
    /**this styles image container**/
    #thumbs p {
        float: left;
        width: 180px;
        height: 12.5em;
        margin: 10px 0 0 20px;
        padding: 10px;
        border: 1px solid silver;
        /**rounded borders**/
        -moz-border-radius: 20px;
        -webkit-border-radius: 20px;
        border-radius: 20px;
        /**this styles caption text**/
        font: italic 14px/1.5 Geneva, Arial, Helvetica, sans-serif;
        color: #666;
        text-align: center;
    /**recommend using same size images**/
    #thumbs img {
        width: 160px; /**adjust width to thumbnail**/
        height: 120px; /**adjust height to thumbnail**/
        margin-bottom: 1.5em;
        opacity: 0.75;
    #thumbs img:hover { opacity: 1.0 }
    /**float clearing**/
    #thumbs:after {
        content: ".";
        clear: left;
        font-size: 0px;
        line-height: 0;
        display: block;
        visibility: hidden;
    </style>
    </head>
    <body>
    <h1><a href="http://fancyapps.com/fancybox/">Fancybox2</a> Viewer with images</h1>
    <!--insert thumbnails with links to full size images below-->
    <div id="thumbs"> <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 1" /></a> <br />
    Caption 1 </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 2" /></a> <br />
    Caption 2 </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 3" /></a> <br />
    Caption 3 </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 4" /></a> <br />
    Caption 4 </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120" alt="Thumbnail 5" /></a> <br />
    Caption 5 </p>
    <!--end thumbs--></div>
    <!--Fancybox with Iframe-->
    <h1>Fancybox with Iframe</h1>
    <h3><a class="fancybox" data-fancybox-type="iframe" href="http://example.com">EXAMPLE.COM</a></h3>
    <!--FancyBox function code-->
    <script>
    $(document).ready(function() {
        $('.fancybox, iframe').fancybox();
    </script>
    </body>
    </html>
    Nancy O.

  • Is it possible create a photo gallery with java?How do i do?

    I must create a photo gallery and I think the best code is java...but I know a little the code.Help me

    Check this list:
    http://www.java-tips.org/java-applications/photo-album-software/
    They are written in Java. They may help..

  • Can I create a photo gallery with CS4?

    I have CS4--Is it outdated, or can I still create a photo gallery to be loaded to a web site with CS4?
    Procedure?
    I have two galleries that I created with CS4 3 years ago....Is it still possible?
    Photoshop---Lightroom--Bridge?

    Yes. Use Bridge--output
    Creating a web photo gallery | Learn Adobe Bridge CS4 | Adobe TV

Maybe you are looking for

  • How to disable the selection screen element?

    Hello Colleague, I have a report which has a checkbox in the selection screen. Currently I need to create two transaction codes for the report. When Tcode1 is executed, the program will execute in normal way. When Tcode2 is executed, the checkbox sho

  • DBMS_SCHEDULER.CREATE_JOB executing a shell script

    Hi , Shell script :-  TEST.ksh #!/bin/ksh dhxmlfile=`date +"%Y-%j-%R"` dhoriginfile= /A/XMLFirstTest.xml dhdestinationfile=/A/B cp $dhoriginfile $dhdestinationfile/$dhxmlfile rm $dhoriginfile BEGIN DBMS_SCHEDULER.CREATE_JOB (job_name=>'TEST.ksh',   j

  • TS2826 Do I have to have an apple remote to work my Apple TV

    I lost my remote to my Apple TV, can I just use the app or do I have to buy another one

  • In-Store Issue - Signatures

    To Whom It May Concern: I've tried searching the website for awhile, but have been unable to locate an email address for customer service contact. Today, 11/9/14, I accompanied a friend to the Verizon store on the Avenue in White Marsh, MD to upgrade

  • How can i improve this 2min countdown timer?

    Hello I'm trying to see if anyone has any ideas on how to improve this simple 2 minute countdown timer.  All suggestions are welcome! Thanks in advance! -noviceLabVIEWuser Solved! Go to Solution. Attachments: 2min Countdown Timer.vi ‏38 KB