Image load problem

i have a problem...
i have a list of images in the home page and the images are
fetched from the database.
when i browse the site, if i click a menu item(which changes
the state.) before all the images have been loaded, it creates a
problem: it goes back to the previous(home page) state and shows
all the images, another menu item being highlited.
please somebody suggest what to do for avoiding this.

i solved it down myself.
what i went wrong is i changed the state in result handler of
http service call.

Similar Messages

  • Question about image loading problem

    Dear Java Gurus,
    I am writing a simple Java Applet application. Basically what it does is every 3 seconds, it tries to get an image from a server and display it (also based on the browser�s client size to do some resize of the image to fit the width of the browser�s client area). But frequently I got this kind of exceptions:
    ----------------------------- Exception 1 --------------------------------------
    Uncaught error fetching image:
    java.lang.ArrayIndexOutOfBoundsException
    at java.lang.System.arraycopy(Native Method)
    at sun.awt.image.PNGFilterInputStream.read(Unknown Source)
    at java.util.zip.InflaterInputStream.fill(Unknown Source)
    at java.util.zip.InflaterInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at sun.awt.image.PNGImageDecoder.produceImage(Unknown Source)
    at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
    at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
    at sun.awt.image.ImageFetcher.run(Unknown Source)
    ----------------------------- Exception 2 ------------------------------------------
    sun.awt.image.PNGImageDecoder$PNGException: crc corruption
    at sun.awt.image.PNGImageDecoder.getChunk(Unknown Source)
    at sun.awt.image.PNGImageDecoder.getData(Unknown Source)
    at sun.awt.image.PNGFilterInputStream.read(Unknown Source)
    at java.util.zip.InflaterInputStream.fill(Unknown Source)
    at java.util.zip.InflaterInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at sun.awt.image.PNGImageDecoder.produceImage(Unknown Source)
    at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
    at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
    at sun.awt.image.ImageFetcher.run(Unknown Source)
    Which will cause the image goes to blank in the browser and also degreed down the performance, and I do not know where they are coming from. I tried to put try-catch blocks at possible method calls, but still it does not catch these kind exceptions.
    ---------------------------- My Source Code ----------------------------
    import java.io.*;
    import java.awt.*;
    import java.net.*;
    import java.util.*;
    import java.applet.*;
    import javax.swing.*;
    import java.awt.event.*;
    // This is for Popup Menu
    class PopupListener extends MouseAdapter
    JPopupMenu popup;
    PopupListener(JPopupMenu popupMenu)
    popup = popupMenu;
    public void mousePressed(MouseEvent e)
    maybeShowPopup(e);
    public void mouseClicked(MouseEvent e)
    maybeShowPopup(e);
    public void mouseReleased(MouseEvent e)
    maybeShowPopup(e);
    private void maybeShowPopup(MouseEvent e)
    if (e.isPopupTrigger())
    popup.show(e.getComponent(), e.getX(), e.getY());
    // Image Component who contains the image and will be hosted in the ScrollPane
    class ImageComponent extends JComponent
    Image onscrImage;
    Dimension comSize;
    ImageComponent(Image image)
    onscrImage = image;
    setDoubleBuffered(true);
    comSize = new Dimension(onscrImage.getWidth(null), onscrImage.getHeight(null));
    setSize(comSize);
    public synchronized void paint(Graphics g)
    super.paint(g);
    g.drawImage(onscrImage, 0, 0, this);
    public Dimension getPreferredSize()
    return comSize;
    // Update the image with new image
    public void setImage(Image img)
    onscrImage = img;
    comSize = new Dimension(onscrImage.getWidth(null), onscrImage.getHeight(null));
    setSize(comSize);
    // The main Applet hosted in the browser
    public class MWRemotingApplet extends JApplet
    //Media Tracker to manage the Image loading
    MediaTracker medTracker;
    Image my_Image;
    // ScollPane who contains the image component
    JScrollPane scrollPane;
    ImageComponent imgComp;
    // The applet base URL and image filename passed from htm who hosted the Applet
    URL base;
    String filename;
    // Schedules getting the image
    private java.util.Timer timer;
    private int delay = 3000;
    private boolean bFitToBrowser = false;
    private int iVScrollbarWidth = 20;
    // Popup Menu
    JPopupMenu jPopupMenu;
    JMenuItem popupMenuItem;
    public void init()
    // Set the layout to GridLayout then the it can fill in the Applet
    setLayout(new GridLayout());
    try
    // getDocumentbase gets the applet path.
    base = getCodeBase();
    // Get the image file name from the parameter
    filename = getParameter("filename");
    catch (Exception e)
    JOptionPane.showMessageDialog(null, "Failed to get the path and filename of the image!", "Message", 0);
    return;
    // Create the Media Tracker
    medTracker = new MediaTracker(this);
    // Download the image from the remote server
    // If the image width is greater than the width of the current browser client area
    // Resize the image to fit the width
    // This is because for some reason, this will lead to image not refreshing
    DownloadImage();
    //Add the popup menu
    jPopupMenu = new JPopupMenu();
    popupMenuItem = new JMenuItem("Fit to Browser");
    popupMenuItem.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent event) {
    bFitToBrowser = !bFitToBrowser;
    if(bFitToBrowser)
    popupMenuItem.setText("Original Size");
    FitToBrowser();
    else
    popupMenuItem.setText("Fit to Browser");
    DownloadImage();
    if(my_Image != null)
    imgComp.setImage(my_Image);
    jPopupMenu.add(popupMenuItem);
    // Create the image component
    imgComp = new ImageComponent(my_Image);
    //Add listener to the image component so the popup menu can come up.
    MouseListener popupListener = new PopupListener(jPopupMenu);
    imgComp.addMouseListener(popupListener);
    // Create the scroll pane
    scrollPane = new JScrollPane(imgComp);
    scrollPane.setDoubleBuffered(true);
    // Catch the resize event of the Applet
    addComponentListener(new ComponentAdapter()
    public void componentResized(ComponentEvent e)
    super.componentResized(e);
    if(bFitToBrowser)
    FitToBrowser();
    else
    DownloadImage();
    if(my_Image != null)
    imgComp.setImage(my_Image);
    //Add Components to the Applet.
    add("Center", scrollPane);
    validate();
    // Start the timer to periodically download image
    // from remote server
    public void start()
    timer = new java.util.Timer();
    timer.schedule(new TimerTask()
    //creates a timertask to schedule
    // overrides the run method to provide functionality
    public void run()
    DownloadImage();
    if(my_Image != null)
    imgComp.setImage(my_Image);
    , 0, delay);
    public void stop()
    timer.cancel(); //stops the timer
    public synchronized void DownloadImage()
    if(my_Image != null)
    my_Image.flush();
    my_Image = null;
    try
    my_Image = getImage(base, filename);
    catch (Exception e)
    my_Image = null;
    return;
    medTracker.addImage( my_Image, 0 );
    try
    medTracker.waitForAll();
    if ( my_Image != null )
    medTracker.removeImage(my_Image);
    catch (InterruptedException e)
    JOptionPane.showMessageDialog(null, "waitForAll failed while downloading the image!", "Message", 0);
    catch(Exception e1)
    System.out.println("Get Exception = " + e1.getMessage());
    e1.printStackTrace();
    if(bFitToBrowser)
    FitToBrowser();
    else if(my_Image.getWidth(null) > this.getSize().width)
    FitToWidth();
    // Resize the image to fit the browser width and height
    public synchronized void FitToBrowser()
    if(my_Image != null)
    my_Image = my_Image.getScaledInstance(this.getSize().width - 5, this.getSize().height - 5, java.awt.Image.SCALE_SMOOTH);//java.awt.Image.SCALE_AREA_AVERAGING);//java.awt.Image.SCALE_SMOOTH);
    medTracker.addImage( my_Image, 0 );
    try
    medTracker.waitForAll();
    medTracker.removeImage(my_Image);
    catch (InterruptedException e)
    JOptionPane.showMessageDialog(null, "waitForAll failed!", "Message", 0);
    catch (Exception e1)
    System.out.println("Get Exception = " + e1.getMessage());
    e1.printStackTrace();
    // Resize the image to fit the browser width only
    public synchronized void FitToWidth()
    if(my_Image != null)
    int fitHeight = (int)((this.getSize().width - iVScrollbarWidth)*(my_Image.getHeight(null)+0.0)/my_Image.getWidth(null));
    my_Image = my_Image.getScaledInstance(this.getSize().width - iVScrollbarWidth, fitHeight, java.awt.Image.SCALE_SMOOTH);
    medTracker.addImage( my_Image, 0 );
    try
    medTracker.waitForAll();
    medTracker.removeImage(my_Image);
    catch (InterruptedException e)
    JOptionPane.showMessageDialog(null, "waitForAll failed!", "Message", 0);
    catch (Exception e1)
    System.out.println("Get Exception = " + e1.getMessage());
    e1.printStackTrace();
    }

    [url http://forum.java.sun.com/thread.jsp?thread=518979&forum=14]Please[url http://forum.java.sun.com/thread.jsp?thread=518977&forum=32] do[url http://forum.java.sun.com/thread.jsp?thread=518973&forum=37] not[url http://forum.java.sun.com/thread.jsp?thread=518978&forum=42] crosspost. Or [url http://forum.java.sun.com/thread.jsp?forum=7&thread=518976]double-post. Or post to the wrong forum. Or use non-sense subject.

  • Bizarre image load problem in InDesign CS2

    Hi, I am having a problem with bringing in some images into InDesign CS2. I have a document file that has many images in place, and I just received some new images that are screenshots from video. They are saved as rgb jpgs. They are 2700x1963 pixels and 300dpi (so someone obviously did some conversion from screen res.)
    When I try to bring them into an image box in InDesign, I do command D, then select the image. It acts like its loading it but then nothing is in the box. I thought perhaps the image was just hidden outside of the edge of the box but when I go to "fitting" under the "OBJECT" menu, all the options are greyed out as if there is no image there. It also shows no image linked in the links panel.
    I tried opening in photoshop and resaving, and also tried resaving as another name. I tried changing it to cmyk and adjusting the levels and resaving as tif. I tried making a new photoshop file and copy-and=pasting the image into it and saving. Still, no image will load in the image box.
    I feel like the images must have corrupted since they were sent to me as email attachments, but its so odd that they open in photoshop just fine. Any ideas?

    nevermind, people.
    my computer was having memory overload. on a whim I restarted the computer.
    BAM...no issue.
    You know what they always say, "When all else fails, restart your computer!"

  • CSS Image loading problem by dynamically loading from fxml file?

    h1. Introduction
    The application I am developing loads an FXML file from a Controller. The FXML uses CSS and images for buttons are set in the CSS.
    CSS directory structure
    <package>.fxml
    Images
    <package>.fxml.resources.<subdir>
    Example CSS Code
    .buttonImage {
        -fx-background-image: url("resources/subdir/image.png");
    }Example loading fxml from controller code
             URL location = getClass().getResource("/package/fxml/UI.fxml");
             FXMLLoader fxmlLoader = new FXMLLoader(location);
             fxmlLoader.setLocation(location);
             fxmlLoader.setBuilderFactory(new JavaFXBuilderFactory());
             Parent root = (Parent)fxmlLoader.load(location.openStream());
             Controller = (Controller) fxmlLoader.getController();
             newPane.getChildren().add(root);h1. Problem
    The fxml file does not load and causes the following error:
    javafx.fxml.LoadException: Page language not specified.Note, the fxml file loaded correctly before images were added.
    Any ideas of what might be going wrong?
    h1. Attempted
    I have attempted the following: tried changing the url of the image as an absolute path.

    No Problem: Note, this is the actual FXML, my previous examples were simplifications of package names and class names in order to directly illustrate the problem. Note, I am using SceneBuilder to develop the FXML file.
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import java.net.*?>
    <?import java.util.*?>
    <?import javafx.collections.*?>
    <?import javafx.scene.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.*?>
    <?import javafx.scene.text.*?>
    <AnchorPane id="AnchorPane" prefHeight="396.0000999999975" prefWidth="350.0" styleClass="mainFxmlClass" xmlns:fx="http://javafx.com/fxml" fx:controller="com.monkygames.kbmaster.controller.ProfileUIController">
      <children>
        <Label layoutX="14.0" layoutY="14.0" text="Profiles">
          <font>
            <Font size="18.0" />
          </font>
        </Label>
        <GridPane layoutX="15.0" layoutY="44.0" prefHeight="99.0" prefWidth="335.0">
          <children>
            <Label text="Type: " GridPane.columnIndex="0" GridPane.rowIndex="0" />
            <ComboBox fx:id="typeCB" prefWidth="249.0" GridPane.columnIndex="1" GridPane.rowIndex="0">
              <items>
                <FXCollections fx:factory="observableArrayList">
                  <String fx:value="Item 1" />
                  <String fx:value="Item 2" />
                  <String fx:value="Item 3" />
                </FXCollections>
              </items>
            </ComboBox>
            <Label text="Program: " GridPane.columnIndex="0" GridPane.rowIndex="1" />
            <ComboBox fx:id="programCB" prefWidth="249.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
              <items>
                <FXCollections fx:factory="observableArrayList">
                  <String fx:value="Item 1" />
                  <String fx:value="Item 2" />
                  <String fx:value="Item 3" />
                </FXCollections>
              </items>
            </ComboBox>
            <Label text="Profile: " GridPane.columnIndex="0" GridPane.rowIndex="2" />
            <ComboBox prefWidth="249.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
              <items>
                <FXCollections fx:factory="observableArrayList">
                  <String fx:value="Item 1" />
                  <String fx:value="Item 2" />
                  <String fx:value="Item 3" />
                </FXCollections>
              </items>
            </ComboBox>
          </children>
          <columnConstraints>
            <ColumnConstraints fillWidth="false" halignment="RIGHT" hgrow="NEVER" maxWidth="-Infinity" minWidth="10.0" prefWidth="80.0" />
            <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
          </columnConstraints>
          <rowConstraints>
            <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
            <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
            <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
          </rowConstraints>
        </GridPane>
        <HBox layoutX="14.0" layoutY="150.0" prefHeight="159.0" prefWidth="335.0">
          <children>
            <Label text="Description: " />
            <TextArea prefHeight="172.0" prefWidth="247.0" wrapText="true" />
          </children>
        </HBox>
        <HBox alignment="CENTER" layoutX="11.0" layoutY="334.0" prefHeight="48.0" prefWidth="329.0">
          <children>
            <Button fx:id="newProfileB" contentDisplay="GRAPHIC_ONLY" minHeight="48.0" minWidth="48.0" mnemonicParsing="false" onAction="profileEventFired" prefHeight="48.0" prefWidth="48.0" styleClass="newProfile" text="New Profile" />
            <Button id="newProfileB" fx:id="cloneProfileB" contentDisplay="GRAPHIC_ONLY" minHeight="48.0" minWidth="48.0" mnemonicParsing="false" onAction="profileEventFired" prefHeight="48.0" prefWidth="48.0" styleClass="cloneProfile" text="Clone Profile" />
            <Button id="newProfileB" fx:id="importProfileB" contentDisplay="GRAPHIC_ONLY" minHeight="48.0" minWidth="48.0" mnemonicParsing="false" onAction="profileEventFired" prefHeight="48.0" prefWidth="48.0" styleClass="importProfile" text="Import Profile" />
            <Button id="newProfileB" fx:id="exportProfileB" contentDisplay="GRAPHIC_ONLY" minHeight="48.0" minWidth="48.0" mnemonicParsing="false" onAction="profileEventFired" prefHeight="48.0" prefWidth="48.0" styleClass="exportProfile" text="Export Profile" />
            <Button id="newProfileB" fx:id="printPDFB" contentDisplay="GRAPHIC_ONLY" minHeight="48.0" minWidth="48.0" mnemonicParsing="false" onAction="profileEventFired" prefHeight="48.0" prefWidth="48.0" styleClass="pdfProfile" text="Print to PDF" />
            <Button id="newProfileB" fx:id="deleteProfileB" contentDisplay="GRAPHIC_ONLY" minHeight="48.0" minWidth="48.0" mnemonicParsing="false" onAction="profileEventFired" prefHeight="48.0" prefWidth="48.0" styleClass="deleteProfile" text="Delete Profile" />
          </children>
        </HBox>
      </children>
      <stylesheets>
        <URL value="@master.css" />
        <URL value="@profile.css" />
      </stylesheets>
    </AnchorPane>Edited by: 960799 on Jan 4, 2013 8:58 PM
    Edited by: 960799 on Jan 4, 2013 8:59 PM

  • Image loading problem in OS X browsers

    This is a really perplexing.
    When I'm surfing around, Safari refuses to load some images on pages. It happens randomly but most reliably on MySpace.
    Here's what I typically see on a user's MySpace page...
    http://img198.imageshack.us/my.php?image=ss0zv.png
    Safari states in its activity window for the two blue question marks that it "can't connect to host".
    If I cut and paste the URLs in question to Mozilla or Firefox, I get the same "cannot connect to host" messages.
    However, if I were to open the same profile on my Windows PC, all browsers, here at work it shows just up fine.
    In fact here's a link of one of those pics which doesn't show for me using any browser on my Mac.
    http://myspace-421.vo.llnwd.net/00677/12/41/677381421_m.jpg
    Safari's full bomb on the naked URL is:
    "Safari can't open the page http://myspace-421.vo.llnwd.net/00677/12/41/677381421_m.jpg because it could not connect to the server myspace-421.vo.llnwd.net"
    Thanks in advance for your help.

    You are welcome.
    BTW, is it just MySpace you are having problems with? If so, the way their pages are coded may be the cause of problems with non-Windows browsers.
    In Safari, you can always go to Safari > Report Bugs to Apple when you are on a misbehaving page to report the problem. Clicking on "More Options" will allow you to attach page source code and/or a screenshot (you will not get an acknowledgment, but they do look at all bug reports).

  • Image loading problem in all OS X browsers

    This is a really perplexing.
    When I'm surfing around, Safari refuses to load some images on pages. It happens randomly but most reliably on MySpace.
    Here's what I typically see on a user's MySpace page...
    http://img198.imageshack.us/my.php?image=ss0zv.png
    Safari states in its activity window for the two blue question marks that it "can't connect to host".
    If I cut and paste the URLs in question to Mozilla, Firefox or IE, I get the same "cannot connect to host" messages.
    However, if I were to open the same profile on my Windows PC, all browsers, here at work it shows just up fine.
    In fact here's a link of one of those pics which doesn't show for me using any browser on my Mac.
    http://myspace-421.vo.llnwd.net/00677/12/41/677381421_m.jpg
    Safari's full bomb on the naked URL is:
    "Safari can't open the page http://myspace-421.vo.llnwd.net/00677/12/41/677381421_m.jpg because it could not connect to the server myspace-421.vo.llnwd.net"
    It has to be an OS issue if it's a problem across all browsers right?
    I'm really stumped at this one and would be appreciative if anyone has any ideas.
    Thanks in advance for your help.
    PowerBook G4   Mac OS X (10.4.6)  

    You are welcome.
    BTW, is it just MySpace you are having problems with? If so, the way their pages are coded may be the cause of problems with non-Windows browsers.
    In Safari, you can always go to Safari > Report Bugs to Apple when you are on a misbehaving page to report the problem. Clicking on "More Options" will allow you to attach page source code and/or a screenshot (you will not get an acknowledgment, but they do look at all bug reports).

  • Image loading problem with weblogic security page

    I developed an j2ee application on tomcat server. After successful working in tomcat I migrated to weblogic server.
    So problem is the application is working properly with out security in weblogic. Later security is added to the application, then the back ground images are not loading in .jsp pages. Please suggest me what i have to follow to display back ground images in the .jsp pages. I was unable to find solution.
    Thanks
    Ananda

    Hi,
    There is a BADI (TRIP_IMP_EXP) that can help you to restrict trip amount by set delimit date.
    Use RESTRICT_TRAVEL_RANGE method ot do this.
    BR, Jurijs

  • Image loading problem

    I've been having a problem with my app that is designed to take an image, scale it into 3 different sizes and then save it.
    The problem seems to be that the image doesn't load correctly as when I look at the width and height of it, they come back as -1. I've tried both:
    try
                image = ImageIO.read(new File(url));
            catch(IOException e)
                e.printStackTrace();
                throw new RuntimeException("Error loading file: " + url);
            }and
    image = Toolkit.getDefaultToolkit().getImage(url);my code at present looks like this:
    package resizeImage;
    import com.sun.image.codec.jpeg.*;
    import javax.imageio.*;
    import java.awt.image.*;
    import java.awt.*;
    import java.io.*;
    import javax.swing.ImageIcon;
    public class resizeImage
        public BufferedImage convert(Image im)
            BufferedImage bi = new BufferedImage(im.getWidth(null),im.getHeight(null),BufferedImage.TYPE_INT_RGB);
            Graphics bg = bi.getGraphics();
            bg.drawImage(im, 0, 0, null);
            bg.dispose();
            return bi;
        public String resize(String url, String id)
            // Try and load image -------------------------------------------------
            this.url = "hobbes.jpg";
            this.id = "1";
            try
                image = ImageIO.read(new File(url));
            catch(IOException e)
                e.printStackTrace();
                throw new RuntimeException("Error loading file: " + url);
            //image = Toolkit.getDefaultToolkit().getImage(url);
            //BufferedImage temp = convert(image);
            int temp1 = image.getWidth(null);
            int temp2 = image.getHeight(null);
            return ("Width = "+temp1+"\tHeight = "+temp2);
    ...

    Your code loaded an image okay. It could be that the image you are trying to load has
    corrupted data. Using the 'getResource' method simplifies the process of making up urls.
    The Swing tutorial page "How to Use ImageIcons" has a discussion on its use. If you use
    the Toolkit 'getImage' methods be sure to use a MediaTracker to load the image since these
    methods return immediately. The MediaTracker api has demo code.
    import com.sun.image.codec.jpeg.*;
    import javax.imageio.*;
    import java.awt.image.*;
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    import javax.swing.ImageIcon;
    public class ImageLoading
        public BufferedImage convert(Image im)
            BufferedImage bi = new BufferedImage(im.getWidth(null),
                                                 im.getHeight(null),
                                                 BufferedImage.TYPE_INT_RGB);
            Graphics bg = bi.getGraphics();
            bg.drawImage(im, 0, 0, null);
            bg.dispose();
            return bi;
        public String resize(String path, String id)
            BufferedImage image = null;
            try
                URL url = getClass().getResource(path);
                image = ImageIO.read(url);
            catch(MalformedURLException mue)
                System.err.println("mue for : " + path + " = " + mue.getMessage());
            catch(IOException e)
                e.printStackTrace();
                throw new RuntimeException("Error loading file: " + path);
            int imageWidth  = image.getWidth(null);
            int imageHeight = image.getHeight(null);
            BufferedImage bi = convert(image);
            int biWidth  = bi.getWidth();
            int biHeight = bi.getHeight();
            return ("imageWidth = " + imageWidth + "\timageHeight = " + imageHeight + "\n" +
                    "biWidth    = " + biWidth +    "\tbiHeight    = " + biHeight);
        public static void main(String[] args)
            ImageLoading test = new ImageLoading();
            String s = test.resize("images/cougar.jpg", "1");
            System.out.println(s);
    }

  • Image loading problem on internet Explorer

    Hello EveryBody
    I am doing an java game.My starting class is a class that extends JApplet.Then I am calling a class that extends JFrame.Then i am calling a class which extends a canvas.In the constructor of my canvas class i call a method loadImage(),which loads all the images used in my game.My game is working fine in appletViewer.but it is not working in internet Explorer.When I commennted the method loadImage() inside consructor of canvas class ,then my game is working on internet Explorer.I think there is some problem in loading the images.I am using .png images,which has a size of 87.2KB only which is very little as compared to an PC game.plz help me
    Regards
    Srikant

    internet explorer by default uses the MSVM (microsoft's version of the Sun VM). This VM only runs Java 1.1 code. You can check if this is the problem by using this 1.1-compliant applet below:
    import java.applet.*;
    import java.awt.*;
    public class Test extends Applet {
         public void init() {
              setLayout(new FlowLayout(FlowLayout.CENTER));
              add(new Label(System.getProperty("java.version")));
    }compile that code with these parameters:
    javac -target 1.1 Test.javause this HTML:
    <applet code="Test" width="400" height="400"></applet>when you run the applet in Internet Explorer, if you see anything about "Java 1.1" or something similiar, then the problem is that IE is using the MSVM instead of the Sun VM.
    You may want to also run this applet in Mozilla Firefox, because Firefox uses the correct JRE that is installed on the system. If the applet running in Firefox does NOT say 1.1 (e.g 1.4, 1.5, etc), then you have the correct JRE. In this case, go to Internet Explorer -> Tools -> Internet Options -> Advanced. Scroll down this list until you see the checkmark that says "Use JRE x.x.x for <applet> tag (requires restart)." Ensure this box is checked.
    If that box is already checked, or if the applet in Firefox also says "1.1," then you probably don't have the latest JRE installed. See http://java.com/ to grab the latest JRE.

  • Firefox + Apple store = image load problems

    I've had this problem for a very long time. I prefer Firefox (Safari is extremely slow for me) and it loads every site just fine, even all of Apple.com pages, except for the Apple store.
    Here is a screen shot of part of what I see in Firefox:
    http://img156.imageshack.us/img156/1406/picture1gn0.jpg
    As you can see, just about every image is missing. I've already checked my adblock and I'm pretty positive it's not blocking the images. I even tried disabling my adblock and still didn't see any differences.
    I've used Firefox for a very long time. Since before Firefox 2. I don't recall when the images stopped appearing, since I don't visit the store often.
    Safari loads the images, but as I said, it's an extremely slow web browser, which is why I use Firefox.
    Any help on getting those images to load in Firefox would be greatly appreciated.

    I experienced a very similar problem. I'm running Firefox 2.0.0.12 (latest update) on a PC under Win XP.
    It looks like all the javascript is being ignored. Instead, I see a VERY plain HTML web page for the Apple Store. Everything else on the Apple website looks great.
    But after checking, I noticed that there are a ton of images from
    http://a248.e.akamai.net
    And Adblock has this site nailed.
    So I turned the adblocker off (actually, I just enabled this web address), and the site is now usable.
    Hope this helps.
    -scott biggs

  • Image Loading Problem with Sharp S770H

    Hello Friends,
    I am developing game for SharpS770H device, its working fine but incase i try to increase resources(Images) its getting hang.
    I have created All images in a Single function, i think before all images creation game is trying to use image object. The same Game is working fine on anather device.
    Could u plz suggest some solution as soon as possible.

    Hello Friends,
    I am developing game for SharpS770H device, its working fine but incase i try to increase resources(Images) its getting hang.
    I have created All images in a Single function, i think before all images creation game is trying to use image object. The same Game is working fine on anather device.
    Could u plz suggest some solution as soon as possible.

  • Problem: codebase, jar and image reloading problem please help!

    Hi Java Gurus,
    I have written an applet that extends JApplet for viewing webcam. In order to reduce the download time I put my classes into a doorcam.jar file. The following is my <applet> tag in my html file.
    <applet code="CameraApplet.class"
    archive="doorcam.jar"
         codebase = "webcam/classes"
         width="375" height="475">
    <param name="imagePath" value="http://judge/webcam/images">
    <param name="webCamImage" value="door.jpg">
    <param name="COMPort" value="COM2">
    <param name="frameRate" value="10"> <!-- could not exceed more than 10-->
    <param name="host" value="judge">
    </applet>
    The fist problem is that my class file does not get loaded from the jar file if i provide the "codebase" attribute as above. Instead the browser load every single class file from the webserver. This has some problem too. Coz the browser sometimes just thorough NullPointerException or ClassNotFoundException. After much of debugging I found out that the problem is the IE browser which seldom fails to load classes or image file from the server. If i referesh the browser the applet and all its classes loaded successfully and runs smoothly. This behaviour never occurs when running with "appletviewer".
    I wanted all my classes to be loaded from my jar file. After much of trial and error I found out that if i remove "codebase" attribute the browser loads the classes from my jar file and applet loads very fast. This is where the second problem comes in. The browser does not reload my webcam image file so that the webcam become alive with live images, like before.
    If I run on "appletviewer" everything works fine my web cam is displayed properly. But in IE browser the image does not get reloaded when I refresh my image to give live to my webcam display. The refresh method is given below.
    private void refresh(final URL url) {
    Image webCamImage =getImage(url);
    webCamImage.flush(); // flush out the previous image
    webCamImage = getImage(url); // get a new image
    webCamImageIcon.setImage(webCamImage); webCamImageIcon.paintIcon(webCamLabel, webCamLabel.getGraphics(), 15, 15);
    When I add the "codebase" attribute back, the image gets reloaded for every refresh() and everything works fine. But the classes are also loaded from the server. And occasionally also suffers Class loading and image loading problem. As I presented earlier, when I do refreshing in the browser everything gets loaded and the applet function correctly with web cam displaying very well.
    The problem is so strange that I could not find any way to solve it.
    It would be a great help to me if somebody provide me some work around to the problem.
    I tested on Windows 2000, Windows XP, IE 5.5, IE 6 with J2SDK 1.4.0.
    Thank you all very much in advance.
    best regards,
    Judge

    Thank you so much for the suggestions. I did tried the way u suggested. The problem still the same.
    I think its the problem between IE browser and Java Plug-in.
    I which SUN would find these incompatibilities and solve these problems.
    I even tried using java SDK and plug-in 1.4.1 it even worst. It can't even load an applet. And it does not show any loading messages nor any error messages. It just show a cross sign on the upper left coner.
    I would be so glad, if Sun would try to eliminate the inconsistancies such as caching, loading, initializing etc between browser and its Java plug-In. For example, applets behave well in appletviewer and behave unpredictably in browser environment.
    I have seen so many people in the forums with all sorts of problems because of this.
    Right now I m desperately looking for work around to my problem.
    If somebody would provide me with the solution to my problem it would be a great help to me.
    thank you all so much.
    best regards,
    Judge

  • Flash Image Gallery load problem

    This a familiar problem that has been put up here a thousand
    times I'm sure but as yet I haven't been able to find a solution
    for it. I've put together a simple image gallery using Flash and an
    XML file. It works perfectly on my system but there are issues with
    the images loading properly when I put them onto my site. I know
    very little Flash, I've been using a pre-made gallery that I
    downloaded but since it works on my computer I assume I should be
    able to get it to work online too. The thumbnails for the file seem
    to work fine and the information from the XML file is obviously
    being accessed, however the main images are not loading. I've
    included all the code below (Actionscript, XML and the Web coding),
    if someone could help me before I put my fist through a wall that
    would be great:
    Actionscript
    stop();
    //specify the url where folder is located below (if
    applicable)
    toadd="";
    t = 0;
    l = 0;
    theside = 1;
    galxml = new XML();
    galxml.load(toadd+"flash/fashion/easy-xml-gallery-2.xml");
    galxml.ignoreWhite = true;
    galxml.onLoad = function(success) {
    if (success) {
    maxnum = galxml.firstChild.childNodes.length;
    for (n=0; n<maxnum; n++) {
    specs = galxml.firstChild.childNodes[n];
    //TEXT FOR SIDE NAV
    duplicateMovieClip(side.thumbs.thumbsb, "thumbs"+n, n);
    thumbclip = eval("side.thumbs.thumbs"+n);
    thumbclip._x = n*100;
    thumbclip.thetitle = specs.attributes.name;
    thumbclip.theurl = specs.attributes.theurl;
    thumbclip.thecaption = specs.attributes.caption;
    thumbclip.thenum = n+1;
    thumbclip._alpha = 100;
    loadMovie(toadd+"/flash/fashion/images/"+(n+1)+"b.jpg",
    thumbclip.thumbload.thumbload2);
    play();
    side.thumbs.thumbsb._visible = false;
    mainperc.onEnterFrame = function() {
    if (mainperc.perc<98) {
    mainperc._alpha += 5;
    mainperc.perc = Math.round(l/t*100);
    mainperc.perctext = mainperc.perc+"%";
    mainperc.ltext = "OF THUMBNAILS LOADED
    ("+Math.round(t/1024)+"kb)";
    if (mainperc.perc>98) {
    //mainperc._alpha -= 5;
    if (mainperc._alpha<-50) {
    delete mainperc.onEnterFrame;
    XML
    <gallery>
    <pic1 name="ONE">
    <pic2 name="TWO"/>
    <pic3 name="THREE"/>
    <pic4 name="FOUR"/>
    <pic5 name="FIVE"/>
    <pic6 name="SIX"/>
    <pic7 name="SEVEN"/>
    <pic8 name="EIGHT"/>
    <pic9 name="NINE"/>
    <pic10 name="TEN"/>
    </gallery>
    Webpage coding
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>shorty designs</title>
    <style type="text/css">
    <!--
    body,td,th {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #666666;
    body {
    margin-left: 0px;
    margin-top: 0px;
    background-image: url(images/fashion_back.gif);
    background-repeat: no-repeat;
    a:hover {
    color: #999999;
    text-decoration: none;
    .Sections {
    color: #333333;
    font-weight: bold;
    #wrapper {
    background-color: #FFFFFF;
    padding: 10px;
    width: 760px;
    margin-right: auto;
    margin-left: auto;
    .section_reg {
    color: #333333;
    font-weight: bold;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: large;
    padding-left: 10px;
    .contact {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: large;
    color: #333333;
    background-color: #FFFFFF;
    width: 400px;
    padding-left: 22px;
    text-align: right;
    .section_back {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: large;
    color: #FFFFFF;
    background-color: #000000;
    width: 135px;
    padding-left: 10px;
    margin-top: 15px;
    margin-bottom: 15px;
    background-position: center center;
    vertical-align: middle;
    height: auto;
    .style2 {color: #F0F0F0}
    a:link {
    text-decoration: none;
    color: #333333;
    a:visited {
    text-decoration: none;
    color: #333333;
    a:active {
    text-decoration: none;
    -->
    </style>
    <script src="Scripts/AC_RunActiveContent.js"
    type="text/javascript"></script>
    </head>
    <body>
    <div id="wrapper">
    <p class="Sections"><img src="images/version5.jpg"
    alt="shorty logo" width="166" height="85" /><span
    class="contact">Contact by email:
    [email protected]</span></p>
    <p class="Sections">
    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wid th','536','height','518','align','right','src','/flash/fashion/fashion','quality','high',' pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=Shockwa veFlash','movie','/flash/fashion/fashion'
    ); //end AC code
    </script>
    <noscript>
    <object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"
    width="536" height="518" align="right">
    <param name="movie" value="/flash/fashion/fashion.swf"
    />
    <param name="quality" value="high" />
    <embed src="/flash/fashion/fashion.swf" width="536"
    height="518" align="right" quality="high" pluginspage="
    http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"
    type="application/x-shockwave-flash"></embed>
    </object>
    </noscript>
    </p>
    <p class="section_back">Fashion</p>
    <p class="section_reg"><a
    href="travel.html">Travel</a></p>
    <p class="section_reg"><a
    href="wedding.html">Wedding</a></p>
    <p class="section_reg"><a
    href="layout.html">Layout</a></p>
    <p class="section_reg"><a
    href="personal.html">Personal</a></p>
    </div>
    </body>
    </html>

    Yep, these are the directions:
    this is very easy to update. You only need to edit the simple
    xml file and add images to the images folder.
    step 1.
    add as many images as you like at the size 536 x 403
    step 2.
    create thumbnails for the above images at size 100x75
    step 3.
    update the xml file with the name url and caption for each
    image. (to take the url off just click through to the button on the
    main picture and delete the script that says getURL(theurl)
    step 4.
    open flash file and change the 'toadd' variable to the folder
    where the flash file and image folder is located on your site.
    thats it done.
    The frustrating thing now is that the files are finally being
    found but the thumbnail function has decided to mess up.

  • Problem using parameters in dynamic image loading

    Hello experts!!!
    I am using Crystal Reports 2008.  I am trying to make use of a class servlet application that returns an image based on a number of parameters.  I have put a formula behind a default image that should access the servlet and change the image at runtime.
    This works fine in the CR2008 designer.  However when it is published to my webapp, it doesn't work. 
    The problem is that for some reason, something somewhere is removing the '?' before the parameters in the URL.
    My formula
    "http://localhost:8080/demoMYSQL/servlet/em.cabbench.CabBenchSrv?requestType=getStaticDrawing&imageType=2D&scale=1.6&layerscale3d=0.03&extrusionlength3d=0.4&corelabellevel=1&solid=1&topLevel=1&userid=admin&password=admin&design=" + {designHeader/header/headerAtt.design}
    Image loading in designer
    [http://farm4.static.flickr.com/3503/3179649422_ebd760fa61.jpg?v=0]
    Web application log showing correct path name /em.cabbench.CabBenchSrv to servlet and a succesful request
    /em.cabbench.CabBenchSrv
    1231497711203|10:41:51:203|/demoMYSQL|null|requestType=getStaticDrawing&design=MV-120-XLPE-001&layerscale3d=0.03&scale=1.6&imageType=2D&userid=admin&topLevel=1&solid=1&extrusionlength3d=0.4&corelabellevel=1
    10:41:51:218  binding session 872DB3467263966DC9D5CEBB645C8A5D
    Image loading in viewer - NOT WORKED, default image displayed
    [http://farm4.static.flickr.com/3126/3179649516_5df47fa7fd.jpg?v=0]
    Web application showing incorrect path name to servlet because '?' is missing - result = null request!
    /em.cabbench.CabBenchSrvrequestType=getStaticDrawing&design=MV-120-XLPE-001&imageType=2D&scale=1.6&layerscale3d=0.03&extrusionlength3d=0.4&corelabellevel=1&solid=1&topLevel=1&userid=admin&password=admin&design=MV-120-XLPE-001
    1231498144859|10:49:4:859|/demoMYSQL|null|requestType=null
    1231498144859|10:49:4:859|End of
    Has anybody got any ideas of what to do with the question mark and how to get the image to change properly?????? Like it is doing in the report designer!
    Best Regards
    Nick Hirst

    Hi Nick,
    Since, the issue you have is with the web app only, I would request you to post this thread on the Dev Forum.
    Please click on the appropriate link below: -
    For .Net - SAP Crystal Reports, version for Visual Studio
    For Java - SAP Crystal Reports, version for Eclipse
    The people there would be the perfect people to help you with this.
    Hope this helps.
    Regards,
    Jay.

  • Problems with image loader 'swissarmy.js' in 7.0.1

    My Javascript image loader 'swissarmy.js' at www.sustainableaggregates.com loads images right justified in 7.0.1, in older versions of Firefox or all other current browsers it's OK.
    Is this a bug in Firefox 7.0.1 rendering engine or is it down to a bad piece of Javascript. Swissarmy.js is used a lot in many websites.
    Will a future imminent FF upgrade cure this or do I need to source a new image loader script?

    My Javascript image loader 'swissarmy.js' at www.sustainableaggregates.com loads images right justified in 7.0.1, in older versions of Firefox or all other current browsers it's OK.
    Is this a bug in Firefox 7.0.1 rendering engine or is it down to a bad piece of Javascript. Swissarmy.js is used a lot in many websites.
    Will a future imminent FF upgrade cure this or do I need to source a new image loader script?

Maybe you are looking for