Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 93817

Re: AS3 MovieClip position

$
0
0

It's humiliating but I did not see the dot between mc.row..

 

Try this, then:

var newY: int;

var row:int = 3;

var offsetY: int = 50;

var pieceHeight: int = 70;

mc.row = new int(row);

 

 

newY = offsetY + mc.row * pieceHeight;

 

 

trace (newY);

 

 

Also, do NEVER use the "while" loop in AS3. That may be the problem. The while loop makes the SWF project react infinite times unless it returns false. It is only useful if used like the "for" loop (by increasing / decreasing the value for each update).

 

In this case, it could be useful in these terms:

 

while (row < 9)

{

 

     mc.row = row;

     row++;

 

}

 

Which is the same as:

 

for (row = 0; row < 9; row++) {

 

 

     mc.row = row;

 

 

}


Viewing all articles
Browse latest Browse all 93817

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>