I am working through the Matching Game in Adobe Animate using ZIM.
I would like to replace the Object List and Target List with Movieclips on the stage and not use Tiles.
I have replaced the Objects List like this:
From this................
// these are what we drag
var objectsList = [
new Label("Square"),
new Label("Circle"),
new Label("Triangle")
];
to this.....................
var objectsList = [
zimify(this.kuadradu),
zimify(this.sirkulu),
zimify(this.triangulu)
];
and the target list is now this....
var targetsList = [
zimify(this.square), // the movieClips on the stage
zimify(this.circle),
zimify(this.triangle)
// new Rectangle(), // or use a zimify(movieClip) here
// new Circle(),
// new Triangle(110,110,110)
];
// What I can't work out is how to remove the tiles so that the effects (animations etc) still work with the movieclips.
// So I can't convert the code below to work without tiles...
// tile the targets and objects
var targets = new Tile(targetsList, 3, 1, 100, 0, true) // true to keep list in order
.pos(0,200,CENTER)
.alp(0)
.animate({
wait:.5,
props:{alpha:1}
});
var objects = new Tile(objectsList, 3, 1, 50, 0, true)
.drag()
.pos(0,150,CENTER,BOTTOM);
// ________________
// these are what we drag
var objectsList = [
//new Label("Square"),
zimify(this.kuadradu), -----------------this does not work
new Label("Circle"), -------------------but these two do.
new Label("Triangle") ----------------
];
I just can't work out why?
Can anyone help me with this?
Thank you
Rod
matching_1.zip (82.6 KB)