Closed alexac1970 closed 11 years ago
You have to load the Image first before adding it to the director.. new CAAT.ImagePreloader().loadImages( [ {id:'imagenIlusion', url:'imagenes/colores.jpg'} ], function( counter, images ) { if ( counter==images.length ) { director.addImage('imagenIlusion', images[0], false); } }
Check any demos sample which uses images. What VKBSB says is completely right. Regards,
Hi, I'm trying to use director.addImage function to add a new image as explained in http://labs.hyperandroid.com/static/CAAT-Samples/tutorials/t4-3.html
It's not working for me. I get an "Uncaught TypeError: Type error" message in the console when i try to use the image. These are the relevant lines:
Do i need to call setImagesCache? Also, is there a way to know when the image is ready to use?
Thanks.