skip to main
|
skip to sidebar
It Doesn't Have to DO Anything...
Friday, November 27, 2009
Shuffle Board
Ah, simplicity...
I sat down today and wanted to whip this up. After a couple hours, I realized I was getting nowhere. I was approaching this completely backwards. See, originally I intended to keep an array of the x and y coordinates of each dot. THEN, I wanted to shuffle each of those arrays around and assign them to the dots. This turned into a huge hassle, as I realized by completely shuffling them, you always had some overlap (it was possible to have several dots in the same location). SO, I tried to store each x and y coordinate as a pair into an array. That sort of worked, but based on how I originally added the movie clips to the stage, I could only truly randomize either the rows or the columns. Everything moved in this case, but if all columns were randomized, then all rows would move together as a group.
So then it hit me. Don't shuffle the coordinates. Shuffle the DOTS! Duh! If I would have approached this from that perspective at the beginning, this would have taken minutes rather than hours.
Source files:
scrambleDots.fla
Scrambler.as
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
About Me
Corey
Shelbyville, Indiana, United States
I'm a geekish sort of guy by most standards. I absolutely love to read and to play video games. I am a Flash developer currently living in Shelbyville, IN.
View my complete profile
Follow Me
Links
Blog Archive
►
2011
(7)
►
04/24 - 05/01
(1)
►
04/17 - 04/24
(1)
►
03/27 - 04/03
(1)
►
03/20 - 03/27
(1)
►
02/20 - 02/27
(1)
►
01/02 - 01/09
(2)
►
2010
(50)
►
11/07 - 11/14
(1)
►
06/13 - 06/20
(3)
►
06/06 - 06/13
(1)
►
05/30 - 06/06
(3)
►
05/23 - 05/30
(4)
►
05/16 - 05/23
(3)
►
05/09 - 05/16
(1)
►
05/02 - 05/09
(1)
►
04/25 - 05/02
(2)
►
04/04 - 04/11
(2)
►
03/28 - 04/04
(4)
►
03/14 - 03/21
(1)
►
03/07 - 03/14
(1)
►
02/28 - 03/07
(2)
►
02/21 - 02/28
(2)
►
02/14 - 02/21
(4)
►
02/07 - 02/14
(2)
►
01/31 - 02/07
(2)
►
01/24 - 01/31
(2)
►
01/17 - 01/24
(1)
►
01/10 - 01/17
(3)
►
01/03 - 01/10
(5)
▼
2009
(14)
►
12/27 - 01/03
(2)
►
12/20 - 12/27
(2)
►
12/13 - 12/20
(1)
►
12/06 - 12/13
(1)
►
11/29 - 12/06
(3)
▼
11/22 - 11/29
(5)
Shuffle Board
CatScope Gradient Mask
Painterly
Tiles
Welcome!
Followers
No comments:
Post a Comment