0

I'm trying to create a new variable with the name of a passed in event, for example:

Say the passed in event

event.item.id

has the value "bg"

I then would like to create a variable named "bg" for which is to be a Bitmap using CreateJS.

I have tried various things, at the minute I have the following:

event.item.id = new createjs.Bitmap(img);

However when console logging the variable it comes up as undefined and I can't set anymore values to the variable such as x or y positions.

I hope this makes sense!

4

0 回答 0