Loading multiple images dynamically

Hello

try to load several images to the timeline of keyframes,
managed to load one, how to load several.
Here´s code:

var imageLoader:Loader;

function loadImage(url:String):void {}

imageLoader = new Loader();
imageLoader.load (new URLRequest (url));
imageLoader.contentLoaderInfo.addEventListener (Pro gressEvent.PROGRESS, imageLoading);
imageLoader.contentLoaderInfo.addEventListener (Eve nt.COMPLETE, imageLoaded);
}
loadImage("Images/pori1.jpg");

function imageLoaded(e:Event):void {}

imageArea.addChild (imageLoader);
}

function imageLoading(e:rogressEvent):void {}

}
lemonlemon is offline

Just showed the loading you code will load all the images in the table all at once, in no particular order, but the images will not be linked to any image due to them be added dynamically to the scene.  If the intention is to load an image in a particular frame of the timeline, then you must run the loading code in this framework and the charger must be added as a child of a movieclip planted manually in order to stay within the planned framework.  Otherwise, dynamically added charger has no framework to call home in the timeline panel.

Tags: Adobe Animate

Similar Questions

  • load multiple image for just the code in Html5 canvas.

    Hello, help me to solve this problem.

    I have a lot of image in the folder. and I also have a lot of video clip.

    mc_h1, mc_h2, mc_h3,..., mc_h10.

    ask.png

    It's my code.

    img = new createjs.LoadQueue();
    img.addEventListener('complete', completeHandler);
    img.loadManifest([{
      id: "h1",
      src: "images/rambut/h01.png"
    }, {
      id: "h2",
      src: "images/rambut/h02.png"
    }, {
      id: "h3",
      src: "images/rambut/h03.png"
    }, {
      id: "h4",
      src: "images/rambut/h04.png"
    }, {
      id: "h5",
      src: "images/rambut/h05.png"
    }, {
      id: "h6",
      src: "images/rambut/h06.png"
    }, {
      id: "h7",
      src: "images/rambut/h07.png"
    }, {
      id: "h8",
      src: "images/rambut/h08.png"
    }, {
      id: "h9",
      src: "images/rambut/h09.png"
    }, {
      id: "h10",
      src: "images/rambut/h10.png"
    }]);
    var h1 = this.mc_h1;
    var h2 = this.mc_h2;
    var h3 = this.mc_h3;
    var h4 = this.mc_h4;
    var h5 = this.mc_h5;
    var h6 = this.mc_h6;
    var h7 = this.mc_h7;
    var h8 = this.mc_h8;
    var h9 = this.mc_h9;
    var h10 = this.mc_h10;
    function completeHandler() {
    
    
      //add bitmaps
      var bp1 = new createjs.Bitmap(img.getResult('h1'));
      bp1.x = 0;
      bp1.y = 64/3;
      bp1.scaleX = bp1.scaleY =0.23;
      h1.addChild(bp1);
    
      var bp2 = new createjs.Bitmap(img.getResult('h2'));
      bp2.x = 0;
      bp2.y = 64/3;
      bp2.scaleX = bp2.scaleY =0.23;
      h2.addChild(bp2);
    
      var bp3 = new createjs.Bitmap(img.getResult('h3'));
      bp3.x = 0;
      bp3.y = 64/3;
      bp3.scaleX = bp3.scaleY =0.23;
      h3.addChild(bp3);
    
      var bp4 = new createjs.Bitmap(img.getResult('h4'));
      bp4.x = 0;
      bp4.y = 64/3;
      bp4.scaleX = bp4.scaleY =0.23;
      h4.addChild(bp4);
    
      var bp5 = new createjs.Bitmap(img.getResult('h5'));
      bp5.x = 0;
      bp5.y = 64/3;
      bp5.scaleX = bp5.scaleY =0.23;
      h5.addChild(bp5);
    
      var bp6 = new createjs.Bitmap(img.getResult('h6'));
      bp6.x = 0;
      bp6.y = 64/3;
      bp6.scaleX = bp6.scaleY =0.23;
      h6.addChild(bp6);
    
      var bp7 = new createjs.Bitmap(img.getResult('h7'));
      bp7.x = 0;
      bp7.y = 64/3;
      bp7.scaleX = bp7.scaleY =0.23;
      h7.addChild(bp7);
    
      var bp8 = new createjs.Bitmap(img.getResult('h8'));
      bp8.x = 0;
      bp8.y = 64/3;
      bp8.scaleX = bp8.scaleY =0.23;
      h8.addChild(bp8);
    
      var bp9 = new createjs.Bitmap(img.getResult('h9'));
      bp9.x = 0;
      bp9.y = 64/3;
      bp9.scaleX = bp9.scaleY =0.23;
      h9.addChild(bp9);
    
      var bp10 = new createjs.Bitmap(img.getResult('h10'));
      bp10.x = 0;
      bp10.y = 64/3;
      bp10.scaleX = bp10.scaleY =0.23;
      h10.addChild(bp10);
    }
    

    There are so many things by using this code.

    How to simplify this code? If I use my code, slow to load all images.

    Help...

    Well, I was hoping that if I provided 99% of the solution that would be sufficient for you to bring home, but oh well. Try this:

    _root = this;
    this.numbuts = 10;
    this.h = [];
    var i;
    var butman = [];
    for (i = 1; i <= this.numbuts; i++) {
        butman.push({ id: "h" + i, src: "images/rambut/h" + (i < 10 ? "0" : "") + i + ".png" });
        this.h[i] = this["mc_h" + i];
    }
    imgQ = new createjs.LoadQueue();
    imgQ.addEventListener("complete", completeHandler);
    imgQ.loadManifest(butman);
    
    function completeHandler() {
        var i, bp;
        for (i = 1; i <= _root.numbuts; i++) {
              bp = new createjs.Bitmap(imgQ.getResult("h" + i));
              bp.x = 0;
              bp.y = 64/3;
              bp.scaleX = bp.scaleY = 0.23;
              _root.h[i].addChild(bp);
        }
    }
    

    Note that this does NOT create a bunch of h1, h2, h3, etc., but rather a simple table h variables. You don't even really have this table since everything it stores is references to moveclips named sequentially.

  • load multiple images into workspace_images

    Hello:

    I need to download a fairly large number of image files in workspace_images. Is there a way to "upload" files in workspace_images without clicking on the button 'Create' in shared components/Images and loading one at a time?

    Thanks in advance,
    John

    In fact, there is a way, but it would take a lot of custom programming:

    1. load your images on the file system to other tables to blob temporary

    2 transfer these images on the wwv_flow_files by setting the attributes correctly

    Finally, which would require changes in the APEX_... scheme.

    The best way is to completely go away from the method of use of files from the workspace and use a normal webserver for files stored in the file system.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • How to use arrays and loops in the loading multiple Images?

    I am struggling to load a sequential array of images appear as a moving image. Therefore, when you click the load images one after another.

    The code below is what I have so far, but he is unable to do what I want, that there is only a single loading image, which is the last image in the table, then, either because the images are stacked on top of each other, either because I just don't understand not the basics...

    And I'm not clear on what you said kglad, that my solution will be more complicated because I need to preload my image sequence and then use a loop to load it?

    import flash.net.URLRequest;

    import flash.display.Loader;

    var int count = 0;

    var imageArray:Array = ["1.jpg", "2.jpg", "3.jpg", "4.jpg", "5.jpg", "6.jpg", '7.jpg',

    "8.jpg", "9.jpg", "10.jpg", "11.jpg", "12.jpg", "13.jpg"];

    for (var i: uint = 0; i < imageArray.length; i ++) {}

    var btn:YourButton = new YourButton();

    BTN. Ivar = i;

    addChild (btn);

    BTN.x = 0;

    BTN.y = 0;

    btn.addEventListener (MouseEvent.CLICK, clickF);

    }

    var ldr:Loader = new Loader();

    addChild (ldr);

    LDR.x = 20;

    LDR.y = 20;

    function clickF(e:MouseEvent) {}

    LDR. Load (new URLRequest ("D:/flash cs5.5/image_sequence/twirlSeq/"+imageArray[e.currentTarget.ivar]));

    }

    function loadComplete(e:Event) {}

    first process image loaded, then...

    Count ++;

    if(Count < imageArray.Length) {}

    loadCurrentImage();  Load next image

    } else {}

    Sequencial full load, continue to the next activity

    }

    function loadCurrentImage() {}

    LDR. Load (imageArray [Count]);

    ldr.contentLoaderInfo.addEventListener (Event.COMPLETE, loadComplete);

    }

    }

    count 2% alternates between 0 and 1 as increments count.  which allows to load in ldr0 then ldr1 and then ldr0 etc.

    in this way the scene still has an image instead of flashing white between the charges that you would see if you used a loader.

  • dynamically load multiple image

    Hello

    I am looking for a way to load image one after the other, to load my animation quickly and not waiting for the image to load

    I use:

    SYM. $('_01") .css ({'background-image': 'url ("01.jpg")', 'background-repeat': 'no-repeat'});

    SYM. $('_02") .css ({'background-image': 'url ("02.jpg")', 'background-repeat': 'no-repeat'});

    ....

    I could use a setInterval, but I want to be sure that my image is loaded before the following... is possible to do?

    Thank you

    You have an answer here: defer the loading of assets (effective management)

  • Problem saving and loading multiple images in the same file

    Hello

    I am having a problem, I have a thah program creates a fileOutputSteam and a gzipOutputSteam and finally an imageIO wrote several images, then I do the reverse process, a
    FileInputsteam and an inputsteam of gzip, imageIO.read read only image of frist, not the rest.

    Can someone help me?
    PS: Sorry for my bad English, I'm Spanish

    Code:
    class Lector {
    
        // Atributos
        private String ruta;
        private static Collection<Imagen> imagenes;
    
        /**
         * Clase que carga un fichero .zip lleno de imagenes
         * @param ruta: ruta donde se halla el fichero .zip a cargar
         */
        public Lector(String ruta) {
        }
        /**
         * Constructor sin parametros
         */
        public Lector() {
        }
        /**
         * Metodo que setea el archivo que queremos cargar
         * @param ruta: Ruta del fichero a cargar
         */
        public void setArchivo(String ruta) {
            this.ruta = ruta;
            imagenes = new ArrayList<Imagen>();
        }
    
        /**
         *
         * @param output: Lugar donde sera representada la salida de la carga de imagenes
         * @return retorna 1 si la carga fue bien y 0 si fue mal
         * @throws FileNotFoundException : excepcion por  no haber encontrado el fichero
         * @throws IOException: excepcion por no poder leer el fichero
         */
        public int cargarImagenes(JTextArea output) throws FileNotFoundException, IOException {
            ZipEntry entrada;
            int contador = 0;
            String archTemp = "temp.jpg";
            FileInputStream fis = new FileInputStream(ruta);
            ZipInputStream zis = new ZipInputStream(new BufferedInputStream(fis));
            BufferedOutputStream dest = null;
            byte[] data = new byte[9000];
    
            // Leemos secuencialmente el archivo zip
            while ((entrada = zis.getNextEntry()) != null) {
                File bufferTemporal = new File(archTemp);
                System.out.println("Archivo " + entrada.getName() + " cargado!");
                output.append("Archivo " + entrada.getName() + " cargado!\n");
                if (!entrada.isDirectory()) {
                    FileOutputStream fos = new FileOutputStream(bufferTemporal);
                    dest = new BufferedOutputStream(fos, 9000);
    
                    while ((contador = zis.read(data, 0, 9000)) != -1) {
                        dest.write(data, 0, contador);
                    }
                       //Cerramos los buffers
                    dest.flush();
                    dest.close();
                    fos.flush();
                    fos.close();
    
                    FileInputStream fin = new FileInputStream(bufferTemporal);
                    BufferedImage bi = ImageIO.read(fin);
                    //Guardamos el fichero
                    imagenes.add(new Imagen(bi, entrada.getName()));
                }
               bufferTemporal.delete();
            }
     
            // Cerramos los bufferes
    
            fis.close();
            zis.close();
    
           
    
            saveAsGzip("dato.gz");
            loadAsGzip("dato.gz");
            return 1;
        }
        /**
         * Funcion que carga la simagenes de dentro del .zip y las guarda en el objeto Imagen
         * @return retorna 1 si la carga fue exitosa
         * @throws FileNotFoundException: Excepcion por no encontrar el archivo
         * @throws IOException: Excepcion por no poder leer el archivo
         */
        public int cargarImagenes() throws FileNotFoundException, IOException {
            ZipEntry entrada;
            int contador = 0;
            String archTemp = "temp.jpg";
            FileInputStream fis = new FileInputStream(ruta);
            ZipInputStream zis = new ZipInputStream(new BufferedInputStream(fis));
            BufferedOutputStream dest = null;
            byte[] data = new byte[9000];
    
            // Leemos secuencialmente el archivo zip
            while ((entrada = zis.getNextEntry()) != null) {
                File bufferTemporal = new File(archTemp);
                System.out.println("Archivo " + entrada.getName() + " cargado!");
    
                if (!entrada.isDirectory()) {
                    FileOutputStream fos = new FileOutputStream(bufferTemporal);
                    dest = new BufferedOutputStream(fos, 9000);
    
                    while ((contador = zis.read(data, 0, 9000)) != -1) {
                        dest.write(data, 0, contador);
                    }
    
                    dest.flush();
                    dest.close();
                    fos.flush();
                    fos.close();
                    java.io.FileInputStream fin = new FileInputStream(bufferTemporal);
                    BufferedImage bi = ImageIO.read(fin);
    
                    imagenes.add(new Imagen(bi, entrada.getName()));
                }
               
            }
    
            // Cerramos los bufferes
            fis.close();
            zis.close();
    
            dest.flush();
            dest.close();
    
            
            return 1;
        }
        /**
         * Funcion que retorna el array de peliculas
         * @return retorna el array de peliculas
         */
        public Collection<Imagen> getImagenes() {
            return imagenes;
        }
        public int saveAsGzip(String pathFichero) throws FileNotFoundException, IOException{
    
            FileOutputStream fos = new FileOutputStream(new File(pathFichero));
         //GZIPOutputStream gzip = new GZIPOutputStream(fos);
            BufferedImage temp2;
            Imagen img;
    
            Iterator ite = imagenes.iterator();
            while(ite.hasNext()){
                img = (Imagen) ite.next();
                temp2=img.getBufferedImagen();
                
                boolean i= ImageIO.write(temp2, "JPEG", fos);
                System.out.println(i);
    
            }
            System.out.println();
    
            //gzip.finish();
            fos.flush();
             
            fos.close();
           
            //gzip.close();
    
            return 1;
        }
        public int loadAsGzip(String pathFichero) throws FileNotFoundException, IOException{
    
            imagenes.clear();
            
            FileInputStream fos = new FileInputStream(new File(pathFichero));
         //GZIPInputStream gzip = new GZIPInputStream(fos);
            BufferedImage img;
    
    
                for(int i=0;i<=100; i++){
                    
    
                 
                    img=ImageIO.read(fos);
    
                    
                    if (img != null){System.out.println(img);
                    imagenes.add(new Imagen(img, String.valueOf(i)));}
                       
                    
    
    
            
                }
    
    
    
    
           // gzip.close();
            fos.close();
    
            return 1;
        }
    }
    Published by: sabre150 on October 28, 2010 01:43

    Moderator action: added
     tags to source.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    805814 wrote:
    Oh, sorry again, Ii have commented on all of the code not clear in my best English and posted the image of class:

    (sigh) OK, it's an improvement, but it is not yet an NBS! I think it would take me less time to write code that is a NBS that try to explain more (perhaps an example is better here?). In all cases, your code still seems to be mixing the two Zip and GZip. I've never dealt with GZip and could not be disturbed from now just for this problem, so I focused on using the Zip classes.

    Try this code:

    import java.awt.*;
    import java.awt.image.*;
    import javax.swing.*;
    import javax.imageio.*;
    import java.util.*;
    import java.util.zip.*;
    import java.io.*;
    
    /** SSCCE that demonstrates how to:
    1) Create some random images.
    2) Store them to a Zip File.
    3) Restore them from a Zip File
    Please study the code carefully, and note how in a single Java source of less
    than 100 lines of code, it manages to achieve the entire demo.!
    @author Andrew Thompson */
    class StoreImagesAsZip {
    
        static Random random;
        static int size = 60;
    
        public static BufferedImage getRandomImage() {
            BufferedImage bi = new BufferedImage(size,size,BufferedImage.TYPE_INT_RGB);
    
            Graphics2D g = bi.createGraphics();
            GradientPaint gp = new GradientPaint(
                (float)random.nextInt(size),
                (float)random.nextInt(size),
                new Color(random.nextInt(255),random.nextInt(255),random.nextInt(255) ),
                (float)random.nextInt(size),
                (float)random.nextInt(size),
                new Color(random.nextInt(255),random.nextInt(255),random.nextInt(255) )
                );
            g.setPaint(gp);
            g.fillRect(0,0,size,size);
    
            return bi;
        }
    
        static public void writeImagesToZip(File file, BufferedImage[] images) throws Exception {
            OutputStream os = new FileOutputStream(file);
            ZipOutputStream zos = new ZipOutputStream(os);
            // Zip does nothing for otherwise compressed media formats such as JPEG and PNG
            zos.setLevel( ZipOutputStream.STORED );
    
            for (int ii=0; ii< images.length; ii++) {
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                ImageIO.write(images[ii], "png", baos);
    
                ZipEntry ze = new ZipEntry( ii + ".png" );
                zos.putNextEntry( ze );
                zos.write( baos.toByteArray() );
                zos.closeEntry();
            }
            zos.flush();
            zos.close();
        }
    
        static public BufferedImage[] readImagesFromZip(File file) throws Exception {
            ArrayList images = new ArrayList();
    
            ZipFile zipFile = new ZipFile(file);
            Enumeration en = zipFile.entries();
            while (en.hasMoreElements()) {
                ZipEntry ze = (ZipEntry)en.nextElement();
                InputStream is = zipFile.getInputStream(ze);
                BufferedImage bi = ImageIO.read(is);
                images.add(bi);
            }
    
            BufferedImage[] imageArray = new BufferedImage[images.size()];
            for (int ii=0; ii
    

    Also note that I now invested a lot of time trying to help you. If you like what I've done, the best way to show that is on the occasion of my responses as "Helpful" or "correct". If the problem is "answered", make sure that mark also.

  • How to load and place images dynamically

    I have a problem with loading images dynamically. I want to import a series of images and the display in the order across the screen. The images will have different widths, so it is important to know the width of each imported image as IM will place an image immediately to the right of the previous image. I thought that the code below would control the presentation, but the event handler seems to work (perhaps partly because the images are different sizes) not well.

    What should I do to control the positioning of the images?

    Thnks a lot.

    XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "layout ="absolute"creationComplete =" init () "> "
    < mx:Script >
    <! [CDATA]
    Mx.events import. *;
    private var imageLoader:Loader
    private var imageX:Number = 0;
    public void init (): void {}
    for (var i: int = 0; i < 4; i ++) {}
    imageLoader = new Loader();
    var url: String = "images/animal" + i + ".png";
    var urlReq:URLRequest = new URLRequest (url);
    imageLoader.load (urlReq);
    trace ("image =" + URL)
    container.addChild (imageLoader);
    imageLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, imageLoaded);
    }
    }
    public void imageLoaded(e:Event):void {}
    imageLoader.x = imageX;
    trace ("imageloader.x =" + e.Target.Width);
    imageX += e.target.width
    imageLoader.y = 100
    }
    []] >
    < / mx:Script >
    < mx:UIComponent id = "container" / >
    < / mx:Application >

    Unless I'm mistaking completely your goal, you do the way of things too hard on yourself.

    Install a HBox and addChild() to add images to that:

    (I made a few changes to make it work for me locally in order to do not copy/paste).

         
              
         
    
         
    

    In addition, you need to use the charger because it has other ways to load images, e.g., you can create a new Image, as I do above and set the source property to the path of the file, or you can embed images, but I guess that is not an option.

  • How to load images dynamically in Flash

    I have a clip on the stage I want to dynamically load images in (constantly changing), how can I get it? Thank you.

    Use the Loader class to load in images.

    Then use addChild to add the class Loader in your MovieClip on the stage.

    That & quot; constantly change & quot; What do you mean by that? You can use setInterval, ther enterFrame event or any other way to trigger a new image to load into the loader instance.

    Finally, you can use the Tween class to create some nice effects for images (fade, blur in the picture mix, masks, etc.)

  • Loading multiple external images

    Hello, I am very new to Flash cs5, and I've created invisible buttons which, once clicked will be load an image into a UILoader.

    During the test, an output error message comes up saying:

    Error #2044: Unmanaged by ioError:. Text = Error #2035: URL not found. URL: file:///E|/butcher1/images/cut0.jpg

    I thought he could have incorrect naming conventions or instance names, but I checked and I don't know that I have it straight.

    Could it have something to do with my configuration of the scenario that I have all my layers on the same line... If that makes sense?

    Should I start over?

    It really makes my head, I would be so happy to get some help on this.

    Nicky.

    It's that some of the code looks like one i have done the same for the rest of the invisible buttons

    This is what part of the code looks like in...

    cut7_btn.addEventListener (MouseEvent.CLICK, fl_MouseClickHandler_3);

    function fl_MouseClickHandler_3(event:MouseEvent):void
    {
    Start your custom code
    This code example displays the words 'mouse clicked' in the output panel.
    trace ("cut7_btn");
    probackground.iloader.source = "images/cut7.jpg";
    Complete your custom code
    }

    The stuff of error might be a revelation, unless I'm missing some behind the functioning of the scenes of CS5/AS3, any reference to "_level # ' is not AS3.  If you open the Flash of your publishing settings section, which version of actionscript you specified in the dropdown selection?  If not AS3. ensure.

  • AS3 load external image and add multiple instances in Member States

    Hello

    Is it possible to load an external image and add it to more of a clip?

    Thank you

    Chris McLaughlin

    You can load several times, or you can use the bitmapdata class to make copies of the loaded bitmap image.

  • Download multiple Images

    Hello
    The answer to this question is probably sitting right in front of me, but I can't understand this. It is a page of loading image that downloads multiple images to my SQL db. (I'm using CF 7.0) I have a form called "pick.cfm" that the user enters the number of images to download. This page also sets the #cookie.micro # in the code referenced below. #cookie.micro # is the number of images to download.

    The problem is, if I upload two images, for example, named "abc.jpg" and "def.jpg" the file names are inserted into the database as "abc.jpg" (correct) and 'abc1.jpg (not good).

    It is of the form:

    < action = "testingform_action.cfm cfform" enctype = "multipart/form-data" method = "post" > "


    < cfset numberoffields = #cookie.micro # >



    < cfloop index "i" = to = "#variables.numberoffields # '1' = ' step '1' = >"
    < cfset filename2 = "form.file" >
    < cfinput type = "File" name = "micro" value = "#variables.filename2 #" / > < br / >


    < / cfloop >


    < cfinput type = "Submit" name = "upload" value = "upload" >

    < / cfform >



    It's the action page:


    < cfloop index "i" = to = "#cookie.micro # '1' = ' step '1' = >"

    < cffile destination = "d:\Inetpub\wwwroot\pulse\pathology\pia\images\".
    action = "upload".
    accept = "" image / * ""
    nameconflict = "makeunique".
    FileField = "micro" >




    < cfquery datasource = "pathimage" name = "insertimage" >
    Insert into images (filename) VALUES ('#file.) ServerFile #')
    < / cfquery >



    < / cfloop >


    What is the cause? I'm sure that it's simple, but I can't understand. ANY advice you could give would be so appreciated!

    Alison

    I guess that its because all file fields all have the same name. Try to name them dynamically: micro1, micro2, Inc.3, etc..

    A few minor comments on the code

    -As far as I know, if the VALUE has no effect to the input fields when type = "file".
    -FILE is obsolete. Use CFFILE. ServerFile instead
    -You don't need signs # here

    Not tested

  • lazy loading of Images

    Hello friends,

    I need a better way to download multiple list field images, an ImageDownloaderThread with http connection, I've implemented, it works well, but its speed is slow because it downloads images one by one,

    How do I upload multiple images at once.

    I need to maximize the use of facilities provided by blackberry.

    Thanks in advance.

    Thank you peter_strange,

    Thanks for your quick response,

    but I test this using more 5 wires at the same time the speed is increased, but I need to know is possible to download images of standard server.

    As we first determine on the components shown and just download images for as android/iphone applications.

    Have you considered preloading of these images or maybe by uploading them once and recording on SD card?

    I can't store them in the SD card because they are dynamic and large quantity. But thanks for the suggestions.

    OK I will optimize my thread to create several instances.

  • How to load an image from a URL cascading

    I am trying to load an image from a URL, but it could not be shown. The source code is as below:

    ImageView {}
    imageSource: "https://developer.blackberry.com/cascades/files/reference/images/image_carl_larsson_1898.png."
    }

    If waterfall doesn't support loading image URL, is there an ordinary or simple to dynamically load the image of the url in C++?

    Thank you

    Have a look here:

    https://github.com/BlackBerry/Cascades-samples/tree/master/TLDR

  • load the image on mouseover after that page is shown

    Hi guys, I have a slideshow with 30 images and he loading images until you see the page but there are quantity 6-7 seconds... is there a method to load only a thumbnail and display the page and when I click or mouse over the thumbnail dynamically load the image... I think it can be done to change the src of the image...

    I solved with this code

    ($(sym.lookupSelector ('container')) .css ("background-image', ' url(images/ALBUM_01/album1_20.jpg)');

  • Load external images and video on board

    Hello.

    I'm looking into the edge instead of flash.

    My question is how to load you external images and videos from an external server?

    To clarify, I need to insert a link where the images can be recharged on the stage, while they don t meet the final weight.

    Thanks in advance.

    Best,

    Stig.

    I have provided the above solution works if you have the images in your publication and if you want to form load images from another server rather than the relative location of your html file.

    Now if you want to load images dynamically in a rectagle container you will have to code.

    Here is an example for this

    Create a "rectangle" name "Rectagle.

    Add the code snippet in the composition of the ready or other actions user based on your requirement

    "" var myImagetag = 'http://wwwimages.adobe.com/include/style/default/SiteHeader/logo-2x.png ">"

    SYM.$("rectangle"). Append (myImagetag);

Maybe you are looking for