How do I start new rows automatically

Posted on 2009-12-21
Medium Priority
Last Modified: 2013-11-11
Question by:petersego
  • 2
LVL 14

Expert Comment

ID: 26094897
Here, rather simple code. Though you haven't answered me whether you want both bX and bY or just bY. So I will just show you for both bX and bY. As for only bY, I could not figure out what you really want me to put for bX but you can use this code to infer if you only need bY or you can explain to me more because I believe you need both bX and bY to be dynamic. Otherwise, I need more explanation.

In the previous question I didn't notice you are using AS2. So I changed the datatype to Number, I wondered how you got int to compile in AS2?

Example 1:

for (var i:Number = 0; i < maskArray.length; i++) {
    maskBlock(maskArray[i], qmaskW, qmaskH, qmaskW * ((maskArray[i] - 1) % 4), qmaskH * (maskArray[i] - 1 / 4 >> 0));

If you do not understand any part of this code, feel free to ask.
LVL 14

Accepted Solution

TanLiHao earned 2000 total points
ID: 26094916
Oops, I forgot to add another bracket in some part of the code causing the code to screw up.

Here's the revised code:
for (var i:Number = 0; i < maskArray.length; i++) {
    maskBlock(maskArray[i], qmaskW, qmaskH, qmaskW * ((maskArray[i] - 1) % 4), qmaskH * ((maskArray[i] - 1) / 4 >> 0));

Author Closing Comment

ID: 31668464
It works just perfect. Thakns a lot

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to record live broadcast.
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question