Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
  1. #1

    Default Adding a Flash Image Gallery to a webpage :(

    New to the forum so just like to say a big hi to everyone

    So, I've followed a tutorial to create a fairly straightforward image gallery in flash but now I want to add this to my website. The problem is I can't work out where to upload / link the images I want to be used in the gallery online. The swf file works fine locally but obviously when I upload the swf to the website it can't retrieve the data it needs to display properly.

    I'm using www.create.net/ as my webspace host.

    The tutorial I followed http://flashexplained.com/actionscri...ry-in-flash-8/

    I dont know enough about flash to figure this one out myself, I have tried uploading the images I want on the website (i.e. the thumbnail and the larger image) and can't work out how to link them.

    Is there a way to embed all the images into the swf file?

    If anyone can give me a kick in the right direction it would be very appreciated! I need a step by step process to probably understand how to do this.

    I can upload everything on the website but obviously I can't use a folder hierachy like you would locally so thats where i've hit a wall!

    thanks a bunch!
    Ben

  2. # ADS
    Join Date
    Always
    Posts
    Many
     
  3. #2
    Join Date
    Jun 2009
    Location
    Houston, Tx
    Posts
    581

    Default

    There are many options for you.
    First off, if you put all your pictures in a folder on your web server, you can easily have flash go in and load them out of there.
    If you want to simulate a folder hierarchy, then you can always put a word before the image title followed by a dot or something. Be creative.
    I.e.
    folder1.picture1.png
    folder2.picture1.png
    Then, tell flash to look for the folder name, then the picture name, etc.

    Or, you could use an xml document to have a folder hierarchy for you. You will, of course, need to know how to program in flash, and know how xml works.
    If you are serious about getting your website up, then I would suggest you hire someone to do the programming. Make sure they do it the right way, then you will be set.
    If you don't have the resources to shell out, or you think you will need to update your flash code a lot, then I suggest picking up a book and learning how to code.

  4. #3

    Default

    Hi Vlykarye, thankyou very much for responding..

    I think the best option for this design will be to attempt what you suggested and simulate a folder hierachy otherwise I may have to scrap the gallery design and make it from scratch.

    I've setup the first gallery folder as such:

    gallery.male.thumbs.1 (simulate a folder called 'thumbs' in the male gallery folder... 1 = first image)
    gallery.male.1 (simulate the male gallery folder with the 1st image)

    *so basically: gallery.male.thumbs.1 = 1st image, thumbnail
    gallery.male.1 = 1st image, full size

    Now i need to workout how to tell flash to load the images from the url address?

    https://login.create.net/siteimages/...67/4370568.jpg = thumbnail
    https://login.create.net/siteimages/...67/4370574.jpg = full-size

    I've attached the Code and the gallery XML file for your convenience also.

    galleryXML.txt
    code.txt

    The xml file url is: https://login.create.net/sitefiles/1...67/gallery.xml

    thanks,
    Ben
    Last edited by ben10; 04-12-2012 at 03:24 PM.

  5. #4
    Join Date
    Jun 2009
    Location
    Houston, Tx
    Posts
    581

    Default

    Yeah. Mmk. That's a bit of code to go through. It'll take me a little bit to see what you're trying to do. In the meantime, can you tell me in words what you have working, what isn't working, and what you still need to add to the code.

  6. #5
    Join Date
    Jun 2009
    Location
    Houston, Tx
    Posts
    581

    Default

    First question:

    "Click on a gallery name on the left to load its thumbnails. Remember, you can click on a thumbnail only when all the thumbnails in a gallery have been loaded. When you click on a thumbnail to see the big image, clicking on the big image will close it and you will return to the gallery. Use the button(s) above the galleries to scroll through them."

    Why do I have to wait for all the thumbnails to load? Is this due to the loading function you found? Or is this code completely taken out of a tutorial?

  7. #6
    Join Date
    Jun 2009
    Location
    Houston, Tx
    Posts
    581

    Default

    Second question:

    After glancing through the code, it looks like it loads groups of images together, instead of one image at a time. But, I don't really know for sure. Could you email me the flash file?
    Also, I have Flash CS5, so if you have Flash CS5.5, could you please downgrade it to CS5 for me.

  8. #7

    Default

    Hi again Vlykarye, sorry I wasn't able to reply yesterday.

    can you tell me in words what you have working, what isn't working, and what you still need to add to the code.
    The website I am working on can be found here

    Ok what i have at the moment is a working copy of the file locally i.e. all the files are in one folder with a second folder stored inside containing all the images and the xml file.
    This works by locating the folder called 'gallery' followed by each gallery folder stored inside with the images and thumbnails.

    On the web.. I have uploaded the swf file and the xml file and attempted to define the exact url address to the xml file https://login.create.net/sitefiles/1...67/gallery.xml in the AS code. After some testing locally, the swf CAN load this xml document from my website storage so the url does work. But the swf file on the webpage cannot locate the file. The message: "Sorry the image data just didn't load" should only appear when the xml document cannot be loaded. I have tested this locally by renaming the xml document - and the same message appeared.


    Why do I have to wait for all the thumbnails to load? Is this due to the loading function you found? Or is this code completely taken out of a tutorial?
    The code is 100% taken from the tutorial - as far as i know you should not have to wait for the images to be loaded. this would depend on user's connection speeds to determine if an image takes time to load but a percentage bar will be displayed informing them of the progress. As mentioned before no images should be displayed because the code does not know where to locate them on my website storage.

    After glancing through the code, it looks like it loads groups of images together, instead of one image at a time. But, I don't really know for sure. Could you email me the flash file?
    Also, I have Flash CS5, so if you have Flash CS5.5, could you please downgrade it to CS5 for me.
    Exactly - the theory is the code will locate the gallery folder > then load each galleries corresponding images i.e. the large images and the correct thumbnail. I assume this is done in groups because when a gallery folder is found - a new entry is displayed on the left which a user can click on to view the image contained in that gallery.

    I also have CS5 as far as I am aware so i will attach the 'working' local copy I have.

    thanks again for your help!
    Ben.
    Last edited by ben10; 04-14-2012 at 12:30 PM.

  9. #8

    Default

    Update - i've got the gallery to display somewhow, fiddled around with the xml file url address.

    What I need to do now is link the images.

    The way the gallery works is to locate the gallery folders and popular itself with the images stored in the folders. Obviously i can't use a folder structure on the web storage.

    Looking at the code - there are 4 Arrays being used. So basically I need to modify these arrays to look for the images on the web storage. Any ideas?

    This is the function to parse the xml data:

    function parseGalleries():Void {
    if (imageGallery.firstChild.nodeName == "galleries") {
    var rootNode:XMLNode = imageGallery.firstChild;
    for (i=0; i<rootNode.childNodes.length; i++) {
    if (rootNode.childNodes[i].nodeName == "gallery") {
    currentGallery = rootNode.childNodes[i];
    imagesInGallery.push(currentGallery.childNodes.len gth);
    galleryNames.push(currentGallery.attributes.title) ;
    galleryIntros.push(currentGallery.attributes.intro );
    currentGalleryTitle = rootNode.childNodes[i].attributes.title;
    currentGalleryButton = galleryMenu_mc.buttonsHolder_mc.attachMovie("galle ry section button", "galleryButton"+i, galleryMenu_mc.buttonsHolder_mc.getNextHighestDept h());
    currentGalleryButton._x = 0;
    currentGalleryButton._y = galleryBtnVSpace*i;
    currentGalleryButton.sectionTitle_txt.text = "0"+(i+1)+" "+currentGalleryTitle.toUpperCase();
    for (j=0; j<currentGallery.childNodes.length; j++) {
    if (currentGallery.childNodes[j].nodeName == "image") {
    currentDescription = currentGallery.childNodes[j].firstChild.toString();
    descriptions.push(currentDescription);
    }
    }
    }
    }
    }
    Last edited by ben10; 04-14-2012 at 05:47 PM.

  10. #9
    Join Date
    Jun 2009
    Location
    Houston, Tx
    Posts
    581

    Default

    Hey. If you have links in your posts, they won't show up until I approve them. Go ahead and posts links, just make sure you are done with your post, or send me the link in a private message.

  11. #10
    Join Date
    Jun 2009
    Location
    Houston, Tx
    Posts
    581

    Default

    Ok. Do you have AIM? And do you think you could spend some time talking to me through it, or email?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Sponsors
Create Speaking Characters for your website and Flash movies. 15 Day Free Trial