In the following grid, all "b"s are 4-connected to the one "a":
-, b, -
b, a, b
-, b, -
So for the sample grid
-1,-1,-1
-1,-1,04
-1,-1,04
the cells which are 4-connected to the initialized cells are here marked
with xx:
-1,-1,xx
-1,xx,04
-1,xx,04
In other words, the cells to randomly choose th
David, your algorithm works a treat - many thanks!!
I just need to work out how to make it get more difficult for each of the 20
levels in the game.
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David
H
Can't, full screen can only be triggered via mouse input from the
end-user. (It was added to prevent screen hijacking)
On Wed, Mar 11, 2009 at 3:07 PM, Hans Wichman
wrote:
> Hi,
>
> how about switching to full screen and back, and catching any security
> exceptions?
> If you can switch and back
oops I meant to say that it could check from available slots in the
multidimensional array; therefore...
0,0,0
1,1,0
0,0,0
...
0,2,0
1,1,2
0,0,0
...
0,2,0
1,1,2
3,3,0
..
distance of 0 between no longer available so check for distance of 1
between, resulting in:
0,2,4
1,1,2
3,3,4
A
have you received mine or list emails? hope it's clear if you did..
pinatti
On Wed, Mar 11, 2009 at 3:48 PM, Gustavo Duenas <
gdue...@leftandrightsolutions.com> wrote:
> Thanks, I 've just solved minutes ago, apparently it gives me the error
> when the part of the function is
> xTween.continueTo
I just wanted to mention that I don't think it should be entirely
random. Perhaps you may want to add restrictions as I mentioned before,
yet, make sure it has a maximum that steps higher and higher based on
availability, and alternate between diagonal and side to side.
So if there is no way 2
Thanks David for your suggested solution - it looks very promising. I am not
sure what 4-connected means? But I think I understand the general idea
I am just wondering if your solution would guarantee that there will always
be a matching tile within a clear path?
For example if the random sequenc
Hi,
yes it is destructive, but as you can read here:
http://www.adobe.com/devnet/flash/articles/image_api_05.html
you can find out the size of the bitmap after filtering (imagine a big
blur), create a new bitmap and specify a source bitmap to the applyfilter
call.
If you don't want it to be destru
Hi,
how about switching to full screen and back, and catching any security
exceptions?
If you can switch and back it is allowed, if a security exception occurs, it
isn't
greetz
JC
On Wed, Mar 11, 2009 at 6:34 PM, Glen Pike wrote:
> Aha, I see - don't think you can read this for some strange rea
Thanks, I 've just solved minutes ago, apparently it gives me the
error when the part of the function is
xTween.continueTo(event.MouseX, duration);
so I've just erased the event part , it is now:
xTween.continueTo(MouseX, duration);
so now is ok.
:)
any explanation though?
I guess flash was tr
Jonathan,
When you "match" a pair, you pull them off the grid. Therefore after
removing the pair of 2s, there are only empty squares in the path between
the 1s.
Dave
On Wed, Mar 11, 2009 at 10:43 AM, jonathan howe wrote:
> Hi, Paul,
>
> Can you explain what you mean by a "clear path".
> For ex
mouseX and mouseY are member variables of the Sprite class. You don't need
to import member variables, only classes. Once you import the Sprite class,
all the members come with it.
replace your mouseX and mouseY imports with:
import flash.display.Sprite;
and you'll be golden.
Dave
On Wed, Ma
i think he means that you have to get rid of 2 - 2 before you can get
rid of 1 - 1
jonathan howe wrote:
Hi, Paul,
Can you explain what you mean by a "clear path".
For example, when I look at this example below:
1,2,1
2,0,3
4,4,3
In this simple example, a user could clear all tiles by mat
Hello,
Here's my code for the asp.net part. I realize it would be similar to PHP
but, it's so hard to find code to do what I want. Anyway let's say with my
previous code I was posting a var name to an aspx page and I want that aspx
page to use that name to create a new blank text file with that na
Oh man... I just got to thinking along those lines and you beat me to
it; however, I was thinking that, in order to avoid them being placed
side by side, you could place a restriction on minimum distance and
force it to be 2 or more. Then I was thinking your could cross hatch;
however, I thin
Event types doesn't have mouseX. Only MouseEvent has, and even, you should
use target or currentTarget and get it.
ie:
addEventListener(MouseEvent.CLICK, mousecords);
function mousecords(event:Event):void {
xTween.continueTo(event.target.mouseX, duration);
yTween.continueTo(event.target.mouseY, d
import flash.display.Sprite.mouseX;
import flash.display.Sprite.mouseY;
???
import flash.display.Sprite;
:)
Gustavo Duenas wrote:
Hi Coders I have this code, is simple I want to move something using
as3, but when I do the movie test with it, it gives me this error
1172: Definition flash.di
A simpler way to ask would be if 1,2,2,1 is also a clear path (provided
2 has been removed).
On Wed, Mar 11, 2009 at 1:43 PM, jonathan howe wrote:
> Hi, Paul,
>
> Can you explain what you mean by a "clear path".
> For example, when I look at this example below:
>
> > 1,2,1
> > 2,0,3
> > 4,4,3
> >
Hi, Paul,
Can you explain what you mean by a "clear path".
For example, when I look at this example below:
> 1,2,1
> 2,0,3
> 4,4,3
>
> In this simple example, a user could clear all tiles by matching in the
> following order:
>
> 4 - 4
> 3 - 3
> 2 - 2
> 1 - 1
I don't see the "clear path" between
Aha, I see - don't think you can read this for some strange reason. I
had problems trying to get it working, probably part of the security
thing. I could not even get a context menu to do the same...
Glen
John Giotta wrote:
Yes, Stage.displayState vs StageDisplayState.NORMAL or
StageDisplay
My first thought for your algorithm is to essentially follow the solution
path that your user might end up taking. Your user will be clearing areas
out, opening them up. Your algorithm could start with an empty grid and
fill in around a starting seed, growing the tile array outward.
1) empty gri
Paul,
Maybe the problem is actually that difficult - there may be no easy
solutions to the calculation, and it might indeed take hours to find a
valid solution.
But anyway - here's a thought, in case it helps.
Have you considered, for each pair:
- putting the pair on adjacent empty squares.
- m
oops... I just woke up when I wrote it, and I didn't read the full
post. I thought you were making a memory game for some reason.
Paul Steven wrote:
Thanks Anthony
Perhaps I am overcomplicating things but I am under the impression I need to
ensure there is a clear path between each pair as I
Hi Coders I have this code, is simple I want to move something using
as3, but when I do the movie test with it, it gives me this error
1172: Definition flash.display.Sprite:mouseX could not be found.
same for the mouseY, I don't understand since the code appears to be
in the import flash
Thanks Anthony
Perhaps I am overcomplicating things but I am under the impression I need to
ensure there is a clear path between each pair as I add them.
My current algorithm is as follows:
Step 1. Choose a random tile position (Random Row, Random Column)
Step 2. Create an array of all possible
Hi guys
I have a question - if I use a ColorMatrixFilter on a BitmapData object,
does it work like mc.filters = arFiltersArray in that it is non-destructive
to the mc (it can be removed) or is it destructive (once you apply it, you
can't then un-apply it)?
ta
a
__
Yes, Stage.displayState vs StageDisplayState.NORMAL or
StageDisplayState.FULL_SCREEN, but its always NORMAL and I can only
compare when full screen is the event for resize is called. Its a
reactionary condition; I need the event first.
I want to know if its possible from a security/capability stan
Sounds like one of my old high-school projects,
I see several ways of doing what you want that make sense:
* -random population always of an array 81 units long (80 if you
want the last to always be blank)
o --you could create a function that loops 41(or 40 if last
al
John Giotta wrote:
I want to render the UI based on availability of features. One of them
is a full screen Button/Sprite that I want to not appear if
allowFullScreen is false.
Does anyone know of a way to check for full screen availability? I've
been scouring the interwebs for an answer, but no
I want to render the UI based on availability of features. One of them
is a full screen Button/Sprite that I want to not appear if
allowFullScreen is false.
Does anyone know of a way to check for full screen availability? I've
been scouring the interwebs for an answer, but no luck so far. Is it
ju
I am trying to write the code to populate a 9 by 9 grid of tiles with 40
pairs of matching tiles.
I have 4 different types of tiles and I want to create a grid that has 40
matching pairs and 1 blank tile.
I do not want the pairs all to be next to each other but there needs to be
at least one solu
Jobe Makar's book about Flash Games Demystified has a wordsearch that
shuffles words in a grid - it will keep shuffling upto a point, then
decide that it is getting nowhere and try again. There may be some
examples of this sort of thing online - I have the book at home if not :)
Paul Steven w
Try making the server side page use GET and POST, then debug your page
in the browser with a normal query string to make sure that works first...
Then plug it into Flash - you can use LiveHTTPHeaders for get requests,
or a debugging proxy for more serious stuff :)
Dave Watts wrote:
I can't s
> I can't seem to find a good tutorial using ASP.NET 2.0 using C# and AS3. I'm
> trying to figure out how to POST vars to an .aspx page or rather I think my
> Flash code is correct so I need the code to catch the vars in the .aspx
> page. I'm totally familiar with PHP but, not the M$ way =8o)
>
> .
Hello,
I can't seem to find a good tutorial using ASP.NET 2.0 using C# and AS3. I'm
trying to figure out how to POST vars to an .aspx page or rather I think my
Flash code is correct so I need the code to catch the vars in the .aspx
page. I'm totally familiar with PHP but, not the M$ way =8o)
Tha
35 matches
Mail list logo