var ctr:Number=0;

	for (var i:Number = 1; i<=48; i++) {
	this["puzzle"+i]._alpha = 30;
	this["puzzle"+i+"c"]._x = Math.random()*100;
	this["puzzle"+i+"c"]._y = Math.random()*300;
	this["puzzle"+i+"c"].onPress = function(){
//for (var i:Number = 1; i<=48; i++) {
	name = this._name;
	j = name.substring(6);
	asd.text = parseInt(j);
this["puzzle"+j+"c"].onRelease = function() {
	if (eval(this["puzzle"+j+"c"]._droptarget)== this["puzzle"+j]) {
		this["puzzle"+j+"c"]._visible = false;
		this["puzzle"+j]._alpha = 100;
	else if (eval(this["puzzle"+j+"c"]._droptarget) != this["puzzle"+j]) {
		this["puzzle"+j+"c"]._alpha = 100; 
		this._x = Math.random()*100;
		this._y = Math.random()*300;

instance names :
puzzle1 to puzzle48
puzzle1c to puzzle 48c
hey guys i kinda new here, please help me.

the problem is that the object can't be release and the condition in the if else statement are not even met. why is that?
the array won't work. :(

its quite the same like but its not in a array form
but if i do this my code will be to long!

puzzle1c.onRelease = function() {
	if (eval(this._droptarget)== puzzle1) {
		puzzle1c._visible = false;
		puzzle1._alpha = 100;
		qwert.text = String(ctr);
	else if (eval(this._droptarget) != puzzle1) {
		puzzle1c._alpha = 100; 
		this._x = Math.random()*800;
			this._y = Math.random()*200;

hope someone replies :)
thanks guys :)

Votes + Comments
Intentionally writing bad and complicated code that does nothing and then asking for help on it to waste time.
7 Years
Discussion Span
Last Post by KazenoZ

And now on ther serious side....

It would be really helpful if you could tell us what your program is supposed to do, what does this specific part of the code needs to do, and what does any of these functions you put in there do, we can't really tell what the problem is if we don't know the purpose of it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.