Bitmap insertion problem

40 views
Skip to first unread message

da...@wonderlandlabs.com

unread,
Feb 18, 2013, 1:56:40 PM2/18/13
to crea...@googlegroups.com
I am having a problem with the Bitmap in CreateJS 6.0

I cannot add a Bitmap to the stage via a shape as in


var fluid_canvas = document.getElementById("fluid_sim_canvas");
var stage = new createjs.Stage(fluid_canvas);
 
var fluid = document.createElement('canvas');
fluid.width = Math.ceil(stage.canvas.width / 4);
fluid.height = Math.ceil(stage.canvas.height / 4);
var fluid_bitmap = new createjs.Bitmap(fluid);
var fluid_shape = new createjs.Shape(fluid_bitmap);
fluid_shape.scaleX = fluid_shape.scaleY = 4;
 
stage.addChild(fluid_shape);
....

stage.update();

I get the error message "Uncaught TypeError: Object [Bitmap (name=null)] has no method 'isEmpty' "


Has the method of adding bitmaps to canvases changed in 6.0?




David Buchmann

unread,
Feb 19, 2013, 5:26:06 AM2/19/13
to crea...@googlegroups.com
hi dave,

this mailing list is about the editor create.js found at createjs.org

i think you talk about createjs.com - please check their site for
support possibilities.

cheers,david
> --
>
> ---
> You received this message because you are subscribed to the Google
> Groups "Create.js" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to createjs+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
Liip AG // Agile Web Development // T +41 26 422 25 11
CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch
Reply all
Reply to author
Forward
0 new messages