![]() |
| CRC part 2 |
I found that by using the Class HAS format made it a slightly easier way for me to understand what was happening and which parts were static and which were dynamic. This also lead me to see that by physically looking at the lock it did not have any points on it. The points were on the dial and so I Needed another class for that.
![]() |
| CRC part 2 |
Again looking more in depth I figured I would need some sort of reset functionality which would reset both the dial and the lock (set progress to 0/n). This could take the form of a button which would need its own class to display on the stage. This is something I will need to flesh out more. The sound class was fairly simple as sound contains the sound bytes as well as an x y position.
![]() |
| CRC part 2 |
Breaking down what each of the class objects CAN do. Again I found this a really good way to conceptually get my head around what I wanted each thing to do and the practical limitations I might hit when trying to code. After playing with my combination lock for a few minutes it dawned on me that the lock cannot spin and that the dial (lock face) was a separate entity that spun.
![]() |
| CRC part 2 |
![]() |
| CRC part 2 |
Getting Flashy
Armed with this new found understanding and (over) confidence I dove into ActionScript and started to rustle together some code. At the end of the week I ended up with a very simple implementation of the lock and its first two attributes (along with comments for days). State and Password.
I manged to complete the implementation of a three key password for the lock system which would generate a random combination each time ;the script was run with each password ensuring combinations numbers were between 0 and 30 while maintaining a left right switch and a decent (yet random) spread.
Overall I am feeling pretty good for my progress thus far which I have made in only a single workshop session. With a full week before the prototype submission I am hoping that the rest of the code will be just a smooth to implement now that all the planning has been done.





No comments:
Post a Comment