I really surprised...
My plugin is worked very well in build r95..
Problem comes after I attempt to update to r114.
Javascript library don't recognize the context of element...???
My code as bellow:
<font color=RED>
instanceProto.paint = function (myparam)
{
//alert("here: "+ this.runtime.id);
//alert(this.x);
var _x = this.x;
var _y = this.y;
var _w = this.width;
var _h = this.height;
//this.runtime.trigger(pluginProto.cnds.ImageLoaded,instance);
var image = new Image();
image.src = myparam;
image.onload= function(){
var c=document.getElementById("c2canvas");
var con=c.getContext('2d');
if(null == con){
alert("con is null");
return;
}
con.drawImage(image, _x - _w/2, _y- _h/2, _w,_h);
}
//this.draw(con);
//this.runtime.redraw=true;
this.image = image;
};
</font>
In test bed, alert message always topup "con is null"...this problem never appeared in old build
Some one please help me...how to solve this problem
Thank in advance