Код: Выделить всё
GraphicObject = Class.extend({
//This is the constructor
init: function(){
this.graphic = new Image();
this.graphic.src = 'path/to/file.png';
while(true)
{
this.graphic.onload = function(){break;};
//I know this won't work since the 'break' is on a different context
//but you got what I try to do.
}
}
})
Есть идеи?>
Подробнее здесь: https://stackoverflow.com/questions/942 ... lly-loaded
Мобильная версия