would anyone be able to provide a model of the actionscript for how to make a catch game like http://www.mathplayground.com/multiples.html
i need to have this in for a school project in one and a bit days time, and i will fail otherwise, and i have no idea how to do the actionscript involved for making the objects fall with differing numbers from the top of the stage. if anyone can help me i will be forever grateful!!!
the code i am using currently is
depth = 0;
function makeNewClip() {
clearInterval(ranID)
ranID=setInterval(makeNewClip, ran)
newClip = _root.attachMovie('ddrop', 'ddrop'+depth, depth++);
newClip._x = Math.random()*Stage.width;
newClip._y = -50;
newClip.speed = (Math.random()*10);
newClip.onEnterFrame = function() {
this._y += this.speed;
newDrop = _root.attachMovie('ddrop', 'ddrop'+_root.getNextHighestDepth(), _root.getNextHighestDepth());
newDrop._x = 100;
newDrop._y = -50;
newDrop.number_txt.text = Math.ceil(Math.random()*10);
};
}
makeNewClip();
setInterval(makeNewClip,2000);
i cant get the dynamic text i’ve placed in the movieclip of the falling objects to work, and am questioning whether there is a better way to tackle this problem?
thank you in advance for any help you can provide!