Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Animated gif with Img

    Hi there! I'm trying to add an animated gif to a modal window, but the image displayed are not running the animation.

    Is there anything special that should be done to the Img to get it working?

    Code:
    waitingWindow = new Window();
    		Img img = new Img("../waiting.gif", 32, 32);
    		img.setImageType(ImageStyle.STRETCH);
    		img.setAlign(Alignment.CENTER);
    		img.setValign(VerticalAlignment.CENTER);
    		waitingWindow.setShowCloseButton(false);
    		waitingWindow.setAlign(Alignment.CENTER);
    		waitingWindow.setAlign(VerticalAlignment.CENTER);
    		waitingWindow.setShowMinimizeButton(false);
    		waitingWindow.setShowBody(true);
    		waitingWindow.setShowHeader(true);
    		waitingWindow.setShowMaximizeButton(false);
    		waitingWindow.setTitle("");
    		waitingWindow.setShowTitle(false);
    		waitingWindow.setAutoCenter(true);
    		waitingWindow.setCanDragReposition(false);
    		waitingWindow.setCanDragResize(false);
    		waitingWindow.setWidth(300);
    		waitingWindow.setHeight(130);
    		waitingWindow.setShowModalMask(true);
    		waitingWindow.setIsModal(true);
    		waitingWindow.addItem(img);
    		waitingWindow.setOverflow(Overflow.HIDDEN);

    #2
    Nothing special if the image is valid. What browser are you running this on? What is going on when the modal window appears? Have you tried just window.show() and see it byitself anything animates?

    Comment


      #3
      I'm using Firefox 4.0 beta. I tried to access it directly and it works fine. But when inside the modal window it does not have the animation.

      I've also noticed that the modal window sometimes does not get its images (lateral bars) loaded on the first time. Seems to be some preload issue, just guessing. On the second time it displays the modal window correctly but the image is still.

      Any other ideias?

      Regards

      Comment

      Working...
      X