A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: loading images from a database

  1. #1
    Senior Member
    Join Date
    Mar 2003
    Location
    New Orleans
    Posts
    191

    loading images from a database

    How do I load images from a database?

    Or actually from a folder.

    I have created a Flash nav that shows images. See: http://www.robertbrunogallery/robertbrunogallery5

    I want to be able to load these images dynamically.

    thanks
    I'm only in it for the pleasure

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Link did not work for me.

    However, make a movieclip, give it a instance name of container.

    Load a jpg from the folder with...

    container.loadMovie("folder/myImage.jpg");


    ...and it will load into the movieclip. As a movieclip can only hold one jpg or swf at the time, loading a new one will replace the current image.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  3. #3
    Senior Member
    Join Date
    Mar 2003
    Location
    New Orleans
    Posts
    191

    thanks pellepiano but . . .

    here's the link: http://robertbrunogallery.com/robertbrunogallery5/

    I have an mc with 12 frames, with a stop command on each frame, and an image on each frame.

    So if I can't load an image into keyframes on an mc, what would you suggest as a work around?

    thanks again
    I'm only in it for the pleasure

  4. #4
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Why do you need 12 keyframes. Why cant each button load its image into a empty movieclip?

    But if what you are after to load ALL images at once, you can have your movieclip with an additional 12 movieclips inside that you load the images into. Then just make the individual movieclips visible or invisible when you mouse over the buttons.


    The reason why you can not use several frames is that you can only load into movieclips that are present in the timeline.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center