Start a new topic

How to display Animated GIF?

How to display Animated GIF?

1 person has this problem

Hello Eva,

 I am Giving the absolute path but it is not showing the gif..

can you post some sample code. 


Thanx

Swapnil

Hi Swapnil,

You need to put the absolute path of your url in brackets ''.

Thanks
Eva

 

Hello Andreas,

As u suggested to use Html Drawable for .gif images. I was trying the below code but it did not work and gives error. and also i want to user the html drawable on poi .


my code is:

World.markerDrawable_idle = new AR.HtmlDrawable({html:"<img src=assets/sticker_1.gif></img>"}, 1, {
translate : { x: 1 },
onClick : function() {
alert("hello");
},
horizontalAnchor : AR.CONST.HORIZONTAL_ANCHOR.LEFT,
opacity : 0.9

});

and it gives the error: file not found at url "assets/sticker_1.gif" but file is already there. 


Hi Sergey,
The .gif you're using does not work with our SDK. We do support loading of .gif files but do not 'play' them. You can try to create a HTMLDrawable and set it's content to only the .gif. That should work.

Best regards

Andreas

Hello! 

 

I am trying to display animated GIF and so far not successful with it. I am trying to use AnimatedImageDrawable it does not help. May I ask for advice or code example on how you display animated gif files in your architect worlds? 

 

Here is a URL to GIF file I am trying to work with: http://forums.accuweather.com/uploads/post-13204-1336091269.gif

 

 var the_image = new AR.ImageResource("http://forums.accuweather.com/uploads/post-13204-1336091269.gif");

 var overlayOne = new AR.AnimatedImageDrawable(the_image, 5, 40, 50, {

    enabled : false,

                     offsetX:1,

offsetY:0.5

                    });

 

 

...

// Later in my code I add overlayOne to camera view: 

 

 imageTrackable.drawables.addCamDrawable(overlayOne);

 

 

Thank you. 

 

  
Login or Signup to post a comment