Simple image gallery with Flex and PHP

August 3rd, 2008 by hendra

Pictures demo screenshot

Here you go as a promise to a friend to have this uploaded this weekend. I’ve included the source code. Just do the right click and choose View Source on the demo or click here.

Here are some notes for navigating the demo:

  1. To create, rename or delete category use the button on the top of the screen.
  2. To view the content of the category, click the category name.
  3. To delete the picture(s), drag and drop them to the bar at the bottom of the screen.
  4. To assign the picture(s), drag and drop them to one of the listed category on the first container. By default dropping the picture(s) will move the picture(s) to different category. To copy them to different category, hold control (ctrl) key while dropping the picture(s).
  5. To upload your picture(s), click the “Upload Picture(s)” button. It will redirect you to the demo of my previous post. I have not put a link back to this demo from the uploader, so you can just press the browser’s back button :D
  6. To view a larger picture, double click the thumbnail

The code is still kind of messy and I don’t have time to refactore them (If any of you guys can do it, please do and let me know :) ). The main purpose of this app is just a playground for me for learning stuff. Within this app I am using:

  1. Flex
  2. PHP
  3. AMFPHP – to communicate between Flex and PHP
  4. flexlib – Google Code – for the flowbox as the categories container
  5. MySql – to store the images and categories data
  6. Misc stuff I took from here and there

Anyway, I’ve included everything (including the sql script to create the database). Feel free to use it and if you have any question feel free to shoot it. Have fun.

PS: I might miss some of the source files (unlikely). If I did, please let me know.

11 Responses to “Simple image gallery with Flex and PHP”

  1. Multiple File Upload with Flex and PHP | Just Starting Says:

    [...] to save the uploaded images in the database. I need it for collecting sample pictures of my other demo. If you want to delete your upload, go here and you will find it under “Not [...]

  2. Nuk Says:

    Thanks, Just Starting. I have been looking for a ‘tag cloud” code for quite sometimes. Very useful.

  3. Wout Says:

    Hello,
    I like to try the image gallery with php but the source is not complete.
    Thanks anyway.
    Greetings, Wout from the Netherlands

  4. hendra Says:

    Try this one. Please do let me know if I am still missing some files.

  5. ittek Says:

    Hi,

    Is there any way you can share the source code for the simple image gallery.. the links above seem to be pointing to the multiple image uploader app. Thx.

  6. hendra Says:

    Ittek, thanks for letting me know that. I updated the link above. Let me know again if I still miss something.

  7. Viceman Says:

    Hi,

    thanks, this is a great example. Iam new in flex and trying understand everything. Is it possible to get the SQL textfile to recreate the database, because it isn“t in the Zip Folder. Thanks and greeting from Germany.

  8. hendra Says:

    Hi Viceman. Thanks for the compliment :) The SQL text file is in the source file now named dbscript.txt.

  9. Silvio Says:

    Thanx for sharing. Try to run it on my machine, but i have the following error:

    [FaultEvent fault=[RPC Fault faultString="Send failed"
    faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed
    error NetConnection.Call.Failed: HTTP: Failed: url: 'http://localhost/pictures/amfserve.php'"]
    messageId=”AC5FF064-6E57-49DB-38A7-91DBF0F78485″ type=”fault”
    bubbles=false cancelable=true eventPhase=2]

    Any help? Thank you in advance

  10. brijmohan Says:

    hi

    I am very impressed your sample code, i want to integrated for my self to learning ,i got 3 3 problems in the code :

    Could not resolve to a component implementation.
    Could not resolve
    to a component implementation.

    Can u tell me resolve the problem.

    Thanks
    brij

  11. Websites tagged "flex" on Postsaver Says:

    [...] – Simple image gallery with Flex and PHP saved by guchen2009-07-14 – Colorado Corn Celebrates E85 Openings saved by inu450002009-07-12 – [...]

Leave a Reply

Please leave these two fields as-is: