-Steve
--
Steven Bartel
Department of Electrical Engineering and Computer Science
Massachusetts Institute of Technology 2010
Phone: (617) 312-7225
>> el...@mit.edu <mailto:el...@mit.edu> | emall...@gmail.com
>> <mailto:emall...@gmail.com>
>>
>>
>> On Fri, Mar 12, 2010 at 2:55 AM, Jennifer Chan <jpc...@mit.edu
>> <mailto:jpc...@mit.edu>> wrote:
>>
>> It depends on which object's graphic object you are using.
>> For example, if you make a new shape and call beginFill
>> (like shape.grapihcs.beginFill(color)), in order for it to
>> show up, you have to add the shape object to the parent with
>> addChild. Make sure the beginFill, drawCircle, and any other
>> drawing operations are applied to the graphics object of the
>> checkerboard itself.
>>
>> Hope that helps...
>> Jenny
>>
>>
>> On Fri, Mar 12, 2010 at 2:26 AM, Nora Mallory
>> <emall...@gmail.com <mailto:emall...@gmail.com>> wrote:
>>
>> Yeah, I can see how to use all the constants that they
>> gave us. However, I'm looking all over teh interwebs,
>> and everything I see about drawing things in Flex
>> involves using addChild. I did beginFill and drawCircle
>> and nothing shows up unless I then call addChild.
>>
>> --
>> Eleanor Mallory
>>
>> Massachusetts Institute of Technology
>> Department of Electrical Engineering and Computer Science
>> Class of 2011
>>
>> (773) 980-6672
>> el...@mit.edu <mailto:el...@mit.edu> |
>> emall...@gmail.com <mailto:emall...@gmail.com>
>> jpc...@mit.edu <mailto:jpc...@mit.edu>
>>
>>
>>
>>
>>
>> --
>> Sean Liu
>> Massachusetts Institute of Technology
>> Department of Electrical Engineering & Computer Science '10
>> (916) 220-4326 | sean...@mit.edu <mailto:sean...@mit.edu>
>
> <mailto:emall...@gmail.com
> <mailto:emall...@gmail.com>>> wrote:
>
> Got it! Thanks!
>
>
> --
> Eleanor Mallory
>
> Massachusetts Institute of Technology
> Department of Electrical Engineering and Computer Science
> Class of 2011
>
> (773) 980-6672
> el...@mit.edu <mailto:el...@mit.edu>
> <mailto:el...@mit.edu <mailto:el...@mit.edu>> |
> emall...@gmail.com <mailto:emall...@gmail.com>
> <mailto:emall...@gmail.com
> <mailto:emall...@gmail.com>>
>
>
>
> On Fri, Mar 12, 2010 at 2:55 AM, Jennifer Chan
> <jpc...@mit.edu <mailto:jpc...@mit.edu>
> <mailto:jpc...@mit.edu <mailto:jpc...@mit.edu>>> wrote:
>
> It depends on which object's graphic object you are
> using.
> For example, if you make a new shape and call
> beginFill
> (like shape.grapihcs.beginFill(color)), in order
> for it to
> show up, you have to add the shape object to the
> parent with
> addChild. Make sure the beginFill, drawCircle, and
> any other
> drawing operations are applied to the graphics
> object of the
> checkerboard itself.
>
> Hope that helps...
> Jenny
>
>
> On Fri, Mar 12, 2010 at 2:26 AM, Nora Mallory
> <emall...@gmail.com <mailto:emall...@gmail.com>
> <mailto:emall...@gmail.com
> <mailto:emall...@gmail.com>>> wrote:
>
> Yeah, I can see how to use all the constants
> that they
> gave us. However, I'm looking all over teh
> interwebs,
> and everything I see about drawing things in Flex
> involves using addChild. I did beginFill and
> drawCircle
> and nothing shows up unless I then call addChild.
>
> --
> Eleanor Mallory
>
> Massachusetts Institute of Technology
> Department of Electrical Engineering and
> Computer Science
> Class of 2011
>
> (773) 980-6672
> el...@mit.edu <mailto:el...@mit.edu>
> <mailto:el...@mit.edu <mailto:el...@mit.edu>> |
> emall...@gmail.com
> <mailto:emall...@gmail.com> <mailto:emall...@gmail.com
> <mailto:emall...@gmail.com>>
>
>
>
> On Fri, Mar 12, 2010 at 2:13 AM, Steven Bartel
> <sba...@mit.edu <mailto:sba...@mit.edu>
> <mailto:jpc...@mit.edu <mailto:jpc...@mit.edu>>
>
>
>
>
>
>
> --
> Sean Liu
> Massachusetts Institute of Technology
> Department of Electrical Engineering & Computer Science '10
> (916) 220-4326 | sean...@mit.edu
> <mailto:sean...@mit.edu> <mailto:sean...@mit.edu
> <mailto:emall...@gmail.com
> <mailto:emall...@gmail.com>>> wrote:
>
> Got it! Thanks!
>
>
> --
> Eleanor Mallory
>
> Massachusetts Institute of Technology
> Department of Electrical Engineering and Computer
> Science
> Class of 2011
>
> (773) 980-6672
> el...@mit.edu <mailto:el...@mit.edu>
> <mailto:el...@mit.edu <mailto:el...@mit.edu>> |
> emall...@gmail.com <mailto:emall...@gmail.com>
> <mailto:emall...@gmail.com
> <mailto:emall...@gmail.com>>
>
>
>
> On Fri, Mar 12, 2010 at 2:55 AM, Jennifer Chan
> <jpc...@mit.edu <mailto:jpc...@mit.edu>
> <mailto:jpc...@mit.edu <mailto:jpc...@mit.edu>>> wrote:
>
> It depends on which object's graphic object you
> are using.
> For example, if you make a new shape and call
> beginFill
> (like shape.grapihcs.beginFill(color)), in
> order for it to
> show up, you have to add the shape object to
> the parent with
> addChild. Make sure the beginFill, drawCircle,
> and any other
> drawing operations are applied to the graphics
> object of the
> checkerboard itself.
>
> Hope that helps...
> Jenny
>
>
> On Fri, Mar 12, 2010 at 2:26 AM, Nora Mallory
> <emall...@gmail.com
> <mailto:emall...@gmail.com>
> <mailto:emall...@gmail.com
> <mailto:emall...@gmail.com>>> wrote:
>
> Yeah, I can see how to use all the
> constants that they
> gave us. However, I'm looking all over teh
> interwebs,
> and everything I see about drawing things
> in Flex
> involves using addChild. I did beginFill
> and drawCircle
> and nothing shows up unless I then call
> addChild.
>
> --
> Eleanor Mallory
>
> Massachusetts Institute of Technology
> Department of Electrical Engineering and
> Computer Science
> Class of 2011
>
> (773) 980-6672
> el...@mit.edu <mailto:el...@mit.edu>
> <mailto:el...@mit.edu <mailto:el...@mit.edu>> |
> emall...@gmail.com
> <mailto:emall...@gmail.com>
> <mailto:emall...@gmail.com
> <mailto:emall...@gmail.com>>
>
>
>
> On Fri, Mar 12, 2010 at 2:13 AM, Steven Bartel
> <sba...@mit.edu <mailto:sba...@mit.edu>
> <mailto:jpc...@mit.edu <mailto:jpc...@mit.edu>>
>
>
>
>
>
>
> --
> Sean Liu
> Massachusetts Institute of Technology
> Department of Electrical Engineering & Computer
> Science '10
> (916) 220-4326 | sean...@mit.edu
> <mailto:sean...@mit.edu> <mailto:sean...@mit.edu
> <mailto:sean...@mit.edu>>
>
>
>
>
>
>
> --
> Tony Tran
> Massachusetts Institute of Technology
> Dept. of Electrical Engineering and Computer Science
>
>
>
>
> --
> Sean Liu
> Massachusetts Institute of Technology
> Department of Electrical Engineering & Computer Science '10
> (916) 220-4326 | sean...@mit.edu <mailto:sean...@mit.edu>
Sean Liu (Gmail) wrote:
> Right...but it still leaves a bad intermittent state in which there
> are random checkers all over the screen outside the bounds of the
> board before you click New Game :-(.
>
> On Sat, Mar 13, 2010 at 2:13 AM, Peter Nga <hl...@mit.edu
> <mailto:hl...@mit.edu>> wrote:
>
> I think when you change the size of the board, it should be like
> having a new board (like when you first start up the program).
> Pressing new board after changing the size should bring up the
> checkers again.
>
> Sean Liu (MIT) wrote:
>
> Actually, I'm a bit confused about the different board sizes.
> Say you click "New Game" in Pixel mode, and then change the
> board size to 3. Now you'll have checkers that are displaying
> off the board.
>
> Should I not be using this.addChild(checkerImage)? The issue
> is, if I try to do this.removeChild(checkerImage) inside the
> ChangeWatcher, it seems as if it's a "new" this, which no
> longer has the checkerImage... but I don't really know how to
> store the "old" this. If I don't do anything, the "old" this
> keeps the checkers displaying on the screen :-(. Any help?
>
> Thanks!
> Sean
>
> On Sat, Mar 13, 2010 at 12:28 AM, Tony Tran <tt...@mit.edu
> <mailto:tt...@mit.edu> <mailto:tt...@mit.edu
> <mailto:tt...@mit.edu>>> wrote:
>
> Different board sizes shouldn't really matter, because the
> board
> model encapsulates all that, I think we're just displaying the
> pieces.
>
> On that note, however, is anyone having the problem where
> when you
> first load up the app, the "pixel" board doesn't have anything
> (even if you click "new game" on the strokes board). I think
> theres an issue where the created event is fired only when you
> switch to the pixel board. Thus, the model doesn't have any
> listener and the pixel board doesn't display it unless you
> click
> "new game" while on the pixel board.
>
> Anyone figure a way around this?
>
>
> On Fri, Mar 12, 2010 at 9:37 PM, Peter Nga <hl...@mit.edu
> <mailto:hl...@mit.edu>
> <mailto:jpc...@mit.edu <mailto:jpc...@mit.edu>
> <mailto:jpc...@mit.edu <mailto:jpc...@mit.edu>>>
>
>
>
>
>
>
>
> -- Sean Liu
> Massachusetts Institute of Technology
> Department of Electrical Engineering & Computer
> Science '10
> (916) 220-4326 | sean...@mit.edu
> <mailto:sean...@mit.edu>
> <mailto:sean...@mit.edu
> <mailto:sean...@mit.edu>> <mailto:sean...@mit.edu
~Darren
On Sat, Mar 13, 2010 at 10:29 PM, Katherine Lin <kat...@mit.edu> wrote:
The first time I load the application, if I am in shared model mode and in
stroke tab, and I click on new game, the checkers populate the
strokecheckerboard but not the pixelcheckerboard. Although the
pixelcheckerboard is empty, if i click on move randomly, will see the moving
checkers, and not the rest. Now If i clear everything, go back to stroke tab,
and click on new game again, this time it populates both the stroke and pixel
checkerboards.
Did anyone run into the same problem?
Thanks
-Meng
-Steve
--
Steven Bartel
Department of Electrical Engineering and Computer Science
Massachusetts Institute of Technology 2010
Phone: (617) 312-7225
if(board.checkerAt(loc1.row,loc1.col).isKing)
Which is really weird because I don't think that should cause any
problems. By the way, loc1 is from var loc1:Location=event.from;
Is that the correct way of using that? It's not giving any errors so I
assume it is
-Kim
-Yuzhi
Yuzhi Zheng
Massachusetts Institute of Technology Class of 2012
Course 6 - Electrical Engineering and Computer Science
Same here. I've done debugging and I've looked at how the checkers are added to the board, but I can't get board.checkers().length to be not empty. Pretty sure my logic for drawing is okay but it's hard to check with an empty board.
Kwasi
On Mar 14, 2010 8:31 PM, "Stefan Gimmillaro" <ste...@mit.edu> wrote:
I know we're supposed to be listening for when checkers are added or removed but where do those listeners actually go, I can't figure it out. I know we aren't supposed to put them in main, but then how do I get the x and y for where we draw the checkers?
Thanks a bunch,
Stefan
On Sun, Mar 14, 2010 at 8:26 PM, John Pope <jo...@mit.edu> wrote:
>
> You can have both the pixelB...
Am I conceptually approaching this correctly?
Alex
<mx:Image id="loader1" visible="false"
source="@Embed(source='../assets/black-king.png')"/>
but this:
<mx:Script>
<![CDATA[
var card:Image = new Image();
card.source = "@Embed(source='../assets/black-king.png')";
this.addChild(card);
]]>
</mx:Script>
gives me a broken image. What the hell?
Does anybody know if we're supposed to support different board sizes when using "Different models" (i.e. have the strokes board of size 4 and have the pixels board of size 8)?
Steven Bartel wrote:
If you look at Checkerboard.mxml, it shows you how to handle this. You have to add a ChangeListener, that listens changes in board (i.e. when it is set). Your change listener can call a function that adds the listeners for your events. Alternatively, override Checkerboard's version of paint, which gets called once or twice, depending on whether the board has been initialized. In both cases, make sure to check if (!board) to see if it's null.
Good luck,
-Steve
--
Steven Bartel
Department of Electrical Engineering and Computer Science
Massachusetts Institute of Technology 2010
Phone: (617) 312-7225
On Mar 12, 2010, at 6:02 PM, Sean Liu (MIT) wrote:
How do we register for events in StrokeCheckerboard?
I'm trying to bind to the "BoardEvent"s like "add", "remove", etc. I overrode the "onLoad", and was going to put a board.addEventListener, except board is still null when the onLoad is called...
Any help?
Thanks!
Sean
On Fri, Mar 12, 2010 at 2:55 AM, Nora Mallory <emall...@gmail.com <mailto:emall...@gmail.com>> wrote:
Got it! Thanks!
--
Eleanor Mallory
Massachusetts Institute of Technology
Department of Electrical Engineering and Computer Science
Class of 2011
<mailto:emall...@gmail.com>
<mailto:jpc...@mit.edu>> wrote:
It depends on which object's graphic object you are using.
For example, if you make a new shape and call beginFill
(like shape.grapihcs.beginFill(color)), in order for it to
show up, you have to add the shape object to the parent with
addChild. Make sure the beginFill, drawCircle, and any other
drawing operations are applied to the graphics object of the
checkerboard itself.
Hope that helps...
Jenny
On Fri, Mar 12, 2010 at 2:26 AM, Nora Mallory
<emall...@gmail.com <mailto:emall...@gmail.com>> wrote:
Yeah, I can see how to use all the constants that they
gave us. However, I'm looking all over teh interwebs,
and everything I see about drawing things in Flex
involves using addChild. I did beginFill and drawCircle
and nothing shows up unless I then call addChild.
--
Eleanor Mallory
Massachusetts Institute of Technology
Department of Electrical Engineering and Computer Science
Class of 2011
el...@mit.edu <mailto:el...@mit.edu> |
emall...@gmail.com <mailto:emall...@gmail.com>
On Fri, Mar 12, 2010 at 2:13 AM, Steven Bartel
<sba...@mit.edu <mailto:sba...@mit.edu>> wrote:
I'm pretty sure they just want you to draw circles
with certain radii, at certain x,y positions. It's
done almost exactly the same as drawing the squares
for checkers. There are a few constants that tell
you how many pixels per square, the colors, and the
radius for the circles. You should be able to use
those to figure out a position, color, and radius,
for a given checker and draw it.
-Steve
--
Steven Bartel
Department of Electrical Engineering and Computer Science
Massachusetts Institute of Technology 2010
Phone: (617) 312-7225
On Mar 12, 2010, at 2:08 AM, Nora wrote:
When you say that the StrokeCheckerboard cannot
have child components,
does that mean that we can't use
this.rawChildren.addChild(x) in
addition to just not calling this.addChild(x)?
-- Jennifer Chan
MIT Class of 2011
Department of Electrical Engineering and Computer Science
jpc...@mit.edu <mailto:jpc...@mit.edu>
--
Sean Liu
Massachusetts Institute of Technology
Department of Electrical Engineering & Computer Science '10
(916) 220-4326 | sean...@mit.edu <mailto:sean...@mit.edu>