Start a new topic

Images gets Override on screens.

I am using 

for(var i=0;i<storyCount;i++) // in function
{
globalstorycatchme=i;
storyAnimatedObject[i] = new AR.AnimatedImageDrawable(new AR.ImageResource(storyImage[i]),parseFloat(spriteHeight[i]),parseInt(spriteKeyFrameWidth[i]),parseInt(spriteKeyFrameHeight[i]),{ offsetX: spriteoffsetX[i], offsetY: spriteoffsetY[i], onClick:function() {} }); storyAnimatedObject[i].animate(mainStoryAnimationArray[i],parseInt(frameDuration[i]),animationRepeat[i]); }

to display image on camera. But sometimes one story gets over ride on another story. I have attached screenshot for more clerification.


Hello Tarun,

Thanks for reaching out. Could you please provide some further details on the issue:
  • Which version of the SDK are you using?
  • Are you using the JS API?
  • Are you using any of our Extensions (Titanium, Cordova, Xamarin, Unity)? If yes, which version are you using?
  • What device does this happen with (os Version and model)?
  • Could you explain in more details what your issue is and maybe send a video so we can check how we can reproduce this issue

Thanks

Eva

Hello Eva,
Thanks for Reply.

i am using 6 version sdk with Javascript API. 
It happens on IOS and Android OS devices.


Hello Tarun,

Based on the information you provided, what I understand is that you have a target image and then you have image augmentations that sometimes overlap each other. The issue for this behavior has to be the for loop you are using.

So in order for me to be able to provide you with a solution I need from you to explain in details what you wish to accomplish with your specific use case.

Thanks
Eva

 

Hello Eva,
The below-attached file is my code base i have used for my application. In this below of Video Playing,  i have loaded the video by using ImageDrawable method. I show object on camera by using storyAnimatedObject object with animate method.

js
Hello Tarun,

I am still having troubles understanding what your use case is. Do you want to display one image after the other and this is why you are putting them in a for loop? Because if this is the case then I suggest you have a look at the AnimatedImageDrawable class here. Otherwise, please clarify your use case.

Thanks
Eva

 

Hello Eva,

I have used to display for loop to display one image after another. Also, i have used AnimatedImageDrawable class with an animate method. But still having an issue with image overrides. Don't you understand from my given code?. the same code i have used in my application.

Hello Tarun,

I am sure that you can understand that it is not possible for us to go through the whole code that our users post on the forum. In addition, the part of code you have posted still does not explain what your is use case and why you are using a for loop. So what I would advice you to do is remove the for loop and use the AnimatedImageDrawable class that I have posted above.

Thanks
Eva

 

Hi EVA,


Thank You for your support.

The thing is, I am creating multiple stories using several images. It means one story has 20 to 30 images in it. In that to get images of each story iI have used for loop to push stories in storyAnimatedObject[i] object. And after pushing all stories in object i play them one after another with the help of animate method.


And i am using below given object and method to display video. i have used play, stop, resume method of videodrawable.

for(var p=0;p<checkStoryVideo.length;p++)
{
videodrawable[checkStoryVideo[p]] = new AR.VideoDrawable(videoArray[p], 1.0, {
offsetX: videoOffsetX[p],
offsetY: videoOffsetY[p],
});
}
Hello Tarun,

I am deeply sorry but your forum posts continue to confuse me. You were talking about issues you were having with AnimatedImageDrawables initially and now you are referring to VideoDrawables. Please correct me if I am wrong, but I believe that your use case is that you have an Image Target and you want to display images one after the other, and this is why you were using the AnimatedDrawable class initially. So what I want from you is to send us a minimum code (because the project that you sent as I explained already is too big and messy) with the issue you were having when you were using the AnimatedDrawable class, so that we can test internally and try and reproduce this issue?

Thanks
Eva

 

Login or Signup to post a comment