dcsimg
A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Image Loader

  1. #1
    Junior Member
    Join Date
    Feb 2003
    Posts
    11

    Image Loader

    I have a webpage and i want to load about 100 images on to it with clickable buttons at the bottom i have tried to do but i can't just seem to do it

  2. #2
    Polak Maly ant_Z's Avatar
    Join Date
    Jul 2006
    Location
    Poland
    Posts
    440
    You want to have them in flash? It can be unbelivably easy made with PHP... only couple lines of code... that would automaticly detect files, so you wouldnt have to enter their names.

  3. #3
    Relaxing tmoore935's Avatar
    Join Date
    Oct 2001
    Location
    colorado, usa
    Posts
    1,713
    http://www.diversioncentral.com/iceland/pall.html

    not sure of what you want but i made this with the koolmoves image and it was incredibly easy. It was just using the wizards and then slide show.
    Any programming language is at its best before it is implemented and used.

  4. #4
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    You can also have PHP get the list from a directory and pass that to flash and let flash make the movies with createEmptyMovieClip and load them in. Or use flash to just read a text or XML file that provides the information.

  5. #5
    Relaxing tmoore935's Avatar
    Join Date
    Oct 2001
    Location
    colorado, usa
    Posts
    1,713
    What is the flash 8 way of loading a jpg? I mean I can use dynamic text to load a file written from a txt file so that when I update, I change only the text file in notepad. How can this be done with jpg, gif's and not php?
    Any programming language is at its best before it is implemented and used.

  6. #6
    That web bloke Stoke Laurie's Avatar
    Join Date
    Jan 2006
    Location
    England
    Posts
    869
    var Today=new Date();
    var ThisDay=Today.getDate();
    loadVariables(Thisday+".txt?" + getTimer(), _root);
    mc1.loadMovie("Thisday+".jpg");

    Above is a simple way to load a text file and a picture from a selection of 31 pre-named files based on the day of the month.(I use this to produce a different illustration and text for a project to give the illusion of updated content)

    In the same way the variable could be a randomly generated number to select a file from a selection, or the text file loaded in line 3 could contain the name of the file to be selected in line 4.

    By the way the + getTimer(), _root is to bypass the cache and force fresh loading of the text file.

    Don't know if this helps

  7. #7
    Senior Member
    Join Date
    Mar 2004
    Location
    Upper Marlboro, MD
    Posts
    146

    image loader needed

    Quote Originally Posted by ant_Z View Post
    You want to have them in flash? It can be unbelivably easy made with PHP... only couple lines of code... that would automaticly detect files, so you wouldnt have to enter their names.
    I am trying to achieve this exact scenario. I cant find any tutorials on it. can you point me in the right direction please.

  8. #8
    Polak Maly ant_Z's Avatar
    Join Date
    Jul 2006
    Location
    Poland
    Posts
    440
    Actually you can do that in Flash if you have file naming scheme.

    Something around

    for(i = 0; i<100; i++){
    load("name"+i+".jpg");
    }


    In php you need to scan the directory, like this, http://www.liamdelahunty.com/tips/ph..._directory.php but make the output in XML format and use XML classes in flash.

  9. #9
    Senior Member
    Join Date
    Mar 2004
    Location
    Upper Marlboro, MD
    Posts
    146

    Load images dynamically

    Quote Originally Posted by blanius View Post
    You can also have PHP get the list from a directory and pass that to flash and let flash make the movies with createEmptyMovieClip and load them in. Or use flash to just read a text or XML file that provides the information.
    Hi Blanius,

    I have a php script that does what you're talking about. However, I don't know how to incorporate that with my koolmoves movie.

    I want to be able to run that script, that will create an XML file and thenl I want to load the images into my movie. How does that work? I don't know where to put the code in AS that will execute the PHP and then load the images.

  10. #10
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Perhaps you could look at http://koolexchange.com

    Look in the "fun with backends" and look at the code example called
    "TwistedLister" or "snakeshow"

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