Image not accepted as animation
clovis2

Hello,

I have a .png image 640x384 pixels, 72x72ppi, compression 1:9. I want to make an animation 5x3 frames of it. I get no image at all on Wade scene. Replacing this image with a similar one leads to no problem. I made all sort of editions to try to get ride of the problem without success. Could you please give me an idea?

All 5 Comments
Shri

Hi,

 

I downloaded your png file and saved it as '1to15.png' (see code below)

This code works, I tested it on firefox and chrome  the numbers count through from1-14 and loop.

The numbers are displayed correctly from the image file as

'1-2-3-4-5-6-7-8-9-  10  -  10  -11-12-13-14'

 

So, you have 15 numbers, but 10 is duplicated.

/****************************************************//	Ashatej Software//	February 2015//	All Rights Reserved//*****************************************************///----------------------------------------------------------------//					Wade global functions//----------------------------------------------------------------App = function() {	var self = this;							// to shorten wade.app		// simply load the one image used	this.load = function() {		console.log('wade global load');		wade.loadImage('./1to15.png');	};	// end load	// set the screen min and max size, and go	this.init = function() {		console.log('wade global init');		wade.setMinScreenSize(800,600);		wade.setMaxScreenSize(800,600);		wade.setWindowMode('full');		self.startDemo();	};	// end init		// setup the animation	this.startDemo = function() {		console.log('start demo');		var fx = new Sprite(0,2);		var ani = new Animation('./1to15.png',5,3,2,true);		fx.addAnimation('count',ani);		var numbers = new SceneObject(fx,0,0,0);		wade.addSceneObject(numbers);		fx.playAnimation('count');	};	// end startDemo	};	// end App// For Chrome Debugging//@ sourceURL=game.js

cheers,

Shri

foxcode

Hi Clovis2, could you please tell us, have you downloaded wade as a library or are you using the online editor?

 

If you are using the library, shri's code above should work fine.

 

If you are using the online editor, make sure the animation is active and that the cells and range have been set correctly, sometimes the editor does not correctly guess the number of cells on x and y, so you will have to change these manually.

 

Edit: I just tested it in the editor and it works fine, though it did not manage to detect the values correctly, I suspect this is because the circles are not centered in each cell. I have an image of what it should look like setup correctly in the editor, see the attachment to this message.

 

Good luck

 

 

 

 

Gio

Hi clovis2

 

I tried the image you attached in your post, it does work for me in the editor too, so it's strange that it wouldn't work for you. What happens if you open the image in your browser directly, is your browser able to display it correctly?

 

It sounds like it's a compression problem, but again, it's weird that it works for us and not for you. Having said that - I can see that you've compressed it quite a lot to keep the image size to a minimum. So here's an idea: could you make an image of the single purple dot (with lower compression), and make objects that have two sprites: a purple dot, and a text sprite on top with the number. That would reduce the size even more, possibly.

 

Also to understand how common this problem is - could you tell us if you're the same person who was asking about a similar problem on our youtube channel?

 

Thanks

clovis2

Hello you both

 

I am awfully sorry! I made a stupid error in file name: a lower case in place of an upper one. Sure that can't work. All is fine now.

 

I am using the off-line editor. The compression factor seems to have no effect, even in a new file I have just created with a compression 1:89.

Finally, I am not the person having asked the similar question on your youtube channel.

 

Thanks a lot and my apologies to have disturbed you for a so stupid thing!

 

Claude

foxcode

No bother clovis2. To possibly make your life easier though, if you simply want a circle where the number changes, I would create a single static circle sprite, and add a text sprite to it. This text sprite would be your number and you would simply change it's contents to cycle through numbers.

 

Good luck with your project

Post a reply
Add Attachment
Submit Reply
Login to Reply