Tuesday, October 03, 2006

Progresso!

I made some decent progress today. Here's what I've implemented dynamically and completely with ActionScript so far with the Design From Scratch feature.

  • Set up a grid system. (1000 X 700)
  • Allowed user to specify whether he wants to draw an exterior or interior wall.
  • Set up the draw feature, where a user clicks down once, the temporary line shows up, along with a measurement of how long the line is in feet (2 feet = 10 pixels), and connects the two points of the line wherever the user drags the second points. Kind of like the polygon lasso tool in PS.
  • When the user clicks down again, a semi-permanent line is placed where the temporary line showed, the points are entered into an array for later use, the measurement of the line is converted into feet and placed in the exact middle of the line.
  • The user can then draw as many lines as he wants and each one is entered into the array via the endpoints, and semi-permanantly drawn.
  • When the user connects the last line with the start point of the first line, a circle appears indicating you can close off the line. Once clicked and closed the array point info is taken out and used to draw the permanent movie clip onto the stage represented a closed off shape. (this will later be used to move, resize, rotate, name, etc)
  • The user is free to start over with a new shape to draw. Each shape will have it's own identity.
Now for the problems I'm having that need to be fixed in my next iteration, as well as some ideas for improvement.

  • The area to select what kind of wall to draw needs to take off the mouseClickListener so you don't draw at the same time as selecting a choice. (This is a minor issue that probably won't have any bearing on later iterations.)
  • The overall look needs to be improved obviously, but this is also not a big issue since this is early on.
  • The most pressing concern is to figure out an Undo Feature to take one step back if you mess up a single wall and later a delete feature to delete an entire shape.
  • I need to also find a way to make the array creation dynamic so I don't overwrite the array for every new shape. There might be ways around it that I can overwrite it and it be ok, but I think it would improve the flexibility of the code if I found a way to make it more dynamic. Maybe it can save the info into a new array everytime a shape is completed, but the problem is I can't figure out how to dynamically name the arrays so it incrementally creates a new one. There's gotta be a way.
That's all I can think of for now. This post might get updated. Be on the lookout.

No comments: