[project1dev] Re: Project1 - SVN Update 533

  • From: Kent Petersen <kentkmp@xxxxxxxxx>
  • To: project1dev@xxxxxxxxxxxxx
  • Date: Tue, 15 Dec 2009 19:24:32 -0800

I made a black box that but the window does not expand to meet it as I
thought it would. What is the purpose of the black box?

On Tue, Dec 15, 2009 at 1:10 PM, Alan Wolfe <alan.wolfe@xxxxxxxxx> wrote:

> also... it's going to be fun to get rotation working hehe...  ):
>
> i had rotation working in AR then pulled it out cause it looked better to
> have a diff image for each direction you looked instead of just rotating one
> image.
>
> anyways...
>
> there is a .rotation member on images that you can set.
>
> however... the origin on an image is it's upper left corner which means it
> rotates as if theres a screw on the upper left corner and spins around that.
>
> Also, it rotates around 0,0 (the upper left of the screen!) which really
> sucks.
>
> the solution is to make a dummy sprite object, place it where you want the
> image to go, then add the image as a child of that dummy sprite object and
> put it's position at -width / 2, -height / 2 which makes the image's origin
> go to the center of the image instead of the upper left corner.
>
> then, you set the .rotation member of the dummy sprite object and it will
> spin the image inside on it's center and give you the rotation you want.
>
> it was a pain in the butt, but it was workin.
>
> hey uhh... the arrow in AR might use rotation actually
>
> check it out and see, if so you should be able to copy the code from there
> On Tue, Dec 15, 2009 at 1:03 PM, Alan Wolfe <alan.wolfe@xxxxxxxxx> wrote:
>
>> there's a way to set the width and height of images you've loaded so that
>> they are bigger or smaller than the source art is.
>>
>> if you need to shrink down the puzzle peices to fit in the drawable area
>> and have minimal UI there (ie YOU WON etc) that'd be the way to do it.
>>
>> I dont remember if the AR code does that or not ):
>>
>> but i think maybe you just say...
>>
>> blah.width = x;
>> blah.height = y;
>>
>> to change the size
>>   On Tue, Dec 15, 2009 at 12:52 PM, Kent Petersen <kentkmp@xxxxxxxxx>wrote:
>>
>>> Oh awesome, yeah I wasn't too sure how to handle that yet.
>>>
>>>
>>> On Tue, Dec 15, 2009 at 12:51 PM, Alan Wolfe <alan.wolfe@xxxxxxxxx>wrote:
>>>
>>>> hey also btw, the bottom part of the puzzle is cut off for me on both ie
>>>> and firefox.
>>>>
>>>> also the text thats displayed is off the screen.
>>>>
>>>> if you check out the AR code, there is a screen width / screen height
>>>> that is defined that tell you what the "drawable area" is.
>>>>
>>>> my recomendation is to draw a black box for the drawable area, like AR
>>>> does, then make sure everything you draw is inside of there.
>>>>
>>>> AS lets you draw outside of the "drawable area" which makes things
>>>> problematic
>>>>   On Tue, Dec 15, 2009 at 12:51 PM, Apache User <
>>>> dhapache@xxxxxxxxxxxxxxxxxxx> wrote:
>>>>
>>>>> User:korgath
>>>>>
>>>>> Message: more flash puzzle updates
>>>>>
>>>>> TODO:
>>>>> create a better way of showing the player they won (currently displays
>>>>> "you win")
>>>>> randomize the tiles
>>>>> create a better way to show tiles are selected (currently they
>>>>> disappear)
>>>>>
>>>>>
>>>>> <Files Changed>
>>>>> U   Docs/Website/ActionScript/Kent/ImageLoadArray.as
>>>>> U   Docs/Website/ActionScript/Kent/ImageLoadArray.swf
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Other related posts: